{"format":"opendoc-document","version":1,"url":"https://docs.storm.tg/developers/operations/getportfoliohistory","title":"Get portfolio position history","description":"GET /api/positions/{trader}/portfolio/history: Get portfolio position history","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/getportfoliohistory","markdown":"https://docs.storm.tg/developers/operations/getportfoliohistory.md","json":"https://docs.storm.tg/developers/operations/getportfoliohistory.json"},"translations":{"en":"https://docs.storm.tg/developers/operations/getportfoliohistory"},"operation":{"id":"GetPortfolioHistory","method":"GET","path":"/api/positions/{trader}/portfolio/history","summary":"Get portfolio position history","tags":["Positions and order history"],"deprecated":false,"parameters":[{"name":"trader","location":"path","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660"},{"name":"offset","location":"query","schema":{"type":"number","types":["number"],"example":10,"default":0,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":0},"properties":[],"variants":[]},"type":"number","required":false,"example":"10"},{"name":"limit","location":"query","schema":{"type":"number","types":["number"],"example":20,"default":20,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":1,"maximum":100},"properties":[],"variants":[]},"type":"number","required":false,"example":"20"},{"name":"walletId","location":"query","schema":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string","required":false,"example":"string"}],"bodies":[],"responses":[{"status":"200","description":"Response","mediaType":"application/json","properties":[{"name":"data","type":"object[]","required":true,"example":"[\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]","schema":{"type":"object[]","types":["array"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"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":[]},"variants":[]}},{"name":"totalCount","type":"integer","required":true,"example":"0","schema":{"type":"integer","types":["integer"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":0},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"data","type":"object[]","required":true,"example":"[\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]","schema":{"type":"object[]","types":["array"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"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":[]},"variants":[]}},{"name":"totalCount","type":"integer","required":true,"example":"0","schema":{"type":"integer","types":["integer"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":0},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"data\": [],\n  \"totalCount\": 0\n}","examples":[{"name":"Example","value":"{\n  \"data\": [],\n  \"totalCount\": 0\n}"}],"headers":[]}],"security":[],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.storm.tg/api/positions/{trader}/portfolio/history' \\\n  --header 'Accept: application/json'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.storm.tg/api/positions/{trader}/portfolio/history\", {\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/{trader}/portfolio/history\",\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 portfolio position history","url":"https://docs.storm.tg/developers/operations/getportfoliohistory"}],"headings":[{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Get portfolio position history\n\n`GET /api/positions/{trader}/portfolio/history`\n\n## Authorization\n\n\n\n## Parameters\n\n- path: trader (string; required). \n\nType: string\n\nExample: \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\"\n\n- query: offset (number; optional). \n\nType: number\n\nExample: 10\n\nDefault: 0\n\nminimum: 0\n\n- query: limit (number; optional). \n\nType: number\n\nExample: 20\n\nDefault: 20\n\nminimum: 1\n\nmaximum: 100\n\n- query: walletId (string; optional). \n\nType: string\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.storm.tg/api/positions/{trader}/portfolio/history' \\\n  --header 'Accept: application/json'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.storm.tg/api/positions/{trader}/portfolio/history\", {\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/{trader}/portfolio/history\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n## Response 200\n\n**200** application/json — Response\n\nType: object\n\nRequired fields: data, totalCount\n\nRequired field types: data (object[]; required), totalCount (integer; required)\n\n- data (object[]; required)\n\ndata example: [\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]\n\ndata.Type: object[]\n\ndata.[]Schema: Data.PositionResponse\n\ndata.[]Type: object\n\ndata.[]Required 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\ndata.[]Required 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- data.[]idx (string · nullable; required)\n\ndata.[]idx example: string\n\ndata.[]idx.Type: string · nullable\n\n- data.[]txId (string · nullable; required)\n\ndata.[]txId example: string\n\ndata.[]txId.Type: string · nullable\n\n- data.[]version (number; required)\n\ndata.[]version example: 0\n\ndata.[]version.Type: number\n\n- data.[]openedAt (string · date-time; required)\n\ndata.[]openedAt example: 2026-01-01T00:00:00Z\n\ndata.[]openedAt.Type: string · date-time\n\ndata.[]openedAt.format: date-time\n\n- data.[]lastUpdatedAt (string · date-time; required)\n\ndata.[]lastUpdatedAt example: 2026-01-01T00:00:00Z\n\ndata.[]lastUpdatedAt.Type: string · date-time\n\ndata.[]lastUpdatedAt.format: date-time\n\n- data.[]closedAt (string · date-time · nullable; required)\n\ndata.[]closedAt example: 2026-01-01T00:00:00Z\n\ndata.[]closedAt.Type: string · date-time · nullable\n\ndata.[]closedAt.format: date-time\n\n- data.[]type (string · enum; required)\n\ndata.[]type example: long\n\ndata.[]type.Type: string · enum\n\ndata.[]type.Allowed values: [\"long\",\"short\"]\n\n- data.[]status (string · enum; required)\n\ndata.[]status example: pending_open\n\ndata.[]status.Type: string · enum\n\ndata.[]status.Allowed values: [\"pending_open\",\"pending_close\",\"pending_full_close\",\"pending_liquidate\",\"pending_max_pnl\",\"opened\",\"closed\",\"liquidated\"]\n\n- data.[]market (string; required)\n\ndata.[]market example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\ndata.[]market.Type: string\n\n- data.[]trader (string; required)\n\ndata.[]trader example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\ndata.[]trader.Type: string\n\n- data.[]size (string · int64; required)\n\ndata.[]size example: 0\n\ndata.[]size.Type: string · int64\n\ndata.[]size.format: int64\n\ndata.[]size.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]notional (string · int64; required)\n\ndata.[]notional example: 0\n\ndata.[]notional.Type: string · int64\n\ndata.[]notional.format: int64\n\ndata.[]notional.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]fraction (string · int64; required)\n\ndata.[]fraction example: 0\n\ndata.[]fraction.Type: string · int64\n\ndata.[]fraction.format: int64\n\ndata.[]fraction.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]margin (string · int64; required)\n\ndata.[]margin example: 0\n\ndata.[]margin.Type: string · int64\n\ndata.[]margin.format: int64\n\ndata.[]margin.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]pnl (string · int64 · nullable; required)\n\ndata.[]pnl example: 0\n\ndata.[]pnl.Type: string · int64 · nullable\n\ndata.[]pnl.format: int64\n\ndata.[]pnl.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]funding (string · int64 · nullable; required)\n\ndata.[]funding example: 0\n\ndata.[]funding.Type: string · int64 · nullable\n\ndata.[]funding.format: int64\n\ndata.[]funding.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]rolloverFee (string · int64 · nullable; required)\n\ndata.[]rolloverFee example: 0\n\ndata.[]rolloverFee.Type: string · int64 · nullable\n\ndata.[]rolloverFee.format: int64\n\ndata.[]rolloverFee.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]settlementOraclePrice (string · int64 · nullable; required)\n\ndata.[]settlementOraclePrice example: 0\n\ndata.[]settlementOraclePrice.Type: string · int64 · nullable\n\ndata.[]settlementOraclePrice.format: int64\n\ndata.[]settlementOraclePrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]indexOraclePrice (string · int64 · nullable; required)\n\ndata.[]indexOraclePrice example: 0\n\ndata.[]indexOraclePrice.Type: string · int64 · nullable\n\ndata.[]indexOraclePrice.format: int64\n\ndata.[]indexOraclePrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]fee (string · int64 · nullable; required)\n\ndata.[]fee example: 0\n\ndata.[]fee.Type: string · int64 · nullable\n\ndata.[]fee.format: int64\n\ndata.[]fee.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]feeRate (string · int64 · nullable; required)\n\ndata.[]feeRate example: 0\n\ndata.[]feeRate.Type: string · int64 · nullable\n\ndata.[]feeRate.format: int64\n\ndata.[]feeRate.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]exchangedQuote (string · int64 · nullable; required)\n\ndata.[]exchangedQuote example: 0\n\ndata.[]exchangedQuote.Type: string · int64 · nullable\n\ndata.[]exchangedQuote.format: int64\n\ndata.[]exchangedQuote.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]exchangedBase (string · int64 · nullable; required)\n\ndata.[]exchangedBase example: 0\n\ndata.[]exchangedBase.Type: string · int64 · nullable\n\ndata.[]exchangedBase.format: int64\n\ndata.[]exchangedBase.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]direction (string · enum; required)\n\ndata.[]direction example: long\n\ndata.[]direction.Type: string · enum\n\ndata.[]direction.Allowed values: [\"long\",\"short\"]\n\n- data.[]eventName (string · nullable; required)\n\ndata.[]eventName example: string\n\ndata.[]eventName.Type: string · nullable\n\n- data.[]pnlInEvent (string · int64 · nullable; required)\n\ndata.[]pnlInEvent example: 0\n\ndata.[]pnlInEvent.Type: string · int64 · nullable\n\ndata.[]pnlInEvent.format: int64\n\ndata.[]pnlInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]feeInEvent (string · int64 · nullable; required)\n\ndata.[]feeInEvent example: 0\n\ndata.[]feeInEvent.Type: string · int64 · nullable\n\ndata.[]feeInEvent.format: int64\n\ndata.[]feeInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]fundingInEvent (string · int64 · nullable; required)\n\ndata.[]fundingInEvent example: 0\n\ndata.[]fundingInEvent.Type: string · int64 · nullable\n\ndata.[]fundingInEvent.format: int64\n\ndata.[]fundingInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]rolloverFeeInEvent (string · int64 · nullable; required)\n\ndata.[]rolloverFeeInEvent example: 0\n\ndata.[]rolloverFeeInEvent.Type: string · int64 · nullable\n\ndata.[]rolloverFeeInEvent.format: int64\n\ndata.[]rolloverFeeInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]executionFeeRate (string · int64 · nullable; required)\n\ndata.[]executionFeeRate example: 0\n\ndata.[]executionFeeRate.Type: string · int64 · nullable\n\ndata.[]executionFeeRate.format: int64\n\ndata.[]executionFeeRate.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]executionFeeInEvent (string · int64 · nullable; required)\n\ndata.[]executionFeeInEvent example: 0\n\ndata.[]executionFeeInEvent.Type: string · int64 · nullable\n\ndata.[]executionFeeInEvent.format: int64\n\ndata.[]executionFeeInEvent.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]executionFee (string · int64 · nullable; required)\n\ndata.[]executionFee example: 0\n\ndata.[]executionFee.Type: string · int64 · nullable\n\ndata.[]executionFee.format: int64\n\ndata.[]executionFee.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]timestamp (string · date-time; required)\n\ndata.[]timestamp example: 2026-01-01T00:00:00Z\n\ndata.[]timestamp.Type: string · date-time\n\ndata.[]timestamp.format: date-time\n\n- data.[]isOnchain (boolean; required)\n\ndata.[]isOnchain example: true\n\ndata.[]isOnchain.Type: boolean\n\n- data.[]roe (string · int64 · nullable; required)\n\ndata.[]roe example: 0\n\ndata.[]roe.Type: string · int64 · nullable\n\ndata.[]roe.format: int64\n\ndata.[]roe.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order (object · nullable; optional)\n\ndata.[]order 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\ndata.[]order.Type: object · nullable\n\ndata.[]order.Required fields: id, txId, trader, masterTrader, market, status, type, direction, stopPrice, limitPrice, stopTriggerPrice, takeTriggerPrice, leverage, index, positionId, expiration, amount, indexPrice, settlementOraclePrice, createdAt, error\n\ndata.[]order.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- data.[]order.id (string; required)\n\ndata.[]order.id example: string\n\ndata.[]order.id.Type: string\n\n- data.[]order.txId (string; required)\n\ndata.[]order.txId example: string\n\ndata.[]order.txId.Type: string\n\n- data.[]order.trader (string; required)\n\ndata.[]order.trader example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\ndata.[]order.trader.Type: string\n\n- data.[]order.masterTrader (string; required)\n\ndata.[]order.masterTrader example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\ndata.[]order.masterTrader.Type: string\n\n- data.[]order.market (string; required)\n\ndata.[]order.market example: 0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\n\ndata.[]order.market.Type: string\n\n- data.[]order.status (string · enum; required)\n\ndata.[]order.status example: seq_pending\n\ndata.[]order.status.Type: string · enum\n\ndata.[]order.status.Allowed values: [\"seq_pending\",\"seq_executing\",\"active\",\"pending\",\"tx_sent\",\"executed\",\"canceled\",\"canceled_by_sequencer\",\"expired\",\"error\"]\n\n- data.[]order.type (string · enum; required)\n\ndata.[]order.type example: market\n\ndata.[]order.type.Type: string · enum\n\ndata.[]order.type.Allowed values: [\"market\",\"stop\",\"take\",\"limit\",\"liquidation\",\"max_pnl\",\"add_margin\",\"remove_margin\"]\n\n- data.[]order.direction (string · enum; required)\n\ndata.[]order.direction example: long\n\ndata.[]order.direction.Type: string · enum\n\ndata.[]order.direction.Allowed values: [\"long\",\"short\"]\n\n- data.[]order.stopPrice (string · int64 · nullable; required)\n\ndata.[]order.stopPrice example: 0\n\ndata.[]order.stopPrice.Type: string · int64 · nullable\n\ndata.[]order.stopPrice.format: int64\n\ndata.[]order.stopPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.limitPrice (string · int64 · nullable; required)\n\ndata.[]order.limitPrice example: 0\n\ndata.[]order.limitPrice.Type: string · int64 · nullable\n\ndata.[]order.limitPrice.format: int64\n\ndata.[]order.limitPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.stopTriggerPrice (string · int64 · nullable; required)\n\ndata.[]order.stopTriggerPrice example: 0\n\ndata.[]order.stopTriggerPrice.Type: string · int64 · nullable\n\ndata.[]order.stopTriggerPrice.format: int64\n\ndata.[]order.stopTriggerPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.takeTriggerPrice (string · int64 · nullable; required)\n\ndata.[]order.takeTriggerPrice example: 0\n\ndata.[]order.takeTriggerPrice.Type: string · int64 · nullable\n\ndata.[]order.takeTriggerPrice.format: int64\n\ndata.[]order.takeTriggerPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.leverage (string · int64 · nullable; required)\n\ndata.[]order.leverage example: 0\n\ndata.[]order.leverage.Type: string · int64 · nullable\n\ndata.[]order.leverage.format: int64\n\ndata.[]order.leverage.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.index (number · nullable; required)\n\ndata.[]order.index example: 0\n\ndata.[]order.index.Type: number · nullable\n\n- data.[]order.positionId (string · nullable; required)\n\ndata.[]order.positionId example: string\n\ndata.[]order.positionId.Type: string · nullable\n\n- data.[]order.expiration (string · date-time · nullable; required)\n\ndata.[]order.expiration example: 2026-01-01T00:00:00Z\n\ndata.[]order.expiration.Type: string · date-time · nullable\n\ndata.[]order.expiration.format: date-time\n\n- data.[]order.amount (string · int64 · nullable; required)\n\ndata.[]order.amount example: 0\n\ndata.[]order.amount.Type: string · int64 · nullable\n\ndata.[]order.amount.format: int64\n\ndata.[]order.amount.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.indexPrice (string · int64 · nullable; required)\n\ndata.[]order.indexPrice example: 0\n\ndata.[]order.indexPrice.Type: string · int64 · nullable\n\ndata.[]order.indexPrice.format: int64\n\ndata.[]order.indexPrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.settlementOraclePrice (string · int64 · nullable; required)\n\ndata.[]order.settlementOraclePrice example: 0\n\ndata.[]order.settlementOraclePrice.Type: string · int64 · nullable\n\ndata.[]order.settlementOraclePrice.format: int64\n\ndata.[]order.settlementOraclePrice.pattern: ^(0|-?[1-9][0-9]*)$\n\n- data.[]order.createdAt (string · date-time; required)\n\ndata.[]order.createdAt example: 2026-01-01T00:00:00Z\n\ndata.[]order.createdAt.Type: string · date-time\n\ndata.[]order.createdAt.format: date-time\n\n- data.[]order.error (string · nullable; required)\n\ndata.[]order.error example: string\n\ndata.[]order.error.Type: string · nullable\n\n- totalCount (integer; required)\n\ntotalCount example: 0\n\ntotalCount.Type: integer\n\ntotalCount.minimum: 0\n\nExample\n\n\n\n```json\n{\n  \"data\": [],\n  \"totalCount\": 0\n}\n```","text":"Get portfolio position history GET /api/positions/{trader}/portfolio/history Positions and order history trader string offset number limit number walletId string 200 Response data object[] totalCount integer","api":{"title":"Storm API reference","version":"3.0","documentation":"https://docs.storm.tg/developers/overview","playgroundServer":"https://api.storm.tg"}}