{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/developers/operations/updateorder","title":"Change order trigger price","description":"PATCH /orders/{orderId}: Edits a pending order: trigger price, reserved amount, slippage tolerance, or base size.","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/updateorder","markdown":"https://docs.upscale.trade/developers/operations/updateorder.md","json":"https://docs.upscale.trade/developers/operations/updateorder.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/updateorder","ru":"https://docs.upscale.trade/ru/developers/operations/updateorder","es":"https://docs.upscale.trade/es/developers/operations/updateorder"},"operation":{"id":"updateOrder","method":"PATCH","path":"/orders/{orderId}","summary":"Change order trigger price","description":"Edits a pending order: trigger price, reserved `amount`, slippage tolerance, or base size. The engine does this by replacing the order, so the\nresponse carries a **new order with a new identifier**, while the previous one ends up as `canceled_by_update`.\n\nChecked beyond the schema:\n\n- The order must exist and still be `active`, and its account must belong to the caller and be in a trading status.\n- `market` and `liquidation` orders cannot be edited at all, nor can a `stop` / `take` order that was created without a trigger price\n  (`order_not_updatable`); a trigger price that is set cannot be reset to `0` (`trigger_price_reset_forbidden`).\n- Growing the reserve of an increase order requires the difference as free balance, and is refused while the account is locked by the managed capital limit.\n- An order created with `sizeMode: base` needs a fresh `amount` whenever `baseSize` changes (`base_size_requires_amount`).\n- The market must be open, and the resulting order is re-checked exactly as on creation — the same field-shape, trigger-price and notional\n  codes listed on `POST /orders` apply here, except `invalid_leverage`: leverage cannot be edited.\n\nA request that sets none of the fields changes nothing and returns the order as it stands.","tags":["Trading"],"deprecated":false,"parameters":[{"name":"orderId","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":"Identifier of the order to edit.","example":"00000000-0000-4000-8000-000000000000"}],"bodies":[{"mediaType":"application/json","required":true,"properties":[{"name":"triggerPrice","type":"string · int32","required":false,"description":"New trigger price, fp9 raw. Bounds are re-checked against the current market price (and, for `stop` / `take`, against the liquidation price of the position). A trigger price that is already set cannot be reset to `0`.","example":"65000000000000","schema":{"type":"string · int32","types":["string"],"description":"New trigger price, fp9 raw. Bounds are re-checked against the current market price (and, for `stop` / `take`, against the liquidation price of the position). A trigger price that is already set cannot be reset to `0`.","example":"65000000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"amount","type":"string · int32","required":false,"description":"New `amount`, fp9 raw, in the unit its order class uses — see the same field on order creation. On an increase order it is the quote reserve: growing it requires the difference to be available as free balance, and it is required together with `baseSize` on a `base`-sized order. On a close order it is the base asset size of the position to close.","example":"100000000000","schema":{"type":"string · int32","types":["string"],"description":"New `amount`, fp9 raw, in the unit its order class uses — see the same field on order creation. On an increase order it is the quote reserve: growing it requires the difference to be available as free balance, and it is required together with `baseSize` on a `base`-sized order. On a close order it is the base asset size of the position to close.","example":"100000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"expectedAmount","type":"string · int32","required":false,"description":"New slippage tolerance, fp9 raw. See the same field on order creation.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"New slippage tolerance, fp9 raw. See the same field on order creation.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"baseSize","type":"string · int32","required":false,"description":"New size in base asset units, fp9 raw. Only for orders created with `sizeMode: base`.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"New size in base asset units, fp9 raw. Only for orders created with `sizeMode: base`.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/OrderUpdateRequest","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"triggerPrice","type":"string · int32","required":false,"description":"New trigger price, fp9 raw. Bounds are re-checked against the current market price (and, for `stop` / `take`, against the liquidation price of the position). A trigger price that is already set cannot be reset to `0`.","example":"65000000000000","schema":{"type":"string · int32","types":["string"],"description":"New trigger price, fp9 raw. Bounds are re-checked against the current market price (and, for `stop` / `take`, against the liquidation price of the position). A trigger price that is already set cannot be reset to `0`.","example":"65000000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"amount","type":"string · int32","required":false,"description":"New `amount`, fp9 raw, in the unit its order class uses — see the same field on order creation. On an increase order it is the quote reserve: growing it requires the difference to be available as free balance, and it is required together with `baseSize` on a `base`-sized order. On a close order it is the base asset size of the position to close.","example":"100000000000","schema":{"type":"string · int32","types":["string"],"description":"New `amount`, fp9 raw, in the unit its order class uses — see the same field on order creation. On an increase order it is the quote reserve: growing it requires the difference to be available as free balance, and it is required together with `baseSize` on a `base`-sized order. On a close order it is the base asset size of the position to close.","example":"100000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"expectedAmount","type":"string · int32","required":false,"description":"New slippage tolerance, fp9 raw. See the same field on order creation.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"New slippage tolerance, fp9 raw. See the same field on order creation.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"baseSize","type":"string · int32","required":false,"description":"New size in base asset units, fp9 raw. Only for orders created with `sizeMode: base`.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"New size in base asset units, fp9 raw. Only for orders created with `sizeMode: base`.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}}],"variants":[]},"example":"{}"}],"responses":[{"status":"401","description":"Unauthorized","properties":[],"headers":[]},{"status":"403","description":"The order is no longer active. 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`). Trading on the account is over in its current status (`challenge_closed`), or the account is locked by the managed capital limit (`funded_limit_trading_locked`). The market is paused (`market_paused`) or accepts closing orders only (`market_close_only`).","properties":[],"headers":[]},{"status":"404","description":"No order 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":[{"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[]","required":true,"description":"Position a close order is attached to. Null for orders that open or grow a position.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Position a close order is attached to. Null for orders that open or grow a position.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"parentOrderId","type":"string[]","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":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"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":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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[]","required":true,"description":"Always null. Kept for backward compatibility — use `errorCode`.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Always null. Kept for backward compatibility — use `errorCode`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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[]","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":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"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":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/OrderResponse","nullable":false,"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[]","required":true,"description":"Position a close order is attached to. Null for orders that open or grow a position.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Position a close order is attached to. Null for orders that open or grow a position.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"variants":[]}},{"name":"parentOrderId","type":"string[]","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":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"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":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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[]","required":true,"description":"Always null. Kept for backward compatibility — use `errorCode`.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Always null. Kept for backward compatibility — use `errorCode`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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[]","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":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"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":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"string","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"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":[]},"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\": [\n    \"string\"\n  ],\n  \"parentOrderId\": [\n    \"string\"\n  ],\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\": [\n    \"string\"\n  ],\n  \"realizedPnl\": \"1000000000\",\n  \"rawRealizedPnl\": \"1000000000\",\n  \"profitAdjustmentApplied\": true,\n  \"executedAfterPause\": true,\n  \"sizeMode\": \"quote\",\n  \"baseSize\": \"1000000000\",\n  \"reservedAmount\": \"1000000000\",\n  \"errorCode\": [\n    \"string\"\n  ],\n  \"reason\": \"force_close\"\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 PATCH 'https://api.upscale.trade/orders/{orderId}' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'Content-Type: application/json' \\\n  --data-raw '{}'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.upscale.trade/orders/{orderId}\", {\n  method: \"PATCH\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: \"{}\",\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.upscale.trade/orders/{orderId}\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"},\n    data=\"{}\",\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":"Change order trigger price","url":"https://docs.upscale.trade/developers/operations/updateorder"}],"headings":[{"depth":2,"id":"authorization","title":"Authorization"},{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"request-body-required","title":"Request body · required"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Change order trigger price\n\n`PATCH /orders/{orderId}`\n\nEdits a pending order: trigger price, reserved `amount`, slippage tolerance, or base size. The engine does this by replacing the order, so the\nresponse carries a **new order with a new identifier**, while the previous one ends up as `canceled_by_update`.\n\nChecked beyond the schema:\n\n- The order must exist and still be `active`, and its account must belong to the caller and be in a trading status.\n- `market` and `liquidation` orders cannot be edited at all, nor can a `stop` / `take` order that was created without a trigger price\n  (`order_not_updatable`); a trigger price that is set cannot be reset to `0` (`trigger_price_reset_forbidden`).\n- Growing the reserve of an increase order requires the difference as free balance, and is refused while the account is locked by the managed capital limit.\n- An order created with `sizeMode: base` needs a fresh `amount` whenever `baseSize` changes (`base_size_requires_amount`).\n- The market must be open, and the resulting order is re-checked exactly as on creation — the same field-shape, trigger-price and notional\n  codes listed on `POST /orders` apply here, except `invalid_leverage`: leverage cannot be edited.\n\nA request that sets none of the fields changes nothing and returns the order as it stands.\n\n## Authorization\n\nbearer: http · bearer (required). Personal API key, prefixed with `usk_`.\n\n## Parameters\n\n- path: orderId (string · uuid; required). Identifier of the order to edit.\n\nType: string · uuid\n\nformat: uuid\n\n## Request body · OrderUpdateRequest\n\napplication/json · required\n\nSchema: OrderUpdateRequest\n\nType: object\n\nRequired fields: none\n\n- triggerPrice (string · int32; optional)\n\ntriggerPrice example: 65000000000000\n\ntriggerPrice.Type: string · int32\n\ntriggerPrice.New trigger price, fp9 raw. Bounds are re-checked against the current market price (and, for `stop` / `take`, against the liquidation price of the position). A trigger price that is already set cannot be reset to `0`.\n\ntriggerPrice.format: int32\n\ntriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- amount (string · int32; optional)\n\namount example: 100000000000\n\namount.Type: string · int32\n\namount.New `amount`, fp9 raw, in the unit its order class uses — see the same field on order creation. On an increase order it is the quote reserve: growing it requires the difference to be available as free balance, and it is required together with `baseSize` on a `base`-sized order. On a close order it is the base asset size of the position to close.\n\namount.format: int32\n\namount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- expectedAmount (string · int32; optional)\n\nexpectedAmount example: 1000000000\n\nexpectedAmount.Type: string · int32\n\nexpectedAmount.New slippage tolerance, fp9 raw. See the same field on order creation.\n\nexpectedAmount.format: int32\n\nexpectedAmount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- baseSize (string · int32; optional)\n\nbaseSize example: 1000000000\n\nbaseSize.Type: string · int32\n\nbaseSize.New size in base asset units, fp9 raw. Only for orders created with `sizeMode: base`.\n\nbaseSize.format: int32\n\nbaseSize.pattern: ^(?:-?[1-9][0-9]*|0)$\n\nExample\n\n\n\n```json\n{}\n```\n\n## Example · cURL\n\n```bash\ncurl --request PATCH 'https://api.upscale.trade/orders/{orderId}' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'Content-Type: application/json' \\\n  --data-raw '{}'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.upscale.trade/orders/{orderId}\", {\n  method: \"PATCH\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: \"{}\",\n});\nconsole.log(response.status, await response.text());\n```\n\n## Example · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.upscale.trade/orders/{orderId}\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"},\n    data=\"{}\",\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 order is no longer active. 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`). Trading on the account is over in its current status (`challenge_closed`), or the account is locked by the managed capital limit (`funded_limit_trading_locked`). The market is paused (`market_paused`) or accepts closing orders only (`market_close_only`).\n\n## Response 404\n\n**404**  — No order 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 · OrderResponse\n\n**default** application/json — Response\n\nSchema: OrderResponse\n\nType: object\n\nRequired 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\nRequired 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[]; required), parentOrderId (string[]; 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[]; 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[]; required), reason (string · enum · nullable; required)\n\n- id (string · uuid; required)\n\nid example: 00000000-0000-4000-8000-000000000000\n\nid.Type: string · uuid\n\nid.Order identifier.\n\nid.format: uuid\n\nid.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- txId (string; required)\n\ntxId example: string\n\ntxId.Type: string\n\ntxId.Order identifier. Kept for backward compatibility, always equal to `id`.\n\n- trader (string · uuid; required)\n\ntrader example: 00000000-0000-4000-8000-000000000000\n\ntrader.Type: string · uuid\n\ntrader.Trader account the order belongs to.\n\ntrader.format: uuid\n\ntrader.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- market (string · uuid; required)\n\nmarket example: 00000000-0000-4000-8000-000000000000\n\nmarket.Type: string · uuid\n\nmarket.Market the order is placed on.\n\nmarket.format: uuid\n\nmarket.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- status (string · enum; required)\n\nstatus example: active\n\nstatus.Type: string · enum\n\nstatus.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\nstatus.Allowed values: [\"active\",\"canceled\",\"canceled_by_update\",\"canceled_by_error\",\"canceled_by_position\",\"executed\"]\n\n- type (string · enum; required)\n\ntype example: market\n\ntype.Type: string · enum\n\ntype.Order type. `liquidation` marks an order the engine raised itself.\n\ntype.Allowed values: [\"market\",\"limit\",\"stop\",\"trailing_stop\",\"take\",\"stop_limit\",\"stop_market\",\"liquidation\"]\n\n- direction (string · enum; required)\n\ndirection example: long\n\ndirection.Type: string · enum\n\ndirection.Order direction.\n\ndirection.Allowed values: [\"long\",\"short\"]\n\n- triggerPrice (string · int32; required)\n\ntriggerPrice example: 1000000000\n\ntriggerPrice.Type: string · int32\n\ntriggerPrice.Price at which the order fires, fp9 raw. `0` when the order carries no trigger.\n\ntriggerPrice.format: int32\n\ntriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- requestedTriggerPrice (string · int32 · nullable; required)\n\nrequestedTriggerPrice example: 1000000000\n\nrequestedTriggerPrice.Type: string · int32 · nullable\n\nrequestedTriggerPrice.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\nrequestedTriggerPrice.format: int32\n\nrequestedTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- stopPrice (string · int32; required)\n\nstopPrice example: 1000000000\n\nstopPrice.Type: string · int32\n\nstopPrice.Trigger price of a `stop_market` / `stop_limit` order, fp9 raw; `0` for every other type.\n\nstopPrice.format: int32\n\nstopPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- limitPrice (string · int32; required)\n\nlimitPrice example: 1000000000\n\nlimitPrice.Type: string · int32\n\nlimitPrice.Price the order is placed at once triggered, fp9 raw: the stop-limit price, falling back to the trigger price.\n\nlimitPrice.format: int32\n\nlimitPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- stopTriggerPrice (string · int32; required)\n\nstopTriggerPrice example: 1000000000\n\nstopTriggerPrice.Type: string · int32\n\nstopTriggerPrice.Stop-loss attached to the order, fp9 raw. `0` when none is attached.\n\nstopTriggerPrice.format: int32\n\nstopTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- takeTriggerPrice (string · int32; required)\n\ntakeTriggerPrice example: 1000000000\n\ntakeTriggerPrice.Type: string · int32\n\ntakeTriggerPrice.Take-profit attached to the order, fp9 raw. `0` when none is attached.\n\ntakeTriggerPrice.format: int32\n\ntakeTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopActivationPrice (string · int32; required)\n\ntrailingStopActivationPrice example: 1000000000\n\ntrailingStopActivationPrice.Type: string · int32\n\ntrailingStopActivationPrice.Price at which a trailing stop starts trailing, fp9 raw. `0` when it trails from creation.\n\ntrailingStopActivationPrice.format: int32\n\ntrailingStopActivationPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopOffset (string · int32; required)\n\ntrailingStopOffset example: 1000000000\n\ntrailingStopOffset.Type: string · int32\n\ntrailingStopOffset.Trailing distance as an absolute quote amount, fp9 raw. `0` when the distance is set as a percent.\n\ntrailingStopOffset.format: int32\n\ntrailingStopOffset.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopOffsetPercent (string · int32; required)\n\ntrailingStopOffsetPercent example: 1000000000\n\ntrailingStopOffsetPercent.Type: string · int32\n\ntrailingStopOffsetPercent.Trailing distance as a fraction of price, fp9 raw. `0` when the distance is absolute.\n\ntrailingStopOffsetPercent.format: int32\n\ntrailingStopOffsetPercent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- leverage (string · int32 · nullable; required)\n\nleverage example: 1000000000\n\nleverage.Type: string · int32 · nullable\n\nleverage.Leverage of the order, fp9 raw. Null on close orders, which inherit the leverage of the position.\n\nleverage.format: int32\n\nleverage.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- index (string; required)\n\nindex example: string\n\nindex.Type: string\n\nindex.Order identifier. Kept for backward compatibility, always equal to `id`.\n\n- positionId (string[]; required)\n\npositionId example: [\n  \"string\"\n]\n\npositionId.Type: string[]\n\npositionId.Position a close order is attached to. Null for orders that open or grow a position.\n\npositionId.[]Type: string\n\n- parentOrderId (string[]; required)\n\nparentOrderId example: [\n  \"string\"\n]\n\nparentOrderId.Type: string[]\n\nparentOrderId.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\nparentOrderId.[]Type: string\n\n- expiration (string · date-time · nullable; required)\n\nexpiration example: 2026-05-01T12:30:00.000Z\n\nexpiration.Type: string · date-time · nullable\n\nexpiration.Always null. Kept for backward compatibility — orders do not expire on their own.\n\nexpiration.format: date-time\n\n- amount (string · int32; required)\n\namount example: 1000000000\n\namount.Type: string · int32\n\namount.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\namount.format: int32\n\namount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- indexPrice (string · int32 · nullable; required)\n\nindexPrice example: 1000000000\n\nindexPrice.Type: string · int32 · nullable\n\nindexPrice.Index price the order executed at, fp9 raw. Null while the order has not executed.\n\nindexPrice.format: int32\n\nindexPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- settlementOraclePrice (string · int32; required)\n\nsettlementOraclePrice example: 1000000000\n\nsettlementOraclePrice.Type: string · int32\n\nsettlementOraclePrice.Always `1000000000` (1.0). Kept for backward compatibility.\n\nsettlementOraclePrice.format: int32\n\nsettlementOraclePrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- createdAt (string · date-time; required)\n\ncreatedAt example: 2026-05-01T12:30:00.000Z\n\ncreatedAt.Type: string · date-time\n\ncreatedAt.When the order was accepted.\n\ncreatedAt.format: date-time\n\n- error (string[]; required)\n\nerror example: [\n  \"string\"\n]\n\nerror.Type: string[]\n\nerror.Always null. Kept for backward compatibility — use `errorCode`.\n\nerror.[]Type: string\n\n- realizedPnl (string · int32 · nullable; required)\n\nrealizedPnl example: 1000000000\n\nrealizedPnl.Type: string · int32 · nullable\n\nrealizedPnl.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\nrealizedPnl.format: int32\n\nrealizedPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- rawRealizedPnl (string · int32 · nullable; required)\n\nrawRealizedPnl example: 1000000000\n\nrawRealizedPnl.Type: string · int32 · nullable\n\nrawRealizedPnl.Realised pnl before the 60-second adjustment, fp9 raw. Differs from `realizedPnl` only when the adjustment fired.\n\nrawRealizedPnl.format: int32\n\nrawRealizedPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- profitAdjustmentApplied (boolean; required)\n\nprofitAdjustmentApplied example: true\n\nprofitAdjustmentApplied.Type: boolean\n\nprofitAdjustmentApplied.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- executedAfterPause (boolean; required)\n\nexecutedAfterPause example: true\n\nexecutedAfterPause.Type: boolean\n\nexecutedAfterPause.Whether the order executed after a market pause. Not set by the current engine — always `false`.\n\n- sizeMode (string · enum; required)\n\nsizeMode example: quote\n\nsizeMode.Type: string · enum\n\nsizeMode.How the size was expressed on creation: `quote` sizes the order by `amount`, `base` sizes it by `baseSize`.\n\nsizeMode.Allowed values: [\"quote\",\"base\"]\n\n- baseSize (string · int32 · nullable; required)\n\nbaseSize example: 1000000000\n\nbaseSize.Type: string · int32 · nullable\n\nbaseSize.Order size in base asset units, fp9 raw. Null for `quote`-sized orders.\n\nbaseSize.format: int32\n\nbaseSize.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- reservedAmount (string · int32 · nullable; required)\n\nreservedAmount example: 1000000000\n\nreservedAmount.Type: string · int32 · nullable\n\nreservedAmount.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\nreservedAmount.format: int32\n\nreservedAmount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- errorCode (string[]; required)\n\nerrorCode example: [\n  \"string\"\n]\n\nerrorCode.Type: string[]\n\nerrorCode.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\nerrorCode.[]Type: string\n\n- reason (string · enum · nullable; required)\n\nreason example: force_close\n\nreason.Type: string · enum · nullable\n\nreason.Why the platform cancelled the order itself, for example `force_close` or `weekly_session_risk_close`. Null for trader-driven cancellations.\n\nreason.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  \"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\": [\n    \"string\"\n  ],\n  \"parentOrderId\": [\n    \"string\"\n  ],\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\": [\n    \"string\"\n  ],\n  \"realizedPnl\": \"1000000000\",\n  \"rawRealizedPnl\": \"1000000000\",\n  \"profitAdjustmentApplied\": true,\n  \"executedAfterPause\": true,\n  \"sizeMode\": \"quote\",\n  \"baseSize\": \"1000000000\",\n  \"reservedAmount\": \"1000000000\",\n  \"errorCode\": [\n    \"string\"\n  ],\n  \"reason\": \"force_close\"\n}\n```","text":"Change order trigger price Edits a pending order: trigger price, reserved `amount`, slippage tolerance, or base size. The engine does this by replacing the order, so the response carries a **new order with a new identifier**, while the previous one ends up as `canceled_by_update`. Checked beyond the schema: - The order must exist and still be `active`, and its account must belong to the caller and be in a trading status. - `market` and `liquidation` orders cannot be edited at all, nor can a `stop` / `take` order that was created without a trigger price (`order_not_updatable`); a trigger price that is set cannot be reset to `0` (`trigger_price_reset_forbidden`). - Growing the reserve of an increase order requires the difference as free balance, and is refused while the account is locked by the managed capital limit. - An order created with `sizeMode: base` needs a fresh `amount` whenever `baseSize` changes (`base_size_requires_amount`). - The market must be open, and the resulting order is re-checked exactly as on creation — the same field-shape, trigger-price and notional codes listed on `POST /orders` apply here, except `invalid_leverage`: leverage cannot be edited. A request that sets none of the fields changes nothing and returns the order as it stands. PATCH /orders/{orderId} Trading orderId Identifier of the order to edit. string · uuid triggerPrice New trigger price, fp9 raw. Bounds are re-checked against the current market price (and, for `stop` / `take`, against the liquidation price of the position). A trigger price that is already set cannot be reset to `0`. string · int32 amount New `amount`, fp9 raw, in the unit its order class uses — see the same field on order creation. On an increase order it is the quote reserve: growing it requires the difference to be available as free balance, and it is required together with `baseSize` on a `base`-sized order. On a close order it is the base asset size of the position to close. string · int32 expectedAmount New slippage tolerance, fp9 raw. See the same field on order creation. string · int32 baseSize New size in base asset units, fp9 raw. Only for orders created with `sizeMode: base`. string · int32 401 Unauthorized 403 The order is no longer active. 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`). Trading on the account is over in its current status (`challenge_closed`), or the account is locked by the managed capital limit (`funded_limit_trading_locked`). The market is paused (`market_paused`) or accepts closing orders only (`market_close_only`). 404 No order 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 id Order identifier. string · uuid txId Order identifier. Kept for backward compatibility, always equal to `id`. string trader Trader account the order belongs to. string · uuid market Market the order is placed on. string · uuid 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`. string · enum type Order type. `liquidation` marks an order the engine raised itself. string · enum direction Order direction. string · enum triggerPrice Price at which the order fires, fp9 raw. `0` when the order carries no trigger. string · int32 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. string · int32 · nullable stopPrice Trigger price of a `stop_market` / `stop_limit` order, fp9 raw; `0` for every other type. string · int32 limitPrice Price the order is placed at once triggered, fp9 raw: the stop-limit price, falling back to the trigger price. string · int32 stopTriggerPrice Stop-loss attached to the order, fp9 raw. `0` when none is attached. string · int32 takeTriggerPrice Take-profit attached to the order, fp9 raw. `0` when none is attached. string · int32 trailingStopActivationPrice Price at which a trailing stop starts trailing, fp9 raw. `0` when it trails from creation. string · int32 trailingStopOffset Trailing distance as an absolute quote amount, fp9 raw. `0` when the distance is set as a percent. string · int32 trailingStopOffsetPercent Trailing distance as a fraction of price, fp9 raw. `0` when the distance is absolute. string · int32 leverage Leverage of the order, fp9 raw. Null on close orders, which inherit the leverage of the position. string · int32 · nullable index Order identifier. Kept for backward compatibility, always equal to `id`. string positionId Position a close order is attached to. Null for orders that open or grow a position. string[] 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. string[] expiration Always null. Kept for backward compatibility — orders do not expire on their own. string · date-time · nullable 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. string · int32 indexPrice Index price the order executed at, fp9 raw. Null while the order has not executed. string · int32 · nullable settlementOraclePrice Always `1000000000` (1.0). Kept for backward compatibility. string · int32 createdAt When the order was accepted. string · date-time error Always null. Kept for backward compatibility — use `errorCode`. string[] 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. string · int32 · nullable rawRealizedPnl Realised pnl before the 60-second adjustment, fp9 raw. Differs from `realizedPnl` only when the adjustment fired. string · int32 · nullable 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. boolean executedAfterPause Whether the order executed after a market pause. Not set by the current engine — always `false`. boolean sizeMode How the size was expressed on creation: `quote` sizes the order by `amount`, `base` sizes it by `baseSize`. string · enum baseSize Order size in base asset units, fp9 raw. Null for `quote`-sized orders. string · int32 · nullable 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. string · int32 · nullable 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. string[] reason Why the platform cancelled the order itself, for example `force_close` or `weekly_session_risk_close`. Null for trader-driven cancellations. string · enum · nullable","api":{"title":"Upscale Public API","version":"d796ac9","documentation":"https://docs.upscale.trade/developers","playgroundServer":"https://api.upscale.trade"}}