{"format":"opendoc-document","version":1,"url":"https://docs.storm.tg/developers/operations/getposition","title":"Get a position","description":"GET /api/positions/{id}: Get a position","kind":"api-operation","locale":"en","inLanguage":"en","lastModified":"2026-10-09T14:26:32+03:00","revision":"d36475e7b456c737fae6933fa27b7e1bc2687f2c19291b05725ab2c4e8f79d7a","section":{"title":"For Developers","url":"https://docs.storm.tg/developers"},"representations":{"html":"https://docs.storm.tg/developers/operations/getposition","markdown":"https://docs.storm.tg/developers/operations/getposition.md","json":"https://docs.storm.tg/developers/operations/getposition.json"},"translations":{"en":"https://docs.storm.tg/developers/operations/getposition"},"operation":{"id":"GetPosition","method":"GET","path":"/api/positions/{id}","summary":"Get a position","tags":["Positions and order history"],"deprecated":false,"parameters":[{"name":"id","location":"path","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string","required":true,"example":"string"}],"bodies":[],"responses":[{"status":"200","description":"Response","mediaType":"application/json","properties":[{"name":"idx","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"txId","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"version","type":"number","required":true,"example":"0","schema":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"openedAt","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"lastUpdatedAt","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"closedAt","type":"string · date-time · nullable","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"example":"long","schema":{"type":"string · enum","types":["string"],"enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"status","type":"string · enum","required":true,"example":"pending_open","schema":{"type":"string · enum","types":["string"],"enum":["pending_open","pending_close","pending_full_close","pending_liquidate","pending_max_pnl","opened","closed","liquidated"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"market","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"trader","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"size","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"notional","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"fraction","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"margin","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"pnl","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"funding","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"rolloverFee","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"settlementOraclePrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"indexOraclePrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"fee","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"feeRate","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"exchangedQuote","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"exchangedBase","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"example":"long","schema":{"type":"string · enum","types":["string"],"enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"eventName","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"pnlInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"feeInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"fundingInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"rolloverFeeInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"executionFeeRate","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"executionFeeInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"executionFee","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"timestamp","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"isOnchain","type":"boolean","required":true,"example":"true","schema":{"type":"boolean","types":["boolean"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"roe","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"order","type":"object · nullable","required":false,"example":"{\n  \"id\": \"string\",\n  \"txId\": \"string\",\n  \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"masterTrader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"status\": \"seq_pending\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"stopPrice\": \"0\",\n  \"limitPrice\": \"0\",\n  \"stopTriggerPrice\": \"0\",\n  \"takeTriggerPrice\": \"0\",\n  \"leverage\": \"0\",\n  \"index\": 0,\n  \"positionId\": \"string\",\n  \"expiration\": \"2026-01-01T00:00:00Z\",\n  \"amount\": \"0\",\n  \"indexPrice\": \"0\",\n  \"settlementOraclePrice\": \"0\",\n  \"createdAt\": \"2026-01-01T00:00:00Z\",\n  \"error\": \"string\"\n}","schema":{"type":"object · nullable","types":["object"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"id","type":"string","required":true,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"txId","type":"string","required":true,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"trader","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"masterTrader","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"market","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"status","type":"string · enum","required":true,"example":"seq_pending","schema":{"type":"string · enum","types":["string"],"enum":["seq_pending","seq_executing","active","pending","tx_sent","executed","canceled","canceled_by_sequencer","expired","error"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"example":"market","schema":{"type":"string · enum","types":["string"],"enum":["market","stop","take","limit","liquidation","max_pnl","add_margin","remove_margin"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"example":"long","schema":{"type":"string · enum","types":["string"],"enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"stopPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"limitPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"stopTriggerPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"takeTriggerPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"leverage","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"index","type":"number · nullable","required":true,"example":"0","schema":{"type":"number · nullable","types":["number"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"positionId","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"expiration","type":"string · date-time · nullable","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"amount","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"indexPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"settlementOraclePrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"createdAt","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"error","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/Data.PositionResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"idx","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"txId","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"version","type":"number","required":true,"example":"0","schema":{"type":"number","types":["number"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"openedAt","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"lastUpdatedAt","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"closedAt","type":"string · date-time · nullable","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"example":"long","schema":{"type":"string · enum","types":["string"],"enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"status","type":"string · enum","required":true,"example":"pending_open","schema":{"type":"string · enum","types":["string"],"enum":["pending_open","pending_close","pending_full_close","pending_liquidate","pending_max_pnl","opened","closed","liquidated"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"market","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"trader","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"size","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"notional","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"fraction","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"margin","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"pnl","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"funding","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"rolloverFee","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"settlementOraclePrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"indexOraclePrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"fee","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"feeRate","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"exchangedQuote","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"exchangedBase","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"example":"long","schema":{"type":"string · enum","types":["string"],"enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"eventName","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"pnlInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"feeInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"fundingInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"rolloverFeeInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"executionFeeRate","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"executionFeeInEvent","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"executionFee","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"timestamp","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"isOnchain","type":"boolean","required":true,"example":"true","schema":{"type":"boolean","types":["boolean"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"roe","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"order","type":"object · nullable","required":false,"example":"{\n  \"id\": \"string\",\n  \"txId\": \"string\",\n  \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"masterTrader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"status\": \"seq_pending\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"stopPrice\": \"0\",\n  \"limitPrice\": \"0\",\n  \"stopTriggerPrice\": \"0\",\n  \"takeTriggerPrice\": \"0\",\n  \"leverage\": \"0\",\n  \"index\": 0,\n  \"positionId\": \"string\",\n  \"expiration\": \"2026-01-01T00:00:00Z\",\n  \"amount\": \"0\",\n  \"indexPrice\": \"0\",\n  \"settlementOraclePrice\": \"0\",\n  \"createdAt\": \"2026-01-01T00:00:00Z\",\n  \"error\": \"string\"\n}","schema":{"type":"object · nullable","types":["object"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"id","type":"string","required":true,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"txId","type":"string","required":true,"example":"string","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"trader","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"masterTrader","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"market","type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"status","type":"string · enum","required":true,"example":"seq_pending","schema":{"type":"string · enum","types":["string"],"enum":["seq_pending","seq_executing","active","pending","tx_sent","executed","canceled","canceled_by_sequencer","expired","error"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"example":"market","schema":{"type":"string · enum","types":["string"],"enum":["market","stop","take","limit","liquidation","max_pnl","add_margin","remove_margin"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"example":"long","schema":{"type":"string · enum","types":["string"],"enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"stopPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"limitPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"stopTriggerPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"takeTriggerPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"leverage","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"index","type":"number · nullable","required":true,"example":"0","schema":{"type":"number · nullable","types":["number"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"positionId","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"expiration","type":"string · date-time · nullable","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"amount","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"indexPrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"settlementOraclePrice","type":"string · int64 · nullable","required":true,"example":"0","schema":{"type":"string · int64 · nullable","types":["string"],"example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"createdAt","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"error","type":"string · nullable","required":true,"example":"string","schema":{"type":"string · nullable","types":["string"],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]}}],"variants":[]},"example":"{\n  \"idx\": \"string\",\n  \"txId\": \"string\",\n  \"version\": 0,\n  \"openedAt\": \"2026-01-01T00:00:00Z\",\n  \"lastUpdatedAt\": \"2026-01-01T00:00:00Z\",\n  \"closedAt\": \"2026-01-01T00:00:00Z\",\n  \"type\": \"long\",\n  \"status\": \"pending_open\",\n  \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"size\": \"0\",\n  \"notional\": \"0\",\n  \"fraction\": \"0\",\n  \"margin\": \"0\",\n  \"pnl\": \"0\",\n  \"funding\": \"0\",\n  \"rolloverFee\": \"0\",\n  \"settlementOraclePrice\": \"0\",\n  \"indexOraclePrice\": \"0\",\n  \"fee\": \"0\",\n  \"feeRate\": \"0\",\n  \"exchangedQuote\": \"0\",\n  \"exchangedBase\": \"0\",\n  \"direction\": \"long\",\n  \"eventName\": \"string\",\n  \"pnlInEvent\": \"0\",\n  \"feeInEvent\": \"0\",\n  \"fundingInEvent\": \"0\",\n  \"rolloverFeeInEvent\": \"0\",\n  \"executionFeeRate\": \"0\",\n  \"executionFeeInEvent\": \"0\",\n  \"executionFee\": \"0\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"isOnchain\": true,\n  \"roe\": \"0\",\n  \"order\": {\n    \"id\": \"string\",\n    \"txId\": \"string\",\n    \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n    \"masterTrader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n    \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n    \"status\": \"seq_pending\",\n    \"type\": \"market\",\n    \"direction\": \"long\",\n    \"stopPrice\": \"0\",\n    \"limitPrice\": \"0\",\n    \"stopTriggerPrice\": \"0\",\n    \"takeTriggerPrice\": \"0\",\n    \"leverage\": \"0\",\n    \"index\": 0,\n    \"positionId\": \"string\",\n    \"expiration\": \"2026-01-01T00:00:00Z\",\n    \"amount\": \"0\",\n    \"indexPrice\": \"0\",\n    \"settlementOraclePrice\": \"0\",\n    \"createdAt\": \"2026-01-01T00:00:00Z\",\n    \"error\": \"string\"\n  }\n}","headers":[]}],"security":[],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.storm.tg/api/positions/{id}' \\\n  --header 'Accept: application/json'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.storm.tg/api/positions/{id}\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\"\n  },\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.storm.tg/api/positions/{id}\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"⚡ About Storm Trade","url":"https://docs.storm.tg"},{"title":"For Developers","url":"https://docs.storm.tg/developers"},{"title":"Get a position","url":"https://docs.storm.tg/developers/operations/getposition"}],"headings":[{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Get a position\n\n`GET /api/positions/{id}`\n\n## Authorization\n\n\n\n## Parameters\n\n- path: id (string; required). \n\nType: string\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.storm.tg/api/positions/{id}' \\\n  --header 'Accept: application/json'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.storm.tg/api/positions/{id}\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\"\n  },\n});\nconsole.log(response.status, await response.text());\n```\n\n## Example · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.storm.tg/api/positions/{id}\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n## Response 200 · Data.PositionResponse\n\n**200** application/json — Response\n\nSchema: Data.PositionResponse\n\nType: object\n\nRequired fields: idx, txId, version, openedAt, lastUpdatedAt, closedAt, type, status, market, trader, size, notional, fraction, margin, pnl, funding, rolloverFee, settlementOraclePrice, indexOraclePrice, fee, feeRate, exchangedQuote, exchangedBase, direction, eventName, pnlInEvent, feeInEvent, fundingInEvent, rolloverFeeInEvent, executionFeeRate, executionFeeInEvent, executionFee, timestamp, isOnchain, roe\n\nRequired field types: idx (string · nullable; required), txId (string · nullable; required), version (number; required), openedAt (string · date-time; required), lastUpdatedAt (string · date-time; required), closedAt (string · date-time · nullable; required), type (string · enum; required), status (string · enum; required), market (string; required), trader (string; required), size (string · int64; required), notional (string · int64; required), fraction (string · int64; required), margin (string · int64; required), pnl (string · int64 · nullable; required), funding (string · int64 · nullable; required), rolloverFee (string · int64 · nullable; required), settlementOraclePrice (string · int64 · nullable; required), indexOraclePrice (string · int64 · nullable; required), fee (string · int64 · nullable; required), feeRate (string · int64 · nullable; required), exchangedQuote (string · int64 · nullable; required), exchangedBase (string · int64 · nullable; required), direction (string · enum; required), eventName (string · nullable; required), pnlInEvent (string · int64 · nullable; required), feeInEvent (string · int64 · nullable; required), fundingInEvent (string · int64 · nullable; required), rolloverFeeInEvent (string · int64 · nullable; required), executionFeeRate (string · int64 · nullable; required), executionFeeInEvent (string · int64 · nullable; required), executionFee (string · int64 · nullable; required), timestamp (string · date-time; required), isOnchain (boolean; required), roe (string · int64 · nullable; required)\n\n- idx (string · nullable; required)\n\nidx example: string\n\nidx.Type: string · nullable\n\n- txId (string · nullable; required)\n\ntxId example: string\n\ntxId.Type: string · nullable\n\n- version (number; required)\n\nversion example: 0\n\nversion.Type: number\n\n- openedAt (string · date-time; required)\n\nopenedAt example: 2026-01-01T00:00:00Z\n\nopenedAt.Type: string · date-time\n\nopenedAt.format: date-time\n\n- lastUpdatedAt (string · date-time; required)\n\nlastUpdatedAt example: 2026-01-01T00:00:00Z\n\nlastUpdatedAt.Type: string · date-time\n\nlastUpdatedAt.format: date-time\n\n- closedAt (string · date-time · nullable; required)\n\nclosedAt example: 2026-01-01T00:00:00Z\n\nclosedAt.Type: string · date-time · nullable\n\nclosedAt.format: date-time\n\n- type (string · enum; required)\n\ntype example: long\n\ntype.Type: string · enum\n\ntype.Allowed values: [\"long\",\"short\"]\n\n- status (string · enum; required)\n\nstatus example: pending_open\n\nstatus.Type: string · enum\n\nstatus.Allowed values: [\"pending_open\",\"pending_close\",\"pending_full_close\",\"pending_liquidate\",\"pending_max_pnl\",\"opened\",\"closed\",\"liquidated\"]\n\n- market (string; required)\n\nmarket example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\nmarket.Type: string\n\n- trader (string; required)\n\ntrader example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\ntrader.Type: string\n\n- size (string · int64; required)\n\nsize example: 0\n\nsize.Type: string · int64\n\nsize.format: int64\n\nsize.pattern: ^(0|-?[1-9][0-9]*)$\n\n- notional (string · int64; required)\n\nnotional example: 0\n\nnotional.Type: string · int64\n\nnotional.format: int64\n\nnotional.pattern: ^(0|-?[1-9][0-9]*)$\n\n- fraction (string · int64; required)\n\nfraction example: 0\n\nfraction.Type: string · int64\n\nfraction.format: int64\n\nfraction.pattern: ^(0|-?[1-9][0-9]*)$\n\n- margin (string · int64; required)\n\nmargin example: 0\n\nmargin.Type: string · int64\n\nmargin.format: int64\n\nmargin.pattern: ^(0|-?[1-9][0-9]*)$\n\n- pnl (string · int64 · nullable; required)\n\npnl example: 0\n\npnl.Type: string · int64 · nullable\n\npnl.format: int64\n\npnl.pattern: ^(0|-?[1-9][0-9]*)$\n\n- funding (string · int64 · nullable; required)\n\nfunding example: 0\n\nfunding.Type: string · int64 · nullable\n\nfunding.format: int64\n\nfunding.pattern: ^(0|-?[1-9][0-9]*)$\n\n- rolloverFee (string · int64 · nullable; required)\n\nrolloverFee example: 0\n\nrolloverFee.Type: string · int64 · nullable\n\nrolloverFee.format: int64\n\nrolloverFee.pattern: ^(0|-?[1-9][0-9]*)$\n\n- settlementOraclePrice (string · int64 · nullable; required)\n\nsettlementOraclePrice example: 0\n\nsettlementOraclePrice.Type: string · int64 · nullable\n\nsettlementOraclePrice.format: int64\n\nsettlementOraclePrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- indexOraclePrice (string · int64 · nullable; required)\n\nindexOraclePrice example: 0\n\nindexOraclePrice.Type: string · int64 · nullable\n\nindexOraclePrice.format: int64\n\nindexOraclePrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- fee (string · int64 · nullable; required)\n\nfee example: 0\n\nfee.Type: string · int64 · nullable\n\nfee.format: int64\n\nfee.pattern: ^(0|-?[1-9][0-9]*)$\n\n- feeRate (string · int64 · nullable; required)\n\nfeeRate example: 0\n\nfeeRate.Type: string · int64 · nullable\n\nfeeRate.format: int64\n\nfeeRate.pattern: ^(0|-?[1-9][0-9]*)$\n\n- exchangedQuote (string · int64 · nullable; required)\n\nexchangedQuote example: 0\n\nexchangedQuote.Type: string · int64 · nullable\n\nexchangedQuote.format: int64\n\nexchangedQuote.pattern: ^(0|-?[1-9][0-9]*)$\n\n- exchangedBase (string · int64 · nullable; required)\n\nexchangedBase example: 0\n\nexchangedBase.Type: string · int64 · nullable\n\nexchangedBase.format: int64\n\nexchangedBase.pattern: ^(0|-?[1-9][0-9]*)$\n\n- direction (string · enum; required)\n\ndirection example: long\n\ndirection.Type: string · enum\n\ndirection.Allowed values: [\"long\",\"short\"]\n\n- eventName (string · nullable; required)\n\neventName example: string\n\neventName.Type: string · nullable\n\n- pnlInEvent (string · int64 · nullable; required)\n\npnlInEvent example: 0\n\npnlInEvent.Type: string · int64 · nullable\n\npnlInEvent.format: int64\n\npnlInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- feeInEvent (string · int64 · nullable; required)\n\nfeeInEvent example: 0\n\nfeeInEvent.Type: string · int64 · nullable\n\nfeeInEvent.format: int64\n\nfeeInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- fundingInEvent (string · int64 · nullable; required)\n\nfundingInEvent example: 0\n\nfundingInEvent.Type: string · int64 · nullable\n\nfundingInEvent.format: int64\n\nfundingInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- rolloverFeeInEvent (string · int64 · nullable; required)\n\nrolloverFeeInEvent example: 0\n\nrolloverFeeInEvent.Type: string · int64 · nullable\n\nrolloverFeeInEvent.format: int64\n\nrolloverFeeInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- executionFeeRate (string · int64 · nullable; required)\n\nexecutionFeeRate example: 0\n\nexecutionFeeRate.Type: string · int64 · nullable\n\nexecutionFeeRate.format: int64\n\nexecutionFeeRate.pattern: ^(0|-?[1-9][0-9]*)$\n\n- executionFeeInEvent (string · int64 · nullable; required)\n\nexecutionFeeInEvent example: 0\n\nexecutionFeeInEvent.Type: string · int64 · nullable\n\nexecutionFeeInEvent.format: int64\n\nexecutionFeeInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- executionFee (string · int64 · nullable; required)\n\nexecutionFee example: 0\n\nexecutionFee.Type: string · int64 · nullable\n\nexecutionFee.format: int64\n\nexecutionFee.pattern: ^(0|-?[1-9][0-9]*)$\n\n- timestamp (string · date-time; required)\n\ntimestamp example: 2026-01-01T00:00:00Z\n\ntimestamp.Type: string · date-time\n\ntimestamp.format: date-time\n\n- isOnchain (boolean; required)\n\nisOnchain example: true\n\nisOnchain.Type: boolean\n\n- roe (string · int64 · nullable; required)\n\nroe example: 0\n\nroe.Type: string · int64 · nullable\n\nroe.format: int64\n\nroe.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order (object · nullable; optional)\n\norder example: {\n  \"id\": \"string\",\n  \"txId\": \"string\",\n  \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"masterTrader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"status\": \"seq_pending\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"stopPrice\": \"0\",\n  \"limitPrice\": \"0\",\n  \"stopTriggerPrice\": \"0\",\n  \"takeTriggerPrice\": \"0\",\n  \"leverage\": \"0\",\n  \"index\": 0,\n  \"positionId\": \"string\",\n  \"expiration\": \"2026-01-01T00:00:00Z\",\n  \"amount\": \"0\",\n  \"indexPrice\": \"0\",\n  \"settlementOraclePrice\": \"0\",\n  \"createdAt\": \"2026-01-01T00:00:00Z\",\n  \"error\": \"string\"\n}\n\norder.Type: object · nullable\n\norder.Required fields: id, txId, trader, masterTrader, market, status, type, direction, stopPrice, limitPrice, stopTriggerPrice, takeTriggerPrice, leverage, index, positionId, expiration, amount, indexPrice, settlementOraclePrice, createdAt, error\n\norder.Required field types: id (string; required), txId (string; required), trader (string; required), masterTrader (string; required), market (string; required), status (string · enum; required), type (string · enum; required), direction (string · enum; required), stopPrice (string · int64 · nullable; required), limitPrice (string · int64 · nullable; required), stopTriggerPrice (string · int64 · nullable; required), takeTriggerPrice (string · int64 · nullable; required), leverage (string · int64 · nullable; required), index (number · nullable; required), positionId (string · nullable; required), expiration (string · date-time · nullable; required), amount (string · int64 · nullable; required), indexPrice (string · int64 · nullable; required), settlementOraclePrice (string · int64 · nullable; required), createdAt (string · date-time; required), error (string · nullable; required)\n\n- order.id (string; required)\n\norder.id example: string\n\norder.id.Type: string\n\n- order.txId (string; required)\n\norder.txId example: string\n\norder.txId.Type: string\n\n- order.trader (string; required)\n\norder.trader example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\norder.trader.Type: string\n\n- order.masterTrader (string; required)\n\norder.masterTrader example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\norder.masterTrader.Type: string\n\n- order.market (string; required)\n\norder.market example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\norder.market.Type: string\n\n- order.status (string · enum; required)\n\norder.status example: seq_pending\n\norder.status.Type: string · enum\n\norder.status.Allowed values: [\"seq_pending\",\"seq_executing\",\"active\",\"pending\",\"tx_sent\",\"executed\",\"canceled\",\"canceled_by_sequencer\",\"expired\",\"error\"]\n\n- order.type (string · enum; required)\n\norder.type example: market\n\norder.type.Type: string · enum\n\norder.type.Allowed values: [\"market\",\"stop\",\"take\",\"limit\",\"liquidation\",\"max_pnl\",\"add_margin\",\"remove_margin\"]\n\n- order.direction (string · enum; required)\n\norder.direction example: long\n\norder.direction.Type: string · enum\n\norder.direction.Allowed values: [\"long\",\"short\"]\n\n- order.stopPrice (string · int64 · nullable; required)\n\norder.stopPrice example: 0\n\norder.stopPrice.Type: string · int64 · nullable\n\norder.stopPrice.format: int64\n\norder.stopPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.limitPrice (string · int64 · nullable; required)\n\norder.limitPrice example: 0\n\norder.limitPrice.Type: string · int64 · nullable\n\norder.limitPrice.format: int64\n\norder.limitPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.stopTriggerPrice (string · int64 · nullable; required)\n\norder.stopTriggerPrice example: 0\n\norder.stopTriggerPrice.Type: string · int64 · nullable\n\norder.stopTriggerPrice.format: int64\n\norder.stopTriggerPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.takeTriggerPrice (string · int64 · nullable; required)\n\norder.takeTriggerPrice example: 0\n\norder.takeTriggerPrice.Type: string · int64 · nullable\n\norder.takeTriggerPrice.format: int64\n\norder.takeTriggerPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.leverage (string · int64 · nullable; required)\n\norder.leverage example: 0\n\norder.leverage.Type: string · int64 · nullable\n\norder.leverage.format: int64\n\norder.leverage.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.index (number · nullable; required)\n\norder.index example: 0\n\norder.index.Type: number · nullable\n\n- order.positionId (string · nullable; required)\n\norder.positionId example: string\n\norder.positionId.Type: string · nullable\n\n- order.expiration (string · date-time · nullable; required)\n\norder.expiration example: 2026-01-01T00:00:00Z\n\norder.expiration.Type: string · date-time · nullable\n\norder.expiration.format: date-time\n\n- order.amount (string · int64 · nullable; required)\n\norder.amount example: 0\n\norder.amount.Type: string · int64 · nullable\n\norder.amount.format: int64\n\norder.amount.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.indexPrice (string · int64 · nullable; required)\n\norder.indexPrice example: 0\n\norder.indexPrice.Type: string · int64 · nullable\n\norder.indexPrice.format: int64\n\norder.indexPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.settlementOraclePrice (string · int64 · nullable; required)\n\norder.settlementOraclePrice example: 0\n\norder.settlementOraclePrice.Type: string · int64 · nullable\n\norder.settlementOraclePrice.format: int64\n\norder.settlementOraclePrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- order.createdAt (string · date-time; required)\n\norder.createdAt example: 2026-01-01T00:00:00Z\n\norder.createdAt.Type: string · date-time\n\norder.createdAt.format: date-time\n\n- order.error (string · nullable; required)\n\norder.error example: string\n\norder.error.Type: string · nullable\n\nExample\n\n\n\n```json\n{\n  \"idx\": \"string\",\n  \"txId\": \"string\",\n  \"version\": 0,\n  \"openedAt\": \"2026-01-01T00:00:00Z\",\n  \"lastUpdatedAt\": \"2026-01-01T00:00:00Z\",\n  \"closedAt\": \"2026-01-01T00:00:00Z\",\n  \"type\": \"long\",\n  \"status\": \"pending_open\",\n  \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n  \"size\": \"0\",\n  \"notional\": \"0\",\n  \"fraction\": \"0\",\n  \"margin\": \"0\",\n  \"pnl\": \"0\",\n  \"funding\": \"0\",\n  \"rolloverFee\": \"0\",\n  \"settlementOraclePrice\": \"0\",\n  \"indexOraclePrice\": \"0\",\n  \"fee\": \"0\",\n  \"feeRate\": \"0\",\n  \"exchangedQuote\": \"0\",\n  \"exchangedBase\": \"0\",\n  \"direction\": \"long\",\n  \"eventName\": \"string\",\n  \"pnlInEvent\": \"0\",\n  \"feeInEvent\": \"0\",\n  \"fundingInEvent\": \"0\",\n  \"rolloverFeeInEvent\": \"0\",\n  \"executionFeeRate\": \"0\",\n  \"executionFeeInEvent\": \"0\",\n  \"executionFee\": \"0\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"isOnchain\": true,\n  \"roe\": \"0\",\n  \"order\": {\n    \"id\": \"string\",\n    \"txId\": \"string\",\n    \"trader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n    \"masterTrader\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n    \"market\": \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\",\n    \"status\": \"seq_pending\",\n    \"type\": \"market\",\n    \"direction\": \"long\",\n    \"stopPrice\": \"0\",\n    \"limitPrice\": \"0\",\n    \"stopTriggerPrice\": \"0\",\n    \"takeTriggerPrice\": \"0\",\n    \"leverage\": \"0\",\n    \"index\": 0,\n    \"positionId\": \"string\",\n    \"expiration\": \"2026-01-01T00:00:00Z\",\n    \"amount\": \"0\",\n    \"indexPrice\": \"0\",\n    \"settlementOraclePrice\": \"0\",\n    \"createdAt\": \"2026-01-01T00:00:00Z\",\n    \"error\": \"string\"\n  }\n}\n```","text":"Get a position GET /api/positions/{id} Positions and order history id string 200 Response idx string · nullable txId string · nullable version number openedAt string · date-time lastUpdatedAt string · date-time closedAt string · date-time · nullable type string · enum status string · enum market string trader string size string · int64 notional string · int64 fraction string · int64 margin string · int64 pnl string · int64 · nullable funding string · int64 · nullable rolloverFee string · int64 · nullable settlementOraclePrice string · int64 · nullable indexOraclePrice string · int64 · nullable fee string · int64 · nullable feeRate string · int64 · nullable exchangedQuote string · int64 · nullable exchangedBase string · int64 · nullable direction string · enum eventName string · nullable pnlInEvent string · int64 · nullable feeInEvent string · int64 · nullable fundingInEvent string · int64 · nullable rolloverFeeInEvent string · int64 · nullable executionFeeRate string · int64 · nullable executionFeeInEvent string · int64 · nullable executionFee string · int64 · nullable timestamp string · date-time isOnchain boolean roe string · int64 · nullable order object · nullable","api":{"title":"Storm API reference","version":"3.0","documentation":"https://docs.storm.tg/developers/overview","playgroundServer":"https://api.storm.tg"}}