GET
/api/positions/{id}Get a position
Base URL
https://api.storm.tgExamples
curl --request GET 'https://api.storm.tg/api/positions/{id}' \
--header 'Accept: application/json'const response = await fetch("https://api.storm.tg/api/positions/{id}", {
method: "GET",
headers: {
"Accept": "application/json"
},
});
console.log(response.status, await response.text());import requests
response = requests.request(
"GET",
"https://api.storm.tg/api/positions/{id}",
headers={"Accept":"application/json"},
timeout=30,
)
print(response.status_code, response.text)Responses
200Responseapplication/json
idxstring · nullablerequiredExample:
stringtxIdstring · nullablerequiredExample:
stringversionnumberrequiredExample:
0openedAtstring · date-timerequiredExample:
2026-01-01T00:00:00ZlastUpdatedAtstring · date-timerequiredExample:
2026-01-01T00:00:00ZclosedAtstring · date-time · nullablerequiredExample:
2026-01-01T00:00:00Ztypestring · enumrequiredAllowed:
"long" "short"Example:
longstatusstring · enumrequiredAllowed:
"pending_open" "pending_close" "pending_full_close" "pending_liquidate" "pending_max_pnl" "opened" "closed" "liquidated"Example:
pending_openmarketstringrequiredExample:
0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660traderstringrequiredExample:
0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660sizestring · int64required- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0notionalstring · int64required- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0fractionstring · int64required- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0marginstring · int64required- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0pnlstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0fundingstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0rolloverFeestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0settlementOraclePricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0indexOraclePricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0feestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0feeRatestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0exchangedQuotestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0exchangedBasestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0directionstring · enumrequiredAllowed:
"long" "short"Example:
longeventNamestring · nullablerequiredExample:
stringpnlInEventstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0feeInEventstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0fundingInEventstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0rolloverFeeInEventstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0executionFeeRatestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0executionFeeInEventstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0executionFeestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0timestampstring · date-timerequiredExample:
2026-01-01T00:00:00ZisOnchainbooleanrequiredExample:
trueroestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0orderobject · nullableoptionalObject · 21 fields
idstringrequiredExample:
stringtxIdstringrequiredExample:
stringtraderstringrequiredExample:
0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660masterTraderstringrequiredExample:
0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660marketstringrequiredExample:
0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660statusstring · enumrequiredAllowed:
"seq_pending" "seq_executing" "active" "pending" "tx_sent" "executed" "canceled" "canceled_by_sequencer" "expired" "error"Example:
seq_pendingtypestring · enumrequiredAllowed:
"market" "stop" "take" "limit" "liquidation" "max_pnl" "add_margin" "remove_margin"Example:
marketdirectionstring · enumrequiredAllowed:
"long" "short"Example:
longstopPricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0limitPricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0stopTriggerPricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0takeTriggerPricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0leveragestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0indexnumber · nullablerequiredExample:
0positionIdstring · nullablerequiredExample:
stringexpirationstring · date-time · nullablerequiredExample:
2026-01-01T00:00:00Zamountstring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0indexPricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0settlementOraclePricestring · int64 · nullablerequired- pattern
- ^(0|-?[1-9][0-9]*)$
Example:
0createdAtstring · date-timerequiredExample:
2026-01-01T00:00:00Zerrorstring · nullablerequiredExample:
stringView example
{
"id": "string",
"txId": "string",
"trader": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"masterTrader": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"market": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"status": "seq_pending",
"type": "market",
"direction": "long",
"stopPrice": "0",
"limitPrice": "0",
"stopTriggerPrice": "0",
"takeTriggerPrice": "0",
"leverage": "0",
"index": 0,
"positionId": "string",
"expiration": "2026-01-01T00:00:00Z",
"amount": "0",
"indexPrice": "0",
"settlementOraclePrice": "0",
"createdAt": "2026-01-01T00:00:00Z",
"error": "string"
}{
"idx": "string",
"txId": "string",
"version": 0,
"openedAt": "2026-01-01T00:00:00Z",
"lastUpdatedAt": "2026-01-01T00:00:00Z",
"closedAt": "2026-01-01T00:00:00Z",
"type": "long",
"status": "pending_open",
"market": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"trader": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"size": "0",
"notional": "0",
"fraction": "0",
"margin": "0",
"pnl": "0",
"funding": "0",
"rolloverFee": "0",
"settlementOraclePrice": "0",
"indexOraclePrice": "0",
"fee": "0",
"feeRate": "0",
"exchangedQuote": "0",
"exchangedBase": "0",
"direction": "long",
"eventName": "string",
"pnlInEvent": "0",
"feeInEvent": "0",
"fundingInEvent": "0",
"rolloverFeeInEvent": "0",
"executionFeeRate": "0",
"executionFeeInEvent": "0",
"executionFee": "0",
"timestamp": "2026-01-01T00:00:00Z",
"isOnchain": true,
"roe": "0",
"order": {
"id": "string",
"txId": "string",
"trader": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"masterTrader": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"market": "0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660",
"status": "seq_pending",
"type": "market",
"direction": "long",
"stopPrice": "0",
"limitPrice": "0",
"stopTriggerPrice": "0",
"takeTriggerPrice": "0",
"leverage": "0",
"index": 0,
"positionId": "string",
"expiration": "2026-01-01T00:00:00Z",
"amount": "0",
"indexPrice": "0",
"settlementOraclePrice": "0",
"createdAt": "2026-01-01T00:00:00Z",
"error": "string"
}
}