{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/developers/operations/getpositionevents","title":"Get all events by position","description":"GET /positions/{positionId}/history: What happened to one position, newest first: increases, partial and full closes, liquidation, force close, margin changes.","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/getpositionevents","markdown":"https://docs.upscale.trade/developers/operations/getpositionevents.md","json":"https://docs.upscale.trade/developers/operations/getpositionevents.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/getpositionevents","ru":"https://docs.upscale.trade/ru/developers/operations/getpositionevents","es":"https://docs.upscale.trade/es/developers/operations/getpositionevents"},"operation":{"id":"getPositionEvents","method":"GET","path":"/positions/{positionId}/history","summary":"Get all events by position","description":"What happened to one position, newest first: increases, partial and full closes, liquidation, force close, margin changes.\n\n- Funding payments are left out of this feed.\n- A force close carries the market event behind it, which is where the reason for it lives.","tags":["Trading"],"deprecated":false,"parameters":[{"name":"positionId","location":"path","schema":{"type":"string · uuid","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid"},"properties":[],"variants":[]},"type":"string · uuid","required":true,"description":"Position identifier. Its account must belong to the caller.","example":"00000000-0000-4000-8000-000000000000"}],"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 position with this identifier.","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":[],"schema":{"type":"object[]","types":["array"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"reference":"#/components/schemas/PositionEventResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"idx","type":"string[]","required":true,"description":"Position identifier. Same value as `txId`.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Position identifier. Same value as `txId`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"txId","type":"string[]","required":true,"description":"Position identifier. Kept for backward compatibility, always equal to `idx`.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Position identifier. Kept for backward compatibility, always equal to `idx`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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[]","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":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"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":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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[]","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":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"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":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"order","type":"object · nullable","required":true,"description":"Order that produced this event; null for events the platform raised on its own, such as funding or a force close.","example":"{\n  \"id\": \"00000000-0000-4000-8000-000000000000\",\n  \"txId\": \"string\",\n  \"trader\": \"00000000-0000-4000-8000-000000000000\",\n  \"market\": \"00000000-0000-4000-8000-000000000000\",\n  \"status\": \"active\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"triggerPrice\": \"1000000000\",\n  \"requestedTriggerPrice\": \"1000000000\",\n  \"stopPrice\": \"1000000000\",\n  \"limitPrice\": \"1000000000\",\n  \"stopTriggerPrice\": \"1000000000\",\n  \"takeTriggerPrice\": \"1000000000\",\n  \"trailingStopActivationPrice\": \"1000000000\",\n  \"trailingStopOffset\": \"1000000000\",\n  \"trailingStopOffsetPercent\": \"1000000000\",\n  \"leverage\": \"1000000000\",\n  \"index\": \"string\",\n  \"positionId\": \"string\",\n  \"parentOrderId\": \"string\",\n  \"expiration\": \"2026-05-01T12:30:00.000Z\",\n  \"amount\": \"1000000000\",\n  \"indexPrice\": \"1000000000\",\n  \"settlementOraclePrice\": \"1000000000\",\n  \"createdAt\": \"2026-05-01T12:30:00.000Z\",\n  \"error\": \"string\",\n  \"realizedPnl\": \"1000000000\",\n  \"rawRealizedPnl\": \"1000000000\",\n  \"profitAdjustmentApplied\": true,\n  \"executedAfterPause\": true,\n  \"sizeMode\": \"quote\",\n  \"baseSize\": \"1000000000\",\n  \"reservedAmount\": \"1000000000\",\n  \"errorCode\": \"string\",\n  \"reason\": \"force_close\"\n}","schema":{"type":"object · nullable","types":["object"],"description":"Order that produced this event; null for events the platform raised on its own, such as funding or a force close.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"id","type":"string · uuid","required":true,"description":"Order identifier.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Order identifier.","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":"txId","type":"string","required":true,"description":"Order identifier. Kept for backward compatibility, always equal to `id`.","example":"string","schema":{"type":"string","types":["string"],"description":"Order identifier. Kept for backward compatibility, always equal to `id`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"trader","type":"string · uuid","required":true,"description":"Trader account the order belongs to.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Trader account the order 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":"market","type":"string · uuid","required":true,"description":"Market the order is placed on.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Market the order is placed 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":"status","type":"string · enum","required":true,"description":"Lifecycle state: `active` while it waits, `executed` once filled, `canceled` when cancelled by the trader or the platform, `canceled_by_update` when replaced by an edit, `canceled_by_position` when the position it was attached to went away, `canceled_by_error` when execution failed — see `errorCode`.","example":"active","schema":{"type":"string · enum","types":["string"],"description":"Lifecycle state: `active` while it waits, `executed` once filled, `canceled` when cancelled by the trader or the platform, `canceled_by_update` when replaced by an edit, `canceled_by_position` when the position it was attached to went away, `canceled_by_error` when execution failed — see `errorCode`.","enum":["active","canceled","canceled_by_update","canceled_by_error","canceled_by_position","executed"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"type","type":"string · enum","required":true,"description":"Order type. `liquidation` marks an order the engine raised itself.","example":"market","schema":{"type":"string · enum","types":["string"],"description":"Order type. `liquidation` marks an order the engine raised itself.","enum":["market","limit","stop","trailing_stop","take","stop_limit","stop_market","liquidation"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Order direction.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Order direction.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"triggerPrice","type":"string · int32","required":true,"description":"Price at which the order fires, fp9 raw. `0` when the order carries no trigger.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Price at which the order fires, fp9 raw. `0` when the order carries no trigger.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"requestedTriggerPrice","type":"string · int32 · nullable","required":true,"description":"Trigger price as requested, before the engine pushed it out to the minimum stop distance, fp9 raw. Null when the requested price was kept as is.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Trigger price as requested, before the engine pushed it out to the minimum stop distance, fp9 raw. Null when the requested price was kept as is.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"stopPrice","type":"string · int32","required":true,"description":"Trigger price of a `stop_market` / `stop_limit` order, fp9 raw; `0` for every other type.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Trigger price of a `stop_market` / `stop_limit` order, fp9 raw; `0` for every other type.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"limitPrice","type":"string · int32","required":true,"description":"Price the order is placed at once triggered, fp9 raw: the stop-limit price, falling back to the trigger price.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Price the order is placed at once triggered, fp9 raw: the stop-limit price, falling back to the trigger price.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"stopTriggerPrice","type":"string · int32","required":true,"description":"Stop-loss attached to the order, fp9 raw. `0` when none is attached.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Stop-loss attached to the order, fp9 raw. `0` when none is attached.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"takeTriggerPrice","type":"string · int32","required":true,"description":"Take-profit attached to the order, fp9 raw. `0` when none is attached.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Take-profit attached to the order, fp9 raw. `0` when none is attached.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopActivationPrice","type":"string · int32","required":true,"description":"Price at which a trailing stop starts trailing, fp9 raw. `0` when it trails from creation.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Price at which a trailing stop starts trailing, fp9 raw. `0` when it trails from creation.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopOffset","type":"string · int32","required":true,"description":"Trailing distance as an absolute quote amount, fp9 raw. `0` when the distance is set as a percent.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Trailing distance as an absolute quote amount, fp9 raw. `0` when the distance is set as a percent.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopOffsetPercent","type":"string · int32","required":true,"description":"Trailing distance as a fraction of price, fp9 raw. `0` when the distance is absolute.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Trailing distance as a fraction of price, fp9 raw. `0` when the distance is absolute.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"leverage","type":"string · int32 · nullable","required":true,"description":"Leverage of the order, fp9 raw. Null on close orders, which inherit the leverage of the position.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Leverage of the order, fp9 raw. Null on close orders, which inherit the leverage of the position.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"index","type":"string","required":true,"description":"Order identifier. Kept for backward compatibility, always equal to `id`.","example":"string","schema":{"type":"string","types":["string"],"description":"Order identifier. Kept for backward compatibility, always equal to `id`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"positionId","type":"string · nullable","required":true,"description":"Position a close order is attached to. Null for orders that open or grow a position.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Position a close order is attached to. Null for orders that open or grow a position.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"parentOrderId","type":"string · nullable","required":true,"description":"Order this one was spawned from: a stop or take created out of `stopTriggerPrice` / `takeTriggerPrice`, or the limit order a `stop_limit` turned into. Null when the order was submitted directly.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Order this one was spawned from: a stop or take created out of `stopTriggerPrice` / `takeTriggerPrice`, or the limit order a `stop_limit` turned into. Null when the order was submitted directly.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"expiration","type":"string · date-time · nullable","required":true,"description":"Always null. Kept for backward compatibility — orders do not expire on their own.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time · nullable","types":["string"],"description":"Always null. Kept for backward compatibility — orders do not expire on their own.","example":"2026-05-01T12:30:00.000Z","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"amount","type":"string · int32","required":true,"description":"Size of the order, fp9 raw, in the unit its class uses: on an increase order a quote amount — the reserve while it waits, and what it actually spent once executed; on a close order (`stop`, `take`, `trailing_stop`) the base asset size it closes, as requested at creation.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Size of the order, fp9 raw, in the unit its class uses: on an increase order a quote amount — the reserve while it waits, and what it actually spent once executed; on a close order (`stop`, `take`, `trailing_stop`) the base asset size it closes, as requested at creation.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"indexPrice","type":"string · int32 · nullable","required":true,"description":"Index price the order executed at, fp9 raw. Null while the order has not executed.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Index price the order executed at, fp9 raw. Null while the order has not executed.","example":"1000000000","nullable":true,"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":"createdAt","type":"string · date-time","required":true,"description":"When the order was accepted.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"When the order was accepted.","example":"2026-05-01T12:30:00.000Z","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"error","type":"string · nullable","required":true,"description":"Always null. Kept for backward compatibility — use `errorCode`.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Always null. Kept for backward compatibility — use `errorCode`.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"realizedPnl","type":"string · int32 · nullable","required":true,"description":"Pnl realised by this order, fp9 raw. Set only on an executed close order; null while pending and on orders that open or grow a position.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Pnl realised by this order, fp9 raw. Set only on an executed close order; null while pending and on orders that open or grow a position.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"rawRealizedPnl","type":"string · int32 · nullable","required":true,"description":"Realised pnl before the 60-second adjustment, fp9 raw. Differs from `realizedPnl` only when the adjustment fired.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Realised pnl before the 60-second adjustment, fp9 raw. Differs from `realizedPnl` only when the adjustment fired.","example":"1000000000","nullable":true,"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 this order — 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 this order — 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":"executedAfterPause","type":"boolean","required":true,"description":"Whether the order executed after a market pause. Not set by the current engine — always `false`.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Whether the order executed after a market pause. Not set by the current engine — always `false`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"sizeMode","type":"string · enum","required":true,"description":"How the size was expressed on creation: `quote` sizes the order by `amount`, `base` sizes it by `baseSize`.","example":"quote","schema":{"type":"string · enum","types":["string"],"description":"How the size was expressed on creation: `quote` sizes the order by `amount`, `base` sizes it by `baseSize`.","enum":["quote","base"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"baseSize","type":"string · int32 · nullable","required":true,"description":"Order size in base asset units, fp9 raw. Null for `quote`-sized orders.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Order size in base asset units, fp9 raw. Null for `quote`-sized orders.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"reservedAmount","type":"string · int32 · nullable","required":true,"description":"Quote amount reserved when the order with sizeMode=base was created, fp9 raw. Stays at the original reserve after execution, while `amount` is rewritten to what was spent. Null for `quote`-sized orders, where `amount` is the reserve.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Quote amount reserved when the order with sizeMode=base was created, fp9 raw. Stays at the original reserve after execution, while `amount` is rewritten to what was spent. Null for `quote`-sized orders, where `amount` is the reserve.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"errorCode","type":"string · nullable","required":true,"description":"Why execution failed, set together with status `canceled_by_error` — for example `insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth` or `slippage_tolerance`. Null otherwise.","example":"string","schema":{"type":"string · nullable","types":["string","null"],"description":"Why execution failed, set together with status `canceled_by_error` — for example `insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth` or `slippage_tolerance`. Null otherwise.","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"reason","type":"string · enum · nullable","required":true,"description":"Why the platform cancelled the order itself, for example `force_close` or `weekly_session_risk_close`. Null for trader-driven cancellations.","example":"force_close","schema":{"type":"string · enum · nullable","types":["string"],"description":"Why the platform cancelled the order itself, for example `force_close` or `weekly_session_risk_close`. Null for trader-driven cancellations.","enum":["force_close","stop_accounts_fail","stop_accounts_freeze","stop_accounts_promote","stop_accounts_manual","weekly_session_risk_close",null],"nullable":true,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]}}],"variants":[]},"variants":[]},"example":"[\n  {\n    \"idx\": [\n      \"string\"\n    ],\n    \"txId\": [\n      \"string\"\n    ],\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\": [\n      \"string\"\n    ],\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\": [\n      \"string\"\n    ],\n    \"order\": {\n      \"id\": \"00000000-0000-4000-8000-000000000000\",\n      \"txId\": \"string\",\n      \"trader\": \"00000000-0000-4000-8000-000000000000\",\n      \"market\": \"00000000-0000-4000-8000-000000000000\",\n      \"status\": \"active\",\n      \"type\": \"market\",\n      \"direction\": \"long\",\n      \"triggerPrice\": \"1000000000\",\n      \"requestedTriggerPrice\": \"1000000000\",\n      \"stopPrice\": \"1000000000\",\n      \"limitPrice\": \"1000000000\",\n      \"stopTriggerPrice\": \"1000000000\",\n      \"takeTriggerPrice\": \"1000000000\",\n      \"trailingStopActivationPrice\": \"1000000000\",\n      \"trailingStopOffset\": \"1000000000\",\n      \"trailingStopOffsetPercent\": \"1000000000\",\n      \"leverage\": \"1000000000\",\n      \"index\": \"string\",\n      \"positionId\": \"string\",\n      \"parentOrderId\": \"string\",\n      \"expiration\": \"2026-05-01T12:30:00.000Z\",\n      \"amount\": \"1000000000\",\n      \"indexPrice\": \"1000000000\",\n      \"settlementOraclePrice\": \"1000000000\",\n      \"createdAt\": \"2026-05-01T12:30:00.000Z\",\n      \"error\": \"string\",\n      \"realizedPnl\": \"1000000000\",\n      \"rawRealizedPnl\": \"1000000000\",\n      \"profitAdjustmentApplied\": true,\n      \"executedAfterPause\": true,\n      \"sizeMode\": \"quote\",\n      \"baseSize\": \"1000000000\",\n      \"reservedAmount\": \"1000000000\",\n      \"errorCode\": \"string\",\n      \"reason\": \"force_close\"\n    }\n  }\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/{positionId}/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/{positionId}/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/{positionId}/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 all events by position","url":"https://docs.upscale.trade/developers/operations/getpositionevents"}],"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 all events by position\n\n`GET /positions/{positionId}/history`\n\nWhat happened to one position, newest first: increases, partial and full closes, liquidation, force close, margin changes.\n\n- Funding payments are left out of this feed.\n- A force close carries the market event behind it, which is where the reason for it lives.\n\n## Authorization\n\nbearer: http · bearer (required). Personal API key, prefixed with `usk_`.\n\n## Parameters\n\n- path: positionId (string · uuid; required). Position identifier. Its account must belong to the caller.\n\nType: string · uuid\n\nformat: uuid\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.upscale.trade/positions/{positionId}/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/{positionId}/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/{positionId}/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 position with this identifier.\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 · PositionEventResponse\n\n**default** application/json — Response\n\nType: object[]\n\n[]Schema: PositionEventResponse\n\n[]Type: object\n\n[]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, order\n\n[]Required field types: idx (string[]; required), txId (string[]; 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[]; 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[]; required), order (object · nullable; required)\n\n- []idx (string[]; required)\n\n[]idx example: [\n  \"string\"\n]\n\n[]idx.Type: string[]\n\n[]idx.Position identifier. Same value as `txId`.\n\n[]idx.[]Type: string\n\n- []txId (string[]; required)\n\n[]txId example: [\n  \"string\"\n]\n\n[]txId.Type: string[]\n\n[]txId.Position identifier. Kept for backward compatibility, always equal to `idx`.\n\n[]txId.[]Type: string\n\n- []version (number; required)\n\n[]version example: 0\n\n[]version.Type: number\n\n[]version.Revision of the position: incremented by every event applied to it.\n\n- []openedAt (string · date-time; required)\n\n[]openedAt example: 2026-05-01T12:30:00.000Z\n\n[]openedAt.Type: string · date-time\n\n[]openedAt.When the position was opened.\n\n[]openedAt.format: date-time\n\n- []lastUpdatedAt (string · date-time; required)\n\n[]lastUpdatedAt example: 2026-05-01T12:30:00.000Z\n\n[]lastUpdatedAt.Type: string · date-time\n\n[]lastUpdatedAt.When the last event was applied to the position.\n\n[]lastUpdatedAt.format: date-time\n\n- []closedAt (string · date-time · nullable; required)\n\n[]closedAt example: 2026-05-01T12:30:00.000Z\n\n[]closedAt.Type: string · date-time · nullable\n\n[]closedAt.When the position was closed; null while it is still open.\n\n[]closedAt.format: date-time\n\n- []type (string · enum; required)\n\n[]type example: long\n\n[]type.Type: string · enum\n\n[]type.Direction of the position. Same value as `direction`.\n\n[]type.Allowed values: [\"long\",\"short\"]\n\n- []status (string · enum; required)\n\n[]status example: opened\n\n[]status.Type: string · enum\n\n[]status.Whether the position is still open, closed by the trader, or liquidated.\n\n[]status.Allowed values: [\"opened\",\"closed\",\"liquidated\"]\n\n- []market (string · uuid; required)\n\n[]market example: 00000000-0000-4000-8000-000000000000\n\n[]market.Type: string · uuid\n\n[]market.Market the position is held on.\n\n[]market.format: uuid\n\n[]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- []trader (string · uuid; required)\n\n[]trader example: 00000000-0000-4000-8000-000000000000\n\n[]trader.Type: string · uuid\n\n[]trader.Trader account the position belongs to.\n\n[]trader.format: uuid\n\n[]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- []size (string · int32; required)\n\n[]size example: 1000000000\n\n[]size.Type: string · int32\n\n[]size.Position size in base asset units, fp9 raw.\n\n[]size.format: int32\n\n[]size.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []notional (string · int32; required)\n\n[]notional example: 1000000000\n\n[]notional.Type: string · int32\n\n[]notional.Open notional of the position in quote currency, fp9 raw — size at entry price.\n\n[]notional.format: int32\n\n[]notional.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []fraction (string · int32; required)\n\n[]fraction example: 1000000000\n\n[]fraction.Type: string · int32\n\n[]fraction.Always `0`. Kept for backward compatibility.\n\n[]fraction.format: int32\n\n[]fraction.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []margin (string · int32; required)\n\n[]margin example: 1000000000\n\n[]margin.Type: string · int32\n\n[]margin.Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.\n\n[]margin.format: int32\n\n[]margin.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []pnl (string · int32 · nullable; required)\n\n[]pnl example: 1000000000\n\n[]pnl.Type: string · int32 · nullable\n\n[]pnl.Realised pnl accumulated over every event of the position, fp9 raw.\n\n[]pnl.format: int32\n\n[]pnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []funding (string · int32 · nullable; required)\n\n[]funding example: 1000000000\n\n[]funding.Type: string · int32 · nullable\n\n[]funding.Funding paid (negative) or received (positive) over the life of the position, fp9 raw.\n\n[]funding.format: int32\n\n[]funding.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []rolloverFee (string · int32; required)\n\n[]rolloverFee example: 1000000000\n\n[]rolloverFee.Type: string · int32\n\n[]rolloverFee.Always `0`. Kept for backward compatibility.\n\n[]rolloverFee.format: int32\n\n[]rolloverFee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []settlementOraclePrice (string · int32; required)\n\n[]settlementOraclePrice example: 1000000000\n\n[]settlementOraclePrice.Type: string · int32\n\n[]settlementOraclePrice.Always `1000000000` (1.0). Kept for backward compatibility.\n\n[]settlementOraclePrice.format: int32\n\n[]settlementOraclePrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []fee (string · int32; required)\n\n[]fee example: 1000000000\n\n[]fee.Type: string · int32\n\n[]fee.Trading fees charged over the life of the position, fp9 raw.\n\n[]fee.format: int32\n\n[]fee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []feeRate (string · int32; required)\n\n[]feeRate example: 1000000000\n\n[]feeRate.Type: string · int32\n\n[]feeRate.Fee rate applied to the position, fp9 raw fraction (`1000000` = 0.1%).\n\n[]feeRate.format: int32\n\n[]feeRate.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []exchangedQuote (string · int32; required)\n\n[]exchangedQuote example: 1000000000\n\n[]exchangedQuote.Type: string · int32\n\n[]exchangedQuote.Quote amount exchanged by the most recent event, fp9 raw.\n\n[]exchangedQuote.format: int32\n\n[]exchangedQuote.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []exchangedBase (string · int32; required)\n\n[]exchangedBase example: 1000000000\n\n[]exchangedBase.Type: string · int32\n\n[]exchangedBase.Base amount exchanged by the most recent event, fp9 raw.\n\n[]exchangedBase.format: int32\n\n[]exchangedBase.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []direction (string · enum; required)\n\n[]direction example: long\n\n[]direction.Type: string · enum\n\n[]direction.Direction of the position.\n\n[]direction.Allowed values: [\"long\",\"short\"]\n\n- []eventName (string · enum; required)\n\n[]eventName example: addMargin\n\n[]eventName.Type: string · enum\n\n[]eventName.Type of the most recent event applied to the position.\n\n[]eventName.Allowed values: [\"addMargin\",\"removeMargin\",\"closePosition\",\"increasePosition\",\"liquidate\",\"forceClose\",\"payFunding\"]\n\n- []pnlInEvent (string · int32; required)\n\n[]pnlInEvent example: 1000000000\n\n[]pnlInEvent.Type: string · int32\n\n[]pnlInEvent.Realised pnl of the most recent event, fp9 raw.\n\n[]pnlInEvent.format: int32\n\n[]pnlInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []rawPnlInEvent (string · int32; required)\n\n[]rawPnlInEvent example: 1000000000\n\n[]rawPnlInEvent.Type: string · int32\n\n[]rawPnlInEvent.Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from `pnlInEvent` only when the adjustment fired.\n\n[]rawPnlInEvent.format: int32\n\n[]rawPnlInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []profitAdjustmentApplied (boolean; required)\n\n[]profitAdjustmentApplied example: true\n\n[]profitAdjustmentApplied.Type: boolean\n\n[]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- []holdingTimeMs (string[]; required)\n\n[]holdingTimeMs example: [\n  \"string\"\n]\n\n[]holdingTimeMs.Type: string[]\n\n[]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[]holdingTimeMs.[]Type: string\n\n- []feeInEvent (string · int32; required)\n\n[]feeInEvent example: 1000000000\n\n[]feeInEvent.Type: string · int32\n\n[]feeInEvent.Fee charged by the most recent event, fp9 raw.\n\n[]feeInEvent.format: int32\n\n[]feeInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []fundingInEvent (string · int32; required)\n\n[]fundingInEvent example: 1000000000\n\n[]fundingInEvent.Type: string · int32\n\n[]fundingInEvent.Funding settled by the most recent event, fp9 raw.\n\n[]fundingInEvent.format: int32\n\n[]fundingInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []rolloverFeeInEvent (string · int32; required)\n\n[]rolloverFeeInEvent example: 1000000000\n\n[]rolloverFeeInEvent.Type: string · int32\n\n[]rolloverFeeInEvent.Always `0`. Kept for backward compatibility.\n\n[]rolloverFeeInEvent.format: int32\n\n[]rolloverFeeInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []executionFeeRate (string · int32; required)\n\n[]executionFeeRate example: 1000000000\n\n[]executionFeeRate.Type: string · int32\n\n[]executionFeeRate.Always `0`. Kept for backward compatibility.\n\n[]executionFeeRate.format: int32\n\n[]executionFeeRate.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []executionFeeInEvent (string · int32; required)\n\n[]executionFeeInEvent example: 1000000000\n\n[]executionFeeInEvent.Type: string · int32\n\n[]executionFeeInEvent.Always `0`. Kept for backward compatibility.\n\n[]executionFeeInEvent.format: int32\n\n[]executionFeeInEvent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []executionFee (string · int32; required)\n\n[]executionFee example: 1000000000\n\n[]executionFee.Type: string · int32\n\n[]executionFee.Always `0`. Kept for backward compatibility.\n\n[]executionFee.format: int32\n\n[]executionFee.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []timestamp (string · date-time; required)\n\n[]timestamp example: 2026-05-01T12:30:00.000Z\n\n[]timestamp.Type: string · date-time\n\n[]timestamp.Timestamp of the most recent event. Same value as `lastUpdatedAt`.\n\n[]timestamp.format: date-time\n\n- []isOnchain (boolean; required)\n\n[]isOnchain example: true\n\n[]isOnchain.Type: boolean\n\n[]isOnchain.Always `true`. Kept for backward compatibility.\n\n- []roe (string · int32; required)\n\n[]roe example: 1000000000\n\n[]roe.Type: string · int32\n\n[]roe.Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.\n\n[]roe.format: int32\n\n[]roe.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []scalpingCoefficient (string · int32; required)\n\n[]scalpingCoefficient example: 1000000000\n\n[]scalpingCoefficient.Type: string · int32\n\n[]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\n[]scalpingCoefficient.format: int32\n\n[]scalpingCoefficient.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []closeReason (string[]; required)\n\n[]closeReason example: [\n  \"string\"\n]\n\n[]closeReason.Type: string[]\n\n[]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[]closeReason.[]Type: string\n\n- []order (object · nullable; required)\n\n[]order example: {\n  \"id\": \"00000000-0000-4000-8000-000000000000\",\n  \"txId\": \"string\",\n  \"trader\": \"00000000-0000-4000-8000-000000000000\",\n  \"market\": \"00000000-0000-4000-8000-000000000000\",\n  \"status\": \"active\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"triggerPrice\": \"1000000000\",\n  \"requestedTriggerPrice\": \"1000000000\",\n  \"stopPrice\": \"1000000000\",\n  \"limitPrice\": \"1000000000\",\n  \"stopTriggerPrice\": \"1000000000\",\n  \"takeTriggerPrice\": \"1000000000\",\n  \"trailingStopActivationPrice\": \"1000000000\",\n  \"trailingStopOffset\": \"1000000000\",\n  \"trailingStopOffsetPercent\": \"1000000000\",\n  \"leverage\": \"1000000000\",\n  \"index\": \"string\",\n  \"positionId\": \"string\",\n  \"parentOrderId\": \"string\",\n  \"expiration\": \"2026-05-01T12:30:00.000Z\",\n  \"amount\": \"1000000000\",\n  \"indexPrice\": \"1000000000\",\n  \"settlementOraclePrice\": \"1000000000\",\n  \"createdAt\": \"2026-05-01T12:30:00.000Z\",\n  \"error\": \"string\",\n  \"realizedPnl\": \"1000000000\",\n  \"rawRealizedPnl\": \"1000000000\",\n  \"profitAdjustmentApplied\": true,\n  \"executedAfterPause\": true,\n  \"sizeMode\": \"quote\",\n  \"baseSize\": \"1000000000\",\n  \"reservedAmount\": \"1000000000\",\n  \"errorCode\": \"string\",\n  \"reason\": \"force_close\"\n}\n\n[]order.Type: object · nullable\n\n[]order.Required fields: id, txId, trader, market, status, type, direction, triggerPrice, requestedTriggerPrice, stopPrice, limitPrice, stopTriggerPrice, takeTriggerPrice, trailingStopActivationPrice, trailingStopOffset, trailingStopOffsetPercent, leverage, index, positionId, parentOrderId, expiration, amount, indexPrice, settlementOraclePrice, createdAt, error, realizedPnl, rawRealizedPnl, profitAdjustmentApplied, executedAfterPause, sizeMode, baseSize, reservedAmount, errorCode, reason\n\n[]order.Required field types: id (string · uuid; required), txId (string; required), trader (string · uuid; required), market (string · uuid; required), status (string · enum; required), type (string · enum; required), direction (string · enum; required), triggerPrice (string · int32; required), requestedTriggerPrice (string · int32 · nullable; required), stopPrice (string · int32; required), limitPrice (string · int32; required), stopTriggerPrice (string · int32; required), takeTriggerPrice (string · int32; required), trailingStopActivationPrice (string · int32; required), trailingStopOffset (string · int32; required), trailingStopOffsetPercent (string · int32; required), leverage (string · int32 · nullable; required), index (string; required), positionId (string · nullable; required), parentOrderId (string · nullable; required), expiration (string · date-time · nullable; required), amount (string · int32; required), indexPrice (string · int32 · nullable; required), settlementOraclePrice (string · int32; required), createdAt (string · date-time; required), error (string · nullable; required), realizedPnl (string · int32 · nullable; required), rawRealizedPnl (string · int32 · nullable; required), profitAdjustmentApplied (boolean; required), executedAfterPause (boolean; required), sizeMode (string · enum; required), baseSize (string · int32 · nullable; required), reservedAmount (string · int32 · nullable; required), errorCode (string · nullable; required), reason (string · enum · nullable; required)\n\n[]order.Order that produced this event; null for events the platform raised on its own, such as funding or a force close.\n\n- []order.id (string · uuid; required)\n\n[]order.id example: 00000000-0000-4000-8000-000000000000\n\n[]order.id.Type: string · uuid\n\n[]order.id.Order identifier.\n\n[]order.id.format: uuid\n\n[]order.id.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- []order.txId (string; required)\n\n[]order.txId example: string\n\n[]order.txId.Type: string\n\n[]order.txId.Order identifier. Kept for backward compatibility, always equal to `id`.\n\n- []order.trader (string · uuid; required)\n\n[]order.trader example: 00000000-0000-4000-8000-000000000000\n\n[]order.trader.Type: string · uuid\n\n[]order.trader.Trader account the order belongs to.\n\n[]order.trader.format: uuid\n\n[]order.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- []order.market (string · uuid; required)\n\n[]order.market example: 00000000-0000-4000-8000-000000000000\n\n[]order.market.Type: string · uuid\n\n[]order.market.Market the order is placed on.\n\n[]order.market.format: uuid\n\n[]order.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- []order.status (string · enum; required)\n\n[]order.status example: active\n\n[]order.status.Type: string · enum\n\n[]order.status.Lifecycle state: `active` while it waits, `executed` once filled, `canceled` when cancelled by the trader or the platform, `canceled_by_update` when replaced by an edit, `canceled_by_position` when the position it was attached to went away, `canceled_by_error` when execution failed — see `errorCode`.\n\n[]order.status.Allowed values: [\"active\",\"canceled\",\"canceled_by_update\",\"canceled_by_error\",\"canceled_by_position\",\"executed\"]\n\n- []order.type (string · enum; required)\n\n[]order.type example: market\n\n[]order.type.Type: string · enum\n\n[]order.type.Order type. `liquidation` marks an order the engine raised itself.\n\n[]order.type.Allowed values: [\"market\",\"limit\",\"stop\",\"trailing_stop\",\"take\",\"stop_limit\",\"stop_market\",\"liquidation\"]\n\n- []order.direction (string · enum; required)\n\n[]order.direction example: long\n\n[]order.direction.Type: string · enum\n\n[]order.direction.Order direction.\n\n[]order.direction.Allowed values: [\"long\",\"short\"]\n\n- []order.triggerPrice (string · int32; required)\n\n[]order.triggerPrice example: 1000000000\n\n[]order.triggerPrice.Type: string · int32\n\n[]order.triggerPrice.Price at which the order fires, fp9 raw. `0` when the order carries no trigger.\n\n[]order.triggerPrice.format: int32\n\n[]order.triggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.requestedTriggerPrice (string · int32 · nullable; required)\n\n[]order.requestedTriggerPrice example: 1000000000\n\n[]order.requestedTriggerPrice.Type: string · int32 · nullable\n\n[]order.requestedTriggerPrice.Trigger price as requested, before the engine pushed it out to the minimum stop distance, fp9 raw. Null when the requested price was kept as is.\n\n[]order.requestedTriggerPrice.format: int32\n\n[]order.requestedTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.stopPrice (string · int32; required)\n\n[]order.stopPrice example: 1000000000\n\n[]order.stopPrice.Type: string · int32\n\n[]order.stopPrice.Trigger price of a `stop_market` / `stop_limit` order, fp9 raw; `0` for every other type.\n\n[]order.stopPrice.format: int32\n\n[]order.stopPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.limitPrice (string · int32; required)\n\n[]order.limitPrice example: 1000000000\n\n[]order.limitPrice.Type: string · int32\n\n[]order.limitPrice.Price the order is placed at once triggered, fp9 raw: the stop-limit price, falling back to the trigger price.\n\n[]order.limitPrice.format: int32\n\n[]order.limitPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.stopTriggerPrice (string · int32; required)\n\n[]order.stopTriggerPrice example: 1000000000\n\n[]order.stopTriggerPrice.Type: string · int32\n\n[]order.stopTriggerPrice.Stop-loss attached to the order, fp9 raw. `0` when none is attached.\n\n[]order.stopTriggerPrice.format: int32\n\n[]order.stopTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.takeTriggerPrice (string · int32; required)\n\n[]order.takeTriggerPrice example: 1000000000\n\n[]order.takeTriggerPrice.Type: string · int32\n\n[]order.takeTriggerPrice.Take-profit attached to the order, fp9 raw. `0` when none is attached.\n\n[]order.takeTriggerPrice.format: int32\n\n[]order.takeTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.trailingStopActivationPrice (string · int32; required)\n\n[]order.trailingStopActivationPrice example: 1000000000\n\n[]order.trailingStopActivationPrice.Type: string · int32\n\n[]order.trailingStopActivationPrice.Price at which a trailing stop starts trailing, fp9 raw. `0` when it trails from creation.\n\n[]order.trailingStopActivationPrice.format: int32\n\n[]order.trailingStopActivationPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.trailingStopOffset (string · int32; required)\n\n[]order.trailingStopOffset example: 1000000000\n\n[]order.trailingStopOffset.Type: string · int32\n\n[]order.trailingStopOffset.Trailing distance as an absolute quote amount, fp9 raw. `0` when the distance is set as a percent.\n\n[]order.trailingStopOffset.format: int32\n\n[]order.trailingStopOffset.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.trailingStopOffsetPercent (string · int32; required)\n\n[]order.trailingStopOffsetPercent example: 1000000000\n\n[]order.trailingStopOffsetPercent.Type: string · int32\n\n[]order.trailingStopOffsetPercent.Trailing distance as a fraction of price, fp9 raw. `0` when the distance is absolute.\n\n[]order.trailingStopOffsetPercent.format: int32\n\n[]order.trailingStopOffsetPercent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.leverage (string · int32 · nullable; required)\n\n[]order.leverage example: 1000000000\n\n[]order.leverage.Type: string · int32 · nullable\n\n[]order.leverage.Leverage of the order, fp9 raw. Null on close orders, which inherit the leverage of the position.\n\n[]order.leverage.format: int32\n\n[]order.leverage.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.index (string; required)\n\n[]order.index example: string\n\n[]order.index.Type: string\n\n[]order.index.Order identifier. Kept for backward compatibility, always equal to `id`.\n\n- []order.positionId (string · nullable; required)\n\n[]order.positionId example: string\n\n[]order.positionId.Type: string · nullable\n\n[]order.positionId.Position a close order is attached to. Null for orders that open or grow a position.\n\n- []order.parentOrderId (string · nullable; required)\n\n[]order.parentOrderId example: string\n\n[]order.parentOrderId.Type: string · nullable\n\n[]order.parentOrderId.Order this one was spawned from: a stop or take created out of `stopTriggerPrice` / `takeTriggerPrice`, or the limit order a `stop_limit` turned into. Null when the order was submitted directly.\n\n- []order.expiration (string · date-time · nullable; required)\n\n[]order.expiration example: 2026-05-01T12:30:00.000Z\n\n[]order.expiration.Type: string · date-time · nullable\n\n[]order.expiration.Always null. Kept for backward compatibility — orders do not expire on their own.\n\n[]order.expiration.format: date-time\n\n- []order.amount (string · int32; required)\n\n[]order.amount example: 1000000000\n\n[]order.amount.Type: string · int32\n\n[]order.amount.Size of the order, fp9 raw, in the unit its class uses: on an increase order a quote amount — the reserve while it waits, and what it actually spent once executed; on a close order (`stop`, `take`, `trailing_stop`) the base asset size it closes, as requested at creation.\n\n[]order.amount.format: int32\n\n[]order.amount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.indexPrice (string · int32 · nullable; required)\n\n[]order.indexPrice example: 1000000000\n\n[]order.indexPrice.Type: string · int32 · nullable\n\n[]order.indexPrice.Index price the order executed at, fp9 raw. Null while the order has not executed.\n\n[]order.indexPrice.format: int32\n\n[]order.indexPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.settlementOraclePrice (string · int32; required)\n\n[]order.settlementOraclePrice example: 1000000000\n\n[]order.settlementOraclePrice.Type: string · int32\n\n[]order.settlementOraclePrice.Always `1000000000` (1.0). Kept for backward compatibility.\n\n[]order.settlementOraclePrice.format: int32\n\n[]order.settlementOraclePrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.createdAt (string · date-time; required)\n\n[]order.createdAt example: 2026-05-01T12:30:00.000Z\n\n[]order.createdAt.Type: string · date-time\n\n[]order.createdAt.When the order was accepted.\n\n[]order.createdAt.format: date-time\n\n- []order.error (string · nullable; required)\n\n[]order.error example: string\n\n[]order.error.Type: string · nullable\n\n[]order.error.Always null. Kept for backward compatibility — use `errorCode`.\n\n- []order.realizedPnl (string · int32 · nullable; required)\n\n[]order.realizedPnl example: 1000000000\n\n[]order.realizedPnl.Type: string · int32 · nullable\n\n[]order.realizedPnl.Pnl realised by this order, fp9 raw. Set only on an executed close order; null while pending and on orders that open or grow a position.\n\n[]order.realizedPnl.format: int32\n\n[]order.realizedPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.rawRealizedPnl (string · int32 · nullable; required)\n\n[]order.rawRealizedPnl example: 1000000000\n\n[]order.rawRealizedPnl.Type: string · int32 · nullable\n\n[]order.rawRealizedPnl.Realised pnl before the 60-second adjustment, fp9 raw. Differs from `realizedPnl` only when the adjustment fired.\n\n[]order.rawRealizedPnl.format: int32\n\n[]order.rawRealizedPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.profitAdjustmentApplied (boolean; required)\n\n[]order.profitAdjustmentApplied example: true\n\n[]order.profitAdjustmentApplied.Type: boolean\n\n[]order.profitAdjustmentApplied.Whether the 60-second adjustment capped the profit of this order — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.\n\n- []order.executedAfterPause (boolean; required)\n\n[]order.executedAfterPause example: true\n\n[]order.executedAfterPause.Type: boolean\n\n[]order.executedAfterPause.Whether the order executed after a market pause. Not set by the current engine — always `false`.\n\n- []order.sizeMode (string · enum; required)\n\n[]order.sizeMode example: quote\n\n[]order.sizeMode.Type: string · enum\n\n[]order.sizeMode.How the size was expressed on creation: `quote` sizes the order by `amount`, `base` sizes it by `baseSize`.\n\n[]order.sizeMode.Allowed values: [\"quote\",\"base\"]\n\n- []order.baseSize (string · int32 · nullable; required)\n\n[]order.baseSize example: 1000000000\n\n[]order.baseSize.Type: string · int32 · nullable\n\n[]order.baseSize.Order size in base asset units, fp9 raw. Null for `quote`-sized orders.\n\n[]order.baseSize.format: int32\n\n[]order.baseSize.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.reservedAmount (string · int32 · nullable; required)\n\n[]order.reservedAmount example: 1000000000\n\n[]order.reservedAmount.Type: string · int32 · nullable\n\n[]order.reservedAmount.Quote amount reserved when the order with sizeMode=base was created, fp9 raw. Stays at the original reserve after execution, while `amount` is rewritten to what was spent. Null for `quote`-sized orders, where `amount` is the reserve.\n\n[]order.reservedAmount.format: int32\n\n[]order.reservedAmount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- []order.errorCode (string · nullable; required)\n\n[]order.errorCode example: string\n\n[]order.errorCode.Type: string · nullable\n\n[]order.errorCode.Why execution failed, set together with status `canceled_by_error` — for example `insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth` or `slippage_tolerance`. Null otherwise.\n\n- []order.reason (string · enum · nullable; required)\n\n[]order.reason example: force_close\n\n[]order.reason.Type: string · enum · nullable\n\n[]order.reason.Why the platform cancelled the order itself, for example `force_close` or `weekly_session_risk_close`. Null for trader-driven cancellations.\n\n[]order.reason.Allowed values: [\"force_close\",\"stop_accounts_fail\",\"stop_accounts_freeze\",\"stop_accounts_promote\",\"stop_accounts_manual\",\"weekly_session_risk_close\",null]\n\nExample\n\n\n\n```json\n[\n  {\n    \"idx\": [\n      \"string\"\n    ],\n    \"txId\": [\n      \"string\"\n    ],\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\": [\n      \"string\"\n    ],\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\": [\n      \"string\"\n    ],\n    \"order\": {\n      \"id\": \"00000000-0000-4000-8000-000000000000\",\n      \"txId\": \"string\",\n      \"trader\": \"00000000-0000-4000-8000-000000000000\",\n      \"market\": \"00000000-0000-4000-8000-000000000000\",\n      \"status\": \"active\",\n      \"type\": \"market\",\n      \"direction\": \"long\",\n      \"triggerPrice\": \"1000000000\",\n      \"requestedTriggerPrice\": \"1000000000\",\n      \"stopPrice\": \"1000000000\",\n      \"limitPrice\": \"1000000000\",\n      \"stopTriggerPrice\": \"1000000000\",\n      \"takeTriggerPrice\": \"1000000000\",\n      \"trailingStopActivationPrice\": \"1000000000\",\n      \"trailingStopOffset\": \"1000000000\",\n      \"trailingStopOffsetPercent\": \"1000000000\",\n      \"leverage\": \"1000000000\",\n      \"index\": \"string\",\n      \"positionId\": \"string\",\n      \"parentOrderId\": \"string\",\n      \"expiration\": \"2026-05-01T12:30:00.000Z\",\n      \"amount\": \"1000000000\",\n      \"indexPrice\": \"1000000000\",\n      \"settlementOraclePrice\": \"1000000000\",\n      \"createdAt\": \"2026-05-01T12:30:00.000Z\",\n      \"error\": \"string\",\n      \"realizedPnl\": \"1000000000\",\n      \"rawRealizedPnl\": \"1000000000\",\n      \"profitAdjustmentApplied\": true,\n      \"executedAfterPause\": true,\n      \"sizeMode\": \"quote\",\n      \"baseSize\": \"1000000000\",\n      \"reservedAmount\": \"1000000000\",\n      \"errorCode\": \"string\",\n      \"reason\": \"force_close\"\n    }\n  }\n]\n```","text":"Get all events by position What happened to one position, newest first: increases, partial and full closes, liquidation, force close, margin changes. - Funding payments are left out of this feed. - A force close carries the market event behind it, which is where the reason for it lives. GET /positions/{positionId}/history Trading positionId Position identifier. Its account must belong to the caller. string · uuid 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 position with this identifier. 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","api":{"title":"Upscale Public API","version":"d796ac9","documentation":"https://docs.upscale.trade/developers","playgroundServer":"https://api.upscale.trade"}}