{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/developers/operations/getpositionshistorybyticker","title":"Get positions history by ticker","description":"GET /positions/{accountId}/{asset}/history: The position history of the account narrowed to one market, newest first and paginated. Same phase rule as the portfolio wide history.","kind":"api-operation","locale":"en","inLanguage":"en","lastModified":"2026-09-28T19:22:49.100Z","revision":"25c86f549328fcff320805d5945f4c9804e3927950d831e601d6e3b18c170f66","section":{"title":"Developers","url":"https://docs.upscale.trade/developers"},"representations":{"html":"https://docs.upscale.trade/developers/operations/getpositionshistorybyticker","markdown":"https://docs.upscale.trade/developers/operations/getpositionshistorybyticker.md","json":"https://docs.upscale.trade/developers/operations/getpositionshistorybyticker.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/getpositionshistorybyticker","ru":"https://docs.upscale.trade/ru/developers/operations/getpositionshistorybyticker","es":"https://docs.upscale.trade/es/developers/operations/getpositionshistorybyticker"},"operation":{"id":"getPositionsHistoryByTicker","method":"GET","path":"/positions/{accountId}/{asset}/history","summary":"Get positions history by ticker","description":"The position history of the account narrowed to one market, newest first and paginated. Same phase rule as the portfolio-wide history.","tags":["Trading"],"deprecated":false,"parameters":[{"name":"accountId","location":"path","schema":{"type":"string · uuid","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"properties":[],"variants":[]},"type":"string · uuid","required":true,"description":"Trader account identifier. Must belong to the caller.","example":"00000000-0000-4000-8000-000000000000"},{"name":"asset","location":"path","schema":{"type":"string","types":["string"],"example":"BTC","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minLength":1},"properties":[],"variants":[]},"type":"string","required":true,"description":"Base asset ticker of the market, as returned by `GET /v2/markets`.","example":"BTC"},{"name":"limit","location":"query","schema":{"type":"integer","types":["integer"],"example":20,"default":20,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":1,"maximum":100},"properties":[],"variants":[]},"type":"integer","required":false,"description":"Page size: how many records to return.","example":"20"},{"name":"offset","location":"query","schema":{"type":"integer","types":["integer"],"example":0,"default":0,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":0,"maximum":9007199254740991},"properties":[],"variants":[]},"type":"integer","required":false,"description":"How many records to skip before the page.","example":"0"}],"bodies":[],"responses":[{"status":"401","description":"Unauthorized","properties":[],"headers":[]},{"status":"403","description":"The account belongs to another user (`account_access_denied`), or the request is authenticated with an API key while `api_trading` is disabled on the account (`api_trading_not_enabled`).","properties":[],"headers":[]},{"status":"404","description":"No account with this identifier, or no market for this ticker.","properties":[],"headers":[]},{"status":"429","description":"Rate limit of the API key exceeded (`api_key_rate_limit_exceeded`). `Retry-After` says when to come back; the body carries the bucket (`read` / `write`), the window that tripped, its limit and `retryAt`.","properties":[],"headers":[]},{"status":"default","description":"Response","mediaType":"application/json","properties":[{"name":"data","type":"object[]","required":true,"description":"Requested page of positions, newest first.","example":"[\n  {\n    \"idx\": \"string\",\n    \"txId\": \"string\",\n    \"version\": 0,\n    \"openedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"lastUpdatedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"closedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"type\": \"long\",\n    \"status\": \"opened\",\n    \"market\": \"00000000-0000-4000-8000-000000000000\",\n    \"trader\": \"00000000-0000-4000-8000-000000000000\",\n    \"size\": \"1000000000\",\n    \"notional\": \"1000000000\",\n    \"fraction\": \"1000000000\",\n    \"margin\": \"1000000000\",\n    \"pnl\": \"1000000000\",\n    \"funding\": \"1000000000\",\n    \"rolloverFee\": \"1000000000\",\n    \"settlementOraclePrice\": \"1000000000\",\n    \"fee\": \"1000000000\",\n    \"feeRate\": \"1000000000\",\n    \"exchangedQuote\": \"1000000000\",\n    \"exchangedBase\": \"1000000000\",\n    \"direction\": \"long\",\n    \"eventName\": \"addMargin\",\n    \"pnlInEvent\": \"1000000000\",\n    \"rawPnlInEvent\": \"1000000000\",\n    \"profitAdjustmentApplied\": true,\n    \"holdingTimeMs\": \"string\",\n    \"feeInEvent\": \"1000000000\",\n    \"fundingInEvent\": \"1000000000\",\n    \"rolloverFeeInEvent\": \"1000000000\",\n    \"executionFeeRate\": \"1000000000\",\n    \"executionFeeInEvent\": \"1000000000\",\n    \"executionFee\": \"1000000000\",\n    \"timestamp\": \"2026-05-01T12:30:00.000Z\",\n    \"isOnchain\": true,\n    \"roe\": \"1000000000\",\n    \"scalpingCoefficient\": \"1000000000\",\n    \"closeReason\": \"string\"\n  }\n]","schema":{"type":"object[]","types":["array"],"description":"Requested page of positions, newest first.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"idx","type":"string · nullable","required":true,"description":"Position identifier. Same value as `txId`.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Position identifier. Same value as `txId`.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"txId","type":"string · nullable","required":true,"description":"Position identifier. Kept for backward compatibility, always equal to `idx`.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Position identifier. Kept for backward compatibility, always equal to `idx`.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"version","type":"number","required":true,"description":"Revision of the position: incremented by every event applied to it.","example":"0","schema":{"type":"number","types":["number"],"description":"Revision of the position: incremented by every event applied to it.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"openedAt","type":"string · date-time","required":true,"description":"When the position was opened.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"When the position was opened.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"lastUpdatedAt","type":"string · date-time","required":true,"description":"When the last event was applied to the position.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"When the last event was applied to the position.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"closedAt","type":"string · date-time · nullable","required":true,"description":"When the position was closed; null while it is still open.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time · nullable","types":["string"],"description":"When the position was closed; null while it is still open.","example":"2026-05-01T12:30:00.000Z","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"description":"Direction of the position. Same value as `direction`.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Direction of the position. Same value as `direction`.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"status","type":"string · enum","required":true,"description":"Whether the position is still open, closed by the trader, or liquidated.","example":"opened","schema":{"type":"string · enum","types":["string"],"description":"Whether the position is still open, closed by the trader, or liquidated.","enum":["opened","closed","liquidated"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"market","type":"string · uuid","required":true,"description":"Market the position is held on.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Market the position is held on.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"properties":[],"variants":[]}},{"name":"trader","type":"string · uuid","required":true,"description":"Trader account the position belongs to.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Trader account the position belongs to.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"properties":[],"variants":[]}},{"name":"size","type":"string · int32","required":true,"description":"Position size in base asset units, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Position size in base asset units, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"notional","type":"string · int32","required":true,"description":"Open notional of the position in quote currency, fp9 raw — size at entry price.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Open notional of the position in quote currency, fp9 raw — size at entry price.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"fraction","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"margin","type":"string · int32","required":true,"description":"Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"pnl","type":"string · int32 · nullable","required":true,"description":"Realised pnl accumulated over every event of the position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Realised pnl accumulated over every event of the position, fp9 raw.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"funding","type":"string · int32 · nullable","required":true,"description":"Funding paid (negative) or received (positive) over the life of the position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Funding paid (negative) or received (positive) over the life of the position, fp9 raw.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rolloverFee","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"settlementOraclePrice","type":"string · int32","required":true,"description":"Always `1000000000` (1.0). Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `1000000000` (1.0). Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"fee","type":"string · int32","required":true,"description":"Trading fees charged over the life of the position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Trading fees charged over the life of the position, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"feeRate","type":"string · int32","required":true,"description":"Fee rate applied to the position, fp9 raw fraction (`1000000` = 0.1%).","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Fee rate applied to the position, fp9 raw fraction (`1000000` = 0.1%).","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"exchangedQuote","type":"string · int32","required":true,"description":"Quote amount exchanged by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Quote amount exchanged by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"exchangedBase","type":"string · int32","required":true,"description":"Base amount exchanged by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Base amount exchanged by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Direction of the position.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Direction of the position.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"eventName","type":"string · enum","required":true,"description":"Type of the most recent event applied to the position.","example":"addMargin","schema":{"type":"string · enum","types":["string"],"description":"Type of the most recent event applied to the position.","enum":["addMargin","removeMargin","closePosition","increasePosition","liquidate","forceClose","payFunding"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"pnlInEvent","type":"string · int32","required":true,"description":"Realised pnl of the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Realised pnl of the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rawPnlInEvent","type":"string · int32","required":true,"description":"Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from `pnlInEvent` only when the adjustment fired.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from `pnlInEvent` only when the adjustment fired.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"profitAdjustmentApplied","type":"boolean","required":true,"description":"Whether the 60-second adjustment capped the profit of the most recent event — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Whether the 60-second adjustment capped the profit of the most recent event — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"holdingTimeMs","type":"string · nullable","required":true,"description":"How long the position was held before the most recent close, in milliseconds, counted from the open or the last increase. Null on events that are not closes.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"How long the position was held before the most recent close, in milliseconds, counted from the open or the last increase. Null on events that are not closes.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"feeInEvent","type":"string · int32","required":true,"description":"Fee charged by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Fee charged by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"fundingInEvent","type":"string · int32","required":true,"description":"Funding settled by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Funding settled by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rolloverFeeInEvent","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"executionFeeRate","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"executionFeeInEvent","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"executionFee","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"timestamp","type":"string · date-time","required":true,"description":"Timestamp of the most recent event. Same value as `lastUpdatedAt`.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"Timestamp of the most recent event. Same value as `lastUpdatedAt`.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"isOnchain","type":"boolean","required":true,"description":"Always `true`. Kept for backward compatibility.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Always `true`. Kept for backward compatibility.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"roe","type":"string · int32","required":true,"description":"Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"scalpingCoefficient","type":"string · int32","required":true,"description":"Dynamic spread multiplier the position was charged, fp9 raw (`1000000000` = 1.0). Above 1 when the trade fell inside the market scalping window.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Dynamic spread multiplier the position was charged, fp9 raw (`1000000000` = 1.0). Above 1 when the trade fell inside the market scalping window.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"closeReason","type":"string · nullable","required":true,"description":"Why the platform closed the position (for example `weekly_session_risk_close`). Null for positions closed by the trader and for open ones.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Why the platform closed the position (for example `weekly_session_risk_close`). Null for positions closed by the trader and for open ones.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"variants":[]}},{"name":"totalCount","type":"number","required":true,"description":"Total number of positions matching the request, across all pages.","example":"0","schema":{"type":"number","types":["number"],"description":"Total number of positions matching the request, across all pages.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/PositionsPaginatedResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"data","type":"object[]","required":true,"description":"Requested page of positions, newest first.","example":"[\n  {\n    \"idx\": \"string\",\n    \"txId\": \"string\",\n    \"version\": 0,\n    \"openedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"lastUpdatedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"closedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"type\": \"long\",\n    \"status\": \"opened\",\n    \"market\": \"00000000-0000-4000-8000-000000000000\",\n    \"trader\": \"00000000-0000-4000-8000-000000000000\",\n    \"size\": \"1000000000\",\n    \"notional\": \"1000000000\",\n    \"fraction\": \"1000000000\",\n    \"margin\": \"1000000000\",\n    \"pnl\": \"1000000000\",\n    \"funding\": \"1000000000\",\n    \"rolloverFee\": \"1000000000\",\n    \"settlementOraclePrice\": \"1000000000\",\n    \"fee\": \"1000000000\",\n    \"feeRate\": \"1000000000\",\n    \"exchangedQuote\": \"1000000000\",\n    \"exchangedBase\": \"1000000000\",\n    \"direction\": \"long\",\n    \"eventName\": \"addMargin\",\n    \"pnlInEvent\": \"1000000000\",\n    \"rawPnlInEvent\": \"1000000000\",\n    \"profitAdjustmentApplied\": true,\n    \"holdingTimeMs\": \"string\",\n    \"feeInEvent\": \"1000000000\",\n    \"fundingInEvent\": \"1000000000\",\n    \"rolloverFeeInEvent\": \"1000000000\",\n    \"executionFeeRate\": \"1000000000\",\n    \"executionFeeInEvent\": \"1000000000\",\n    \"executionFee\": \"1000000000\",\n    \"timestamp\": \"2026-05-01T12:30:00.000Z\",\n    \"isOnchain\": true,\n    \"roe\": \"1000000000\",\n    \"scalpingCoefficient\": \"1000000000\",\n    \"closeReason\": \"string\"\n  }\n]","schema":{"type":"object[]","types":["array"],"description":"Requested page of positions, newest first.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"idx","type":"string · nullable","required":true,"description":"Position identifier. Same value as `txId`.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Position identifier. Same value as `txId`.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"txId","type":"string · nullable","required":true,"description":"Position identifier. Kept for backward compatibility, always equal to `idx`.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Position identifier. Kept for backward compatibility, always equal to `idx`.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"version","type":"number","required":true,"description":"Revision of the position: incremented by every event applied to it.","example":"0","schema":{"type":"number","types":["number"],"description":"Revision of the position: incremented by every event applied to it.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"openedAt","type":"string · date-time","required":true,"description":"When the position was opened.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"When the position was opened.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"lastUpdatedAt","type":"string · date-time","required":true,"description":"When the last event was applied to the position.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"When the last event was applied to the position.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"closedAt","type":"string · date-time · nullable","required":true,"description":"When the position was closed; null while it is still open.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time · nullable","types":["string"],"description":"When the position was closed; null while it is still open.","example":"2026-05-01T12:30:00.000Z","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"description":"Direction of the position. Same value as `direction`.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Direction of the position. Same value as `direction`.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"status","type":"string · enum","required":true,"description":"Whether the position is still open, closed by the trader, or liquidated.","example":"opened","schema":{"type":"string · enum","types":["string"],"description":"Whether the position is still open, closed by the trader, or liquidated.","enum":["opened","closed","liquidated"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"market","type":"string · uuid","required":true,"description":"Market the position is held on.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Market the position is held on.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"properties":[],"variants":[]}},{"name":"trader","type":"string · uuid","required":true,"description":"Trader account the position belongs to.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Trader account the position belongs to.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"properties":[],"variants":[]}},{"name":"size","type":"string · int32","required":true,"description":"Position size in base asset units, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Position size in base asset units, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"notional","type":"string · int32","required":true,"description":"Open notional of the position in quote currency, fp9 raw — size at entry price.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Open notional of the position in quote currency, fp9 raw — size at entry price.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"fraction","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"margin","type":"string · int32","required":true,"description":"Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"pnl","type":"string · int32 · nullable","required":true,"description":"Realised pnl accumulated over every event of the position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Realised pnl accumulated over every event of the position, fp9 raw.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"funding","type":"string · int32 · nullable","required":true,"description":"Funding paid (negative) or received (positive) over the life of the position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Funding paid (negative) or received (positive) over the life of the position, fp9 raw.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rolloverFee","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"settlementOraclePrice","type":"string · int32","required":true,"description":"Always `1000000000` (1.0). Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `1000000000` (1.0). Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"fee","type":"string · int32","required":true,"description":"Trading fees charged over the life of the position, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Trading fees charged over the life of the position, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"feeRate","type":"string · int32","required":true,"description":"Fee rate applied to the position, fp9 raw fraction (`1000000` = 0.1%).","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Fee rate applied to the position, fp9 raw fraction (`1000000` = 0.1%).","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"exchangedQuote","type":"string · int32","required":true,"description":"Quote amount exchanged by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Quote amount exchanged by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"exchangedBase","type":"string · int32","required":true,"description":"Base amount exchanged by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Base amount exchanged by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Direction of the position.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Direction of the position.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"eventName","type":"string · enum","required":true,"description":"Type of the most recent event applied to the position.","example":"addMargin","schema":{"type":"string · enum","types":["string"],"description":"Type of the most recent event applied to the position.","enum":["addMargin","removeMargin","closePosition","increasePosition","liquidate","forceClose","payFunding"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"pnlInEvent","type":"string · int32","required":true,"description":"Realised pnl of the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Realised pnl of the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rawPnlInEvent","type":"string · int32","required":true,"description":"Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from `pnlInEvent` only when the adjustment fired.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from `pnlInEvent` only when the adjustment fired.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"profitAdjustmentApplied","type":"boolean","required":true,"description":"Whether the 60-second adjustment capped the profit of the most recent event — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Whether the 60-second adjustment capped the profit of the most recent event — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"holdingTimeMs","type":"string · nullable","required":true,"description":"How long the position was held before the most recent close, in milliseconds, counted from the open or the last increase. Null on events that are not closes.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"How long the position was held before the most recent close, in milliseconds, counted from the open or the last increase. Null on events that are not closes.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"feeInEvent","type":"string · int32","required":true,"description":"Fee charged by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Fee charged by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"fundingInEvent","type":"string · int32","required":true,"description":"Funding settled by the most recent event, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Funding settled by the most recent event, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rolloverFeeInEvent","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"executionFeeRate","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"executionFeeInEvent","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"executionFee","type":"string · int32","required":true,"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Always `0`. Kept for backward compatibility.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"timestamp","type":"string · date-time","required":true,"description":"Timestamp of the most recent event. Same value as `lastUpdatedAt`.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"Timestamp of the most recent event. Same value as `lastUpdatedAt`.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"isOnchain","type":"boolean","required":true,"description":"Always `true`. Kept for backward compatibility.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Always `true`. Kept for backward compatibility.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"roe","type":"string · int32","required":true,"description":"Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"scalpingCoefficient","type":"string · int32","required":true,"description":"Dynamic spread multiplier the position was charged, fp9 raw (`1000000000` = 1.0). Above 1 when the trade fell inside the market scalping window.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Dynamic spread multiplier the position was charged, fp9 raw (`1000000000` = 1.0). Above 1 when the trade fell inside the market scalping window.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"closeReason","type":"string · nullable","required":true,"description":"Why the platform closed the position (for example `weekly_session_risk_close`). Null for positions closed by the trader and for open ones.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Why the platform closed the position (for example `weekly_session_risk_close`). Null for positions closed by the trader and for open ones.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"variants":[]}},{"name":"totalCount","type":"number","required":true,"description":"Total number of positions matching the request, across all pages.","example":"0","schema":{"type":"number","types":["number"],"description":"Total number of positions matching the request, across all pages.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"data\": [\n    {\n      \"idx\": \"string\",\n      \"txId\": \"string\",\n      \"version\": 0,\n      \"openedAt\": \"2026-05-01T12:30:00.000Z\",\n      \"lastUpdatedAt\": \"2026-05-01T12:30:00.000Z\",\n      \"closedAt\": \"2026-05-01T12:30:00.000Z\",\n      \"type\": \"long\",\n      \"status\": \"opened\",\n      \"market\": \"00000000-0000-4000-8000-000000000000\",\n      \"trader\": \"00000000-0000-4000-8000-000000000000\",\n      \"size\": \"1000000000\",\n      \"notional\": \"1000000000\",\n      \"fraction\": \"1000000000\",\n      \"margin\": \"1000000000\",\n      \"pnl\": \"1000000000\",\n      \"funding\": \"1000000000\",\n      \"rolloverFee\": \"1000000000\",\n      \"settlementOraclePrice\": \"1000000000\",\n      \"fee\": \"1000000000\",\n      \"feeRate\": \"1000000000\",\n      \"exchangedQuote\": \"1000000000\",\n      \"exchangedBase\": \"1000000000\",\n      \"direction\": \"long\",\n      \"eventName\": \"addMargin\",\n      \"pnlInEvent\": \"1000000000\",\n      \"rawPnlInEvent\": \"1000000000\",\n      \"profitAdjustmentApplied\": true,\n      \"holdingTimeMs\": \"string\",\n      \"feeInEvent\": \"1000000000\",\n      \"fundingInEvent\": \"1000000000\",\n      \"rolloverFeeInEvent\": \"1000000000\",\n      \"executionFeeRate\": \"1000000000\",\n      \"executionFeeInEvent\": \"1000000000\",\n      \"executionFee\": \"1000000000\",\n      \"timestamp\": \"2026-05-01T12:30:00.000Z\",\n      \"isOnchain\": true,\n      \"roe\": \"1000000000\",\n      \"scalpingCoefficient\": \"1000000000\",\n      \"closeReason\": \"string\"\n    }\n  ],\n  \"totalCount\": 0\n}","headers":[]}],"security":[{"name":"bearer","type":"http · bearer","description":"Personal API key, prefixed with `usk_`.","required":true,"scopes":[]}],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.upscale.trade/positions/{accountId}/{asset}/history' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.upscale.trade/positions/{accountId}/{asset}/history\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\"\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.upscale.trade/positions/{accountId}/{asset}/history\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"What is Prop Trading","url":"https://docs.upscale.trade"},{"title":"Developers","url":"https://docs.upscale.trade/developers"},{"title":"Get positions history by ticker","url":"https://docs.upscale.trade/developers/operations/getpositionshistorybyticker"}],"headings":[{"depth":2,"id":"authorization","title":"Authorization"},{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Get positions history by ticker\n\n`GET /positions/{accountId}/{asset}/history`\n\nThe position history of the account narrowed to one market, newest first and paginated. Same phase rule as the portfolio-wide history.\n\n## Authorization\n\nbearer: http · bearer (required). Personal API key, prefixed with `usk_`.\n\n## Parameters\n\n- path: accountId (string · uuid; required). Trader account identifier. Must belong to the caller.\n\nType: string · uuid\n\nformat: uuid\n\npattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$\n\n- path: asset (string; required). Base asset ticker of the market, as returned by `GET /v2/markets`.\n\nType: string\n\nExample: \"BTC\"\n\nminLength: 1\n\n- query: limit (integer; optional). Page size: how many records to return.\n\nType: integer\n\nExample: 20\n\nDefault: 20\n\nminimum: 1\n\nmaximum: 100\n\n- query: offset (integer; optional). How many records to skip before the page.\n\nType: integer\n\nExample: 0\n\nDefault: 0\n\nminimum: 0\n\nmaximum: 9007199254740991\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.upscale.trade/positions/{accountId}/{asset}/history' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.upscale.trade/positions/{accountId}/{asset}/history\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\"\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.upscale.trade/positions/{accountId}/{asset}/history\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n## Response 401\n\n**401**  — Unauthorized\n\n## Response 403\n\n**403**  — The account belongs to another user (`account_access_denied`), or the request is authenticated with an API key while `api_trading` is disabled on the account (`api_trading_not_enabled`).\n\n## Response 404\n\n**404**  — No account with this identifier, or no market for this ticker.\n\n## Response 429\n\n**429**  — Rate limit of the API key exceeded (`api_key_rate_limit_exceeded`). `Retry-After` says when to come back; the body carries the bucket (`read` / `write`), the window that tripped, its limit and `retryAt`.\n\n## Response default · PositionsPaginatedResponse\n\n**default** application/json — Response\n\nSchema: PositionsPaginatedResponse\n\nType: object\n\nRequired fields: data, totalCount\n\nRequired field types: data (object[]; required), totalCount (number; required)\n\n- data (object[]; required)\n\ndata example: [\n  {\n    \"idx\": \"string\",\n    \"txId\": \"string\",\n    \"version\": 0,\n    \"openedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"lastUpdatedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"closedAt\": \"2026-05-01T12:30:00.000Z\",\n    \"type\": \"long\",\n    \"status\": \"opened\",\n    \"market\": \"00000000-0000-4000-8000-000000000000\",\n    \"trader\": \"00000000-0000-4000-8000-000000000000\",\n    \"size\": \"1000000000\",\n    \"notional\": \"1000000000\",\n    \"fraction\": \"1000000000\",\n    \"margin\": \"1000000000\",\n    \"pnl\": \"1000000000\",\n    \"funding\": \"1000000000\",\n    \"rolloverFee\": \"1000000000\",\n    \"settlementOraclePrice\": \"1000000000\",\n    \"fee\": \"1000000000\",\n    \"feeRate\": \"1000000000\",\n    \"exchangedQuote\": \"1000000000\",\n    \"exchangedBase\": \"1000000000\",\n    \"direction\": \"long\",\n    \"eventName\": \"addMargin\",\n    \"pnlInEvent\": \"1000000000\",\n    \"rawPnlInEvent\": \"1000000000\",\n    \"profitAdjustmentApplied\": true,\n    \"holdingTimeMs\": \"string\",\n    \"feeInEvent\": \"1000000000\",\n    \"fundingInEvent\": \"1000000000\",\n    \"rolloverFeeInEvent\": \"1000000000\",\n    \"executionFeeRate\": \"1000000000\",\n    \"executionFeeInEvent\": \"1000000000\",\n    \"executionFee\": \"1000000000\",\n    \"timestamp\": \"2026-05-01T12:30:00.000Z\",\n    \"isOnchain\": true,\n    \"roe\": \"1000000000\",\n    \"scalpingCoefficient\": \"1000000000\",\n    \"closeReason\": \"string\"\n  }\n]\n\ndata.Type: object[]\n\ndata.Requested page of positions, newest first.\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, fee, feeRate, exchangedQuote, exchangedBase, direction, eventName, pnlInEvent, rawPnlInEvent, profitAdjustmentApplied, holdingTimeMs, feeInEvent, fundingInEvent, rolloverFeeInEvent, executionFeeRate, executionFeeInEvent, executionFee, timestamp, isOnchain, roe, scalpingCoefficient, closeReason\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 · uuid; required), trader (string · uuid; required), size (string · int32; required), notional (string · int32; required), fraction (string · int32; required), margin (string · int32; required), pnl (string · int32 · nullable; required), funding (string · int32 · nullable; required), rolloverFee (string · int32; required), settlementOraclePrice (string · int32; required), fee (string · int32; required), feeRate (string · int32; required), exchangedQuote (string · int32; required), exchangedBase (string · int32; required), direction (string · enum; required), eventName (string · enum; required), pnlInEvent (string · int32; required), rawPnlInEvent (string · int32; required), profitAdjustmentApplied (boolean; required), holdingTimeMs (string · nullable; required), feeInEvent (string · int32; required), fundingInEvent (string · int32; required), rolloverFeeInEvent (string · int32; required), executionFeeRate (string · int32; required), executionFeeInEvent (string · int32; required), executionFee (string · int32; required), timestamp (string · date-time; required), isOnchain (boolean; required), roe (string · int32; required), scalpingCoefficient (string · int32; required), closeReason (string · nullable; required)\n\n- data.[]idx (string · nullable; required)\n\ndata.[]idx example: string\n\ndata.[]idx.Type: string · nullable\n\ndata.[]idx.Position identifier. Same value as `txId`.\n\n- data.[]txId (string · nullable; required)\n\ndata.[]txId example: string\n\ndata.[]txId.Type: string · nullable\n\ndata.[]txId.Position identifier. Kept for backward compatibility, always equal to `idx`.\n\n- data.[]version (number; required)\n\ndata.[]version example: 0\n\ndata.[]version.Type: number\n\ndata.[]version.Revision of the position: incremented by every event applied to it.\n\n- data.[]openedAt (string · date-time; required)\n\ndata.[]openedAt example: 2026-05-01T12:30:00.000Z\n\ndata.[]openedAt.Type: string · date-time\n\ndata.[]openedAt.When the position was opened.\n\ndata.[]openedAt.format: date-time\n\n- data.[]lastUpdatedAt (string · date-time; required)\n\ndata.[]lastUpdatedAt example: 2026-05-01T12:30:00.000Z\n\ndata.[]lastUpdatedAt.Type: string · date-time\n\ndata.[]lastUpdatedAt.When the last event was applied to the position.\n\ndata.[]lastUpdatedAt.format: date-time\n\n- data.[]closedAt (string · date-time · nullable; required)\n\ndata.[]closedAt example: 2026-05-01T12:30:00.000Z\n\ndata.[]closedAt.Type: string · date-time · nullable\n\ndata.[]closedAt.When the position was closed; null while it is still open.\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.Direction of the position. Same value as `direction`.\n\ndata.[]type.Allowed values: [\"long\",\"short\"]\n\n- data.[]status (string · enum; required)\n\ndata.[]status example: opened\n\ndata.[]status.Type: string · enum\n\ndata.[]status.Whether the position is still open, closed by the trader, or liquidated.\n\ndata.[]status.Allowed values: [\"opened\",\"closed\",\"liquidated\"]\n\n- data.[]market (string · uuid; required)\n\ndata.[]market example: 00000000-0000-4000-8000-000000000000\n\ndata.[]market.Type: string · uuid\n\ndata.[]market.Market the position is held on.\n\ndata.[]market.format: uuid\n\ndata.[]market.pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$\n\n- data.[]trader (string · uuid; required)\n\ndata.[]trader example: 00000000-0000-4000-8000-000000000000\n\ndata.[]trader.Type: string · uuid\n\ndata.[]trader.Trader account the position belongs to.\n\ndata.[]trader.format: uuid\n\ndata.[]trader.pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$\n\n- data.[]size (string · int32; required)\n\ndata.[]size example: 1000000000\n\ndata.[]size.Type: string · int32\n\ndata.[]size.Position size in base asset units, fp9 raw.\n\ndata.[]size.format: int32\n\ndata.[]size.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]notional (string · int32; required)\n\ndata.[]notional example: 1000000000\n\ndata.[]notional.Type: string · int32\n\ndata.[]notional.Open notional of the position in quote currency, fp9 raw — size at entry price.\n\ndata.[]notional.format: int32\n\ndata.[]notional.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]fraction (string · int32; required)\n\ndata.[]fraction example: 1000000000\n\ndata.[]fraction.Type: string · int32\n\ndata.[]fraction.Always `0`. Kept for backward compatibility.\n\ndata.[]fraction.format: int32\n\ndata.[]fraction.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]margin (string · int32; required)\n\ndata.[]margin example: 1000000000\n\ndata.[]margin.Type: string · int32\n\ndata.[]margin.Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.\n\ndata.[]margin.format: int32\n\ndata.[]margin.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]pnl (string · int32 · nullable; required)\n\ndata.[]pnl example: 1000000000\n\ndata.[]pnl.Type: string · int32 · nullable\n\ndata.[]pnl.Realised pnl accumulated over every event of the position, fp9 raw.\n\ndata.[]pnl.format: int32\n\ndata.[]pnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]funding (string · int32 · nullable; required)\n\ndata.[]funding example: 1000000000\n\ndata.[]funding.Type: string · int32 · nullable\n\ndata.[]funding.Funding paid (negative) or received (positive) over the life of the position, fp9 raw.\n\ndata.[]funding.format: int32\n\ndata.[]funding.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]rolloverFee (string · int32; required)\n\ndata.[]rolloverFee example: 1000000000\n\ndata.[]rolloverFee.Type: string · int32\n\ndata.[]rolloverFee.Always `0`. Kept for backward compatibility.\n\ndata.[]rolloverFee.format: int32\n\ndata.[]rolloverFee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]settlementOraclePrice (string · int32; required)\n\ndata.[]settlementOraclePrice example: 1000000000\n\ndata.[]settlementOraclePrice.Type: string · int32\n\ndata.[]settlementOraclePrice.Always `1000000000` (1.0). Kept for backward compatibility.\n\ndata.[]settlementOraclePrice.format: int32\n\ndata.[]settlementOraclePrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]fee (string · int32; required)\n\ndata.[]fee example: 1000000000\n\ndata.[]fee.Type: string · int32\n\ndata.[]fee.Trading fees charged over the life of the position, fp9 raw.\n\ndata.[]fee.format: int32\n\ndata.[]fee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]feeRate (string · int32; required)\n\ndata.[]feeRate example: 1000000000\n\ndata.[]feeRate.Type: string · int32\n\ndata.[]feeRate.Fee rate applied to the position, fp9 raw fraction (`1000000` = 0.1%).\n\ndata.[]feeRate.format: int32\n\ndata.[]feeRate.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]exchangedQuote (string · int32; required)\n\ndata.[]exchangedQuote example: 1000000000\n\ndata.[]exchangedQuote.Type: string · int32\n\ndata.[]exchangedQuote.Quote amount exchanged by the most recent event, fp9 raw.\n\ndata.[]exchangedQuote.format: int32\n\ndata.[]exchangedQuote.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]exchangedBase (string · int32; required)\n\ndata.[]exchangedBase example: 1000000000\n\ndata.[]exchangedBase.Type: string · int32\n\ndata.[]exchangedBase.Base amount exchanged by the most recent event, fp9 raw.\n\ndata.[]exchangedBase.format: int32\n\ndata.[]exchangedBase.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]direction (string · enum; required)\n\ndata.[]direction example: long\n\ndata.[]direction.Type: string · enum\n\ndata.[]direction.Direction of the position.\n\ndata.[]direction.Allowed values: [\"long\",\"short\"]\n\n- data.[]eventName (string · enum; required)\n\ndata.[]eventName example: addMargin\n\ndata.[]eventName.Type: string · enum\n\ndata.[]eventName.Type of the most recent event applied to the position.\n\ndata.[]eventName.Allowed values: [\"addMargin\",\"removeMargin\",\"closePosition\",\"increasePosition\",\"liquidate\",\"forceClose\",\"payFunding\"]\n\n- data.[]pnlInEvent (string · int32; required)\n\ndata.[]pnlInEvent example: 1000000000\n\ndata.[]pnlInEvent.Type: string · int32\n\ndata.[]pnlInEvent.Realised pnl of the most recent event, fp9 raw.\n\ndata.[]pnlInEvent.format: int32\n\ndata.[]pnlInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]rawPnlInEvent (string · int32; required)\n\ndata.[]rawPnlInEvent example: 1000000000\n\ndata.[]rawPnlInEvent.Type: string · int32\n\ndata.[]rawPnlInEvent.Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from `pnlInEvent` only when the adjustment fired.\n\ndata.[]rawPnlInEvent.format: int32\n\ndata.[]rawPnlInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]profitAdjustmentApplied (boolean; required)\n\ndata.[]profitAdjustmentApplied example: true\n\ndata.[]profitAdjustmentApplied.Type: boolean\n\ndata.[]profitAdjustmentApplied.Whether the 60-second adjustment capped the profit of the most recent event — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.\n\n- data.[]holdingTimeMs (string · nullable; required)\n\ndata.[]holdingTimeMs example: string\n\ndata.[]holdingTimeMs.Type: string · nullable\n\ndata.[]holdingTimeMs.How long the position was held before the most recent close, in milliseconds, counted from the open or the last increase. Null on events that are not closes.\n\n- data.[]feeInEvent (string · int32; required)\n\ndata.[]feeInEvent example: 1000000000\n\ndata.[]feeInEvent.Type: string · int32\n\ndata.[]feeInEvent.Fee charged by the most recent event, fp9 raw.\n\ndata.[]feeInEvent.format: int32\n\ndata.[]feeInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]fundingInEvent (string · int32; required)\n\ndata.[]fundingInEvent example: 1000000000\n\ndata.[]fundingInEvent.Type: string · int32\n\ndata.[]fundingInEvent.Funding settled by the most recent event, fp9 raw.\n\ndata.[]fundingInEvent.format: int32\n\ndata.[]fundingInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]rolloverFeeInEvent (string · int32; required)\n\ndata.[]rolloverFeeInEvent example: 1000000000\n\ndata.[]rolloverFeeInEvent.Type: string · int32\n\ndata.[]rolloverFeeInEvent.Always `0`. Kept for backward compatibility.\n\ndata.[]rolloverFeeInEvent.format: int32\n\ndata.[]rolloverFeeInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]executionFeeRate (string · int32; required)\n\ndata.[]executionFeeRate example: 1000000000\n\ndata.[]executionFeeRate.Type: string · int32\n\ndata.[]executionFeeRate.Always `0`. Kept for backward compatibility.\n\ndata.[]executionFeeRate.format: int32\n\ndata.[]executionFeeRate.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]executionFeeInEvent (string · int32; required)\n\ndata.[]executionFeeInEvent example: 1000000000\n\ndata.[]executionFeeInEvent.Type: string · int32\n\ndata.[]executionFeeInEvent.Always `0`. Kept for backward compatibility.\n\ndata.[]executionFeeInEvent.format: int32\n\ndata.[]executionFeeInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]executionFee (string · int32; required)\n\ndata.[]executionFee example: 1000000000\n\ndata.[]executionFee.Type: string · int32\n\ndata.[]executionFee.Always `0`. Kept for backward compatibility.\n\ndata.[]executionFee.format: int32\n\ndata.[]executionFee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]timestamp (string · date-time; required)\n\ndata.[]timestamp example: 2026-05-01T12:30:00.000Z\n\ndata.[]timestamp.Type: string · date-time\n\ndata.[]timestamp.Timestamp of the most recent event. Same value as `lastUpdatedAt`.\n\ndata.[]timestamp.format: date-time\n\n- data.[]isOnchain (boolean; required)\n\ndata.[]isOnchain example: true\n\ndata.[]isOnchain.Type: boolean\n\ndata.[]isOnchain.Always `true`. Kept for backward compatibility.\n\n- data.[]roe (string · int32; required)\n\ndata.[]roe example: 1000000000\n\ndata.[]roe.Type: string · int32\n\ndata.[]roe.Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.\n\ndata.[]roe.format: int32\n\ndata.[]roe.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]scalpingCoefficient (string · int32; required)\n\ndata.[]scalpingCoefficient example: 1000000000\n\ndata.[]scalpingCoefficient.Type: string · int32\n\ndata.[]scalpingCoefficient.Dynamic spread multiplier the position was charged, fp9 raw (`1000000000` = 1.0). Above 1 when the trade fell inside the market scalping window.\n\ndata.[]scalpingCoefficient.format: int32\n\ndata.[]scalpingCoefficient.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]closeReason (string · nullable; required)\n\ndata.[]closeReason example: string\n\ndata.[]closeReason.Type: string · nullable\n\ndata.[]closeReason.Why the platform closed the position (for example `weekly_session_risk_close`). Null for positions closed by the trader and for open ones.\n\n- totalCount (number; required)\n\ntotalCount example: 0\n\ntotalCount.Type: number\n\ntotalCount.Total number of positions matching the request, across all pages.\n\nExample\n\n\n\n```json\n{\n  \"data\": [\n    {\n      \"idx\": \"string\",\n      \"txId\": \"string\",\n      \"version\": 0,\n      \"openedAt\": \"2026-05-01T12:30:00.000Z\",\n      \"lastUpdatedAt\": \"2026-05-01T12:30:00.000Z\",\n      \"closedAt\": \"2026-05-01T12:30:00.000Z\",\n      \"type\": \"long\",\n      \"status\": \"opened\",\n      \"market\": \"00000000-0000-4000-8000-000000000000\",\n      \"trader\": \"00000000-0000-4000-8000-000000000000\",\n      \"size\": \"1000000000\",\n      \"notional\": \"1000000000\",\n      \"fraction\": \"1000000000\",\n      \"margin\": \"1000000000\",\n      \"pnl\": \"1000000000\",\n      \"funding\": \"1000000000\",\n      \"rolloverFee\": \"1000000000\",\n      \"settlementOraclePrice\": \"1000000000\",\n      \"fee\": \"1000000000\",\n      \"feeRate\": \"1000000000\",\n      \"exchangedQuote\": \"1000000000\",\n      \"exchangedBase\": \"1000000000\",\n      \"direction\": \"long\",\n      \"eventName\": \"addMargin\",\n      \"pnlInEvent\": \"1000000000\",\n      \"rawPnlInEvent\": \"1000000000\",\n      \"profitAdjustmentApplied\": true,\n      \"holdingTimeMs\": \"string\",\n      \"feeInEvent\": \"1000000000\",\n      \"fundingInEvent\": \"1000000000\",\n      \"rolloverFeeInEvent\": \"1000000000\",\n      \"executionFeeRate\": \"1000000000\",\n      \"executionFeeInEvent\": \"1000000000\",\n      \"executionFee\": \"1000000000\",\n      \"timestamp\": \"2026-05-01T12:30:00.000Z\",\n      \"isOnchain\": true,\n      \"roe\": \"1000000000\",\n      \"scalpingCoefficient\": \"1000000000\",\n      \"closeReason\": \"string\"\n    }\n  ],\n  \"totalCount\": 0\n}\n```","text":"Get positions history by ticker The position history of the account narrowed to one market, newest first and paginated. Same phase rule as the portfolio-wide history. GET /positions/{accountId}/{asset}/history Trading accountId Trader account identifier. Must belong to the caller. string · uuid asset Base asset ticker of the market, as returned by `GET /v2/markets`. string limit Page size: how many records to return. integer offset How many records to skip before the page. integer 401 Unauthorized 403 The account belongs to another user (`account_access_denied`), or the request is authenticated with an API key while `api_trading` is disabled on the account (`api_trading_not_enabled`). 404 No account with this identifier, or no market for this ticker. 429 Rate limit of the API key exceeded (`api_key_rate_limit_exceeded`). `Retry-After` says when to come back; the body carries the bucket (`read` / `write`), the window that tripped, its limit and `retryAt`. default Response data Requested page of positions, newest first. object[] totalCount Total number of positions matching the request, across all pages. number","api":{"title":"Upscale Public API","version":"d796ac9","documentation":"https://docs.upscale.trade/developers","playgroundServer":"https://api.upscale.trade"}}