{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/ru/developers/operations/createorder","title":"Создать новый ордер","description":"POST /orders: Размещает ордер и возвращает его в том виде, в котором его сохранил торговый движок. Ордера на увеличение (market, limit, stop market, stop limit) открывают или…","kind":"api-operation","locale":"ru","inLanguage":"ru","translation":{"sourceLanguage":"en","targetLanguage":"ru","status":"complete","translatedUnits":81,"totalUnits":81},"lastModified":"2026-09-28T20:14:21.334Z","revision":"4bcdb0248fec5130d7dca32f21ced4a207c71ff2d711894a920c99e4198fedd7","section":{"title":"Developers","url":"https://docs.upscale.trade/ru/developers"},"representations":{"html":"https://docs.upscale.trade/ru/developers/operations/createorder","markdown":"https://docs.upscale.trade/ru/developers/operations/createorder.md","json":"https://docs.upscale.trade/ru/developers/operations/createorder.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/createorder","ru":"https://docs.upscale.trade/ru/developers/operations/createorder","es":"https://docs.upscale.trade/es/developers/operations/createorder"},"operation":{"id":"createOrder","method":"POST","path":"/orders","summary":"Создать новый ордер","description":"Размещает ордер и возвращает его в том виде, в котором его сохранил торговый движок. Ордера на увеличение (`market`, `limit`, `stop_market`, `stop_limit`) открывают или увеличивают позицию;\nордера закрытия (`stop`, `take`, `trailing_stop`) привязываются к существующей позиции через `positionId`.\n\n`amount` читается в разных единицах для каждого из двух: в ордере на увеличение это сумма в котируемой валюте, зарезервированная из свободного баланса; в ордере на закрытие это размер базового актива позиции для закрытия, при этом ничего не резервируется. Остальные поля размера (`expectedAmount`, `sizeMode`, `baseSize`, `leverage`) относятся только к ордерам на увеличение.\n\nПомимо схемы на уровне полей, запрос проверяется на:\n\n- **Форма для типа.** Каждое отклонение здесь — это `400`, код которого указывает на проблемную комбинацию полей:\n  - размер — `amount_not_positive`, `base_size_required`, `base_size_negative`, `base_size_not_allowed`;\n  - плечо — `leverage_required`, `leverage_negative`;\n  - цена триггера — `trigger_price_required`, `trigger_price_negative`;\n  - стоп-лосс / тейк-профит, привязанные к ордеру на увеличение — `stop_trigger_price_negative`, `take_trigger_price_negative`,\n    `stop_trigger_price_gt_trigger_price`, `stop_trigger_price_lt_trigger_price`, `take_trigger_price_gt_trigger_price`,\n    `take_trigger_price_lt_trigger_price`;\n  - цена стоп-лимит — `stop_limit_price_required`, `stop_limit_price_negative`, `stop_limit_price_gt_trigger_price`,\n    `stop_limit_price_lt_trigger_price`;\n  - трейлинг-стоп — `trailing_stop_activation_price_negative`, `trailing_stop_offset_required`, `trailing_stop_offset_conflict`,\n    `trailing_stop_offset_negative`, `trailing_stop_offset_percent_negative`, `trailing_stop_offset_percent_gte_one`;\n  - ордера на закрытие — `position_id_required`.\n- **Плечо** ордера на увеличение. Должно оставаться в границах рынка: не ниже минимума рынка и не выше максимума фазы,\n  с `invalid_leverage` (`leverage` плюс `minLeverage` или `maxLeverage` в теле).\n- **Аккаунт.** Должен принадлежать вызывающему и находиться в торговом статусе; ордера на увеличение дополнительно отклоняются, пока аккаунт заблокирован лимитом управляемого капитала, и требуют, чтобы `amount` был доступен как свободный баланс.\n- **Рынок.** Должен быть открыт и относиться к категории, в которой аккаунт может торговать (crypto или RWA). Рынок только для закрытия принимает только `take`-ордер, созданный без триггерной цены.\n- **Позиция**, когда задан `positionId`: она должна существовать (`position_not_found`), быть открытой, находиться на том же аккаунте, принадлежать тому же рынку и иметь то же направление, что и ордер (`position_not_available`).\n- **Триггерная цена**, относительно текущей рыночной цены и — для `stop` / `take` — относительно цены ликвидации позиции\n  (`trigger_price_gt_current`, `trigger_price_lt_current`, `trigger_price_gt_liquidation`, `trigger_price_lt_liquidation`).\n  `market`-ордер с прикреплённым стоп-лоссом / тейк-профитом проверяется относительно цены ликвидации, которая будет у его позиции после исполнения:\n  `market_price_unavailable` когда нет текущей цены для проверки, `order_validation_invariant` когда поля размера, необходимые для этого прогноза, отсутствуют.\n- **Нотионал** ордера на увеличение. `(amount − fee) × leverage` должен укладываться в максимальный открытый нотионал, который рынок допускает в этом направлении\n  (`order_exceeds_max_open_notional`).\n\nОтложенный ордер здесь не исполняется, поэтому он всё ещё может завершиться ошибкой, когда позже сработает его триггер: тогда он получает статус `canceled_by_error` и\n`errorCode` (`insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth`, `order_exceeds_max_open_notional`,\n`order_zero_size_at_execution`, `slippage_tolerance`, `market_close_only_at_execution`), а его резерв освобождается.\n\nОтправьте заголовок `x-idempotency-key`, чтобы сделать вызов безопасным при повторной отправке: в пределах окна повторной отправки, указанного в этом заголовке, тот же ключ на том же маршруте воспроизводит сохранённый ответ (помеченный `X-Idempotency-Cached: true` и `X-Idempotency-Timestamp`) вместо повторного выполнения, а второй вызов, поступивший, пока первый всё ещё выполняется, получает `409` (`idempotency_key_in_flight`).","tags":["Trading"],"tagLabels":{"Accounts":"Аккаунты","Config":"Конфигурация","Trading":"Торговля"},"deprecated":false,"parameters":[{"name":"x-idempotency-key","location":"header","schema":{"type":"string","types":["string"],"example":"9f1c2b7e-5a3d-4f61-9b0e-2c7d4a8e1f35","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string","required":false,"description":"Ключ идемпотентности — любая непрозрачная строка, uuid v4 хорошо подходит. Повторный вызов с тем же ключом на этом маршруте в течение 1 часа воспроизводит сохранённый ответ вместо повторного выполнения; при воспроизведении возвращаются `X-Idempotency-Cached: true` и `X-Idempotency-Timestamp`. Чтобы отказаться, не указывайте заголовок.","example":"9f1c2b7e-5a3d-4f61-9b0e-2c7d4a8e1f35"}],"bodies":[{"mediaType":"application/json","required":true,"properties":[{"name":"accountId","type":"string · uuid","required":true,"description":"Trader account the order is placed on. Must belong to the caller.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Trader account the order is placed on. Must belong to the caller.","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":"marketId","type":"string · uuid","required":true,"description":"Market the order is placed on, as returned by `GET /v2/markets`.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Market the order is placed on, as returned by `GET /v2/markets`.","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":"type","type":"string · enum","required":true,"description":"Order type. Increase (position-opening) types: `market`, `limit`, `stop_market`, `stop_limit`. Close types, attached to an existing position: `stop`, `take`, `trailing_stop`. `liquidation` is raised by the platform itself and `add_margin` / `remove_margin` are legacy — none of the three is accepted here.","example":"market","schema":{"type":"string · enum","types":["string"],"description":"Order type. Increase (position-opening) types: `market`, `limit`, `stop_market`, `stop_limit`. Close types, attached to an existing position: `stop`, `take`, `trailing_stop`. `liquidation` is raised by the platform itself and `add_margin` / `remove_margin` are legacy — none of the three is accepted here.","enum":["market","limit","stop","trailing_stop","take","stop_limit","stop_market"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Order direction. For a close order it must match the direction of the position it is attached to.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Order direction. For a close order it must match the direction of the position it is attached to.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"positionId","type":"string · uuid · nullable","required":false,"description":"Position a close order (`stop`, `take`, `trailing_stop`) is attached to. Required for those types, ignored for increase orders.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid · nullable","types":["string"],"description":"Position a close order (`stop`, `take`, `trailing_stop`) is attached to. Required for those types, ignored for increase orders.","nullable":true,"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":"amount","type":"string · int32","required":true,"description":"What the order is sized by, fp9 raw — the unit depends on the order class. On an increase order (`market`, `limit`, `stop_market`, `stop_limit`) it is a **quote** amount reserved from the free balance (margin, fee, spread and buffer): the account must hold at least this much, and the reserve is released when the order is cancelled. On a close order (`stop`, `take`, `trailing_stop`) it is the **base asset** size of the position to close and nothing is reserved; a size larger than the position holds closes it in full.","example":"100000000000","schema":{"type":"string · int32","types":["string"],"description":"What the order is sized by, fp9 raw — the unit depends on the order class. On an increase order (`market`, `limit`, `stop_market`, `stop_limit`) it is a **quote** amount reserved from the free balance (margin, fee, spread and buffer): the account must hold at least this much, and the reserve is released when the order is cancelled. On a close order (`stop`, `take`, `trailing_stop`) it is the **base asset** size of the position to close and nothing is reserved; a size larger than the position holds closes it in full.","example":"100000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"expectedAmount","type":"string · int32 · nullable","required":false,"description":"Slippage tolerance for increase orders: the position size the caller expects for `amount`, fp9 raw. Execution outside the tolerance fails with `slippage_tolerance`. Omitted or `0` — no tolerance check. Not applicable to close orders.","example":"0","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Slippage tolerance for increase orders: the position size the caller expects for `amount`, fp9 raw. Execution outside the tolerance fails with `slippage_tolerance`. Omitted or `0` — no tolerance check. Not applicable to close orders.","example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"leverage","type":"string · int32 · nullable","required":false,"description":"Leverage, fp9 raw (`10000000000` = 10x). Required for increase orders and must be within the leverage bounds of the market.","example":"10000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Leverage, fp9 raw (`10000000000` = 10x). Required for increase orders and must be within the leverage bounds of the market.","example":"10000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"triggerPrice","type":"string · int32 · nullable","required":false,"description":"Price at which the order fires, fp9 raw. Required for `limit`, `stop`, `take`, `stop_market` and `stop_limit`, and rejected for `market`. For `stop` / `take`, `0` means the order is created without a trigger and can be set later.","example":"65000000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Price at which the order fires, fp9 raw. Required for `limit`, `stop`, `take`, `stop_market` and `stop_limit`, and rejected for `market`. For `stop` / `take`, `0` means the order is created without a trigger and can be set later.","example":"65000000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"stopTriggerPrice","type":"string · int32 · nullable","required":false,"description":"Stop-loss attached to an increase order, fp9 raw. Must sit below the entry trigger price for `long` and above it for `short`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Stop-loss attached to an increase order, fp9 raw. Must sit below the entry trigger price for `long` and above it for `short`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"takeTriggerPrice","type":"string · int32 · nullable","required":false,"description":"Take-profit attached to an increase order, fp9 raw. Must sit above the entry trigger price for `long` and below it for `short`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Take-profit attached to an increase order, fp9 raw. Must sit above the entry trigger price for `long` and below it for `short`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopActivationPrice","type":"string · int32 · nullable","required":false,"description":"Price at which a `trailing_stop` starts trailing, fp9 raw. Omitted — the order trails from the moment it is created.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Price at which a `trailing_stop` starts trailing, fp9 raw. Omitted — the order trails from the moment it is created.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopOffset","type":"string · int32 · nullable","required":false,"description":"Trailing distance as an absolute quote amount, fp9 raw. Exactly one of `trailingStopOffset` / `trailingStopOffsetPercent` is required.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Trailing distance as an absolute quote amount, fp9 raw. Exactly one of `trailingStopOffset` / `trailingStopOffsetPercent` is required.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopOffsetPercent","type":"string · int32 · nullable","required":false,"description":"Trailing distance as a fraction of price, fp9 raw and strictly below `1000000000` (100%). Exactly one of `trailingStopOffset` / `trailingStopOffsetPercent` is required.","example":"50000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Trailing distance as a fraction of price, fp9 raw and strictly below `1000000000` (100%). Exactly one of `trailingStopOffset` / `trailingStopOffsetPercent` is required.","example":"50000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"stopLimitPrice","type":"string · int32 · nullable","required":false,"description":"Limit price a `stop_limit` order is placed at once its trigger fires, fp9 raw. Required for that type; must be at or below the trigger price for `long` and at or above it for `short`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Limit price a `stop_limit` order is placed at once its trigger fires, fp9 raw. Required for that type; must be at or below the trigger price for `long` and at or above it for `short`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"sizeMode","type":"string · enum","required":false,"description":"How the size of an increase order is expressed: `quote` (default) sizes it by `amount`, `base` sizes it by `baseSize` while `amount` stays the reserve. Increase orders only — a close order is always sized by `amount` in base asset units.","example":"quote","schema":{"type":"string · enum","types":["string"],"description":"How the size of an increase order is expressed: `quote` (default) sizes it by `amount`, `base` sizes it by `baseSize` while `amount` stays the reserve. Increase orders only — a close order is always sized by `amount` in base asset units.","enum":["quote","base"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"baseSize","type":"string · int32 · nullable","required":false,"description":"Order size in base asset units, fp9 raw. Required when `sizeMode` is `base` and rejected otherwise, and meaningful for increase orders only.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Order size in base asset units, fp9 raw. Required when `sizeMode` is `base` and rejected otherwise, and meaningful for increase orders only.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/OrderCreateRequest","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"accountId","type":"string · uuid","required":true,"description":"Торговый аккаунт, на котором размещается ордер. Должен принадлежать вызывающей стороне.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Торговый аккаунт, на котором размещается ордер. Должен принадлежать вызывающей стороне.","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":"marketId","type":"string · uuid","required":true,"description":"Рынок, на котором размещается ордер, как возвращается `GET /v2/markets`.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Рынок, на котором размещается ордер, как возвращается `GET /v2/markets`.","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":"type","type":"string · enum","required":true,"description":"Тип ордера. Типы увеличения (открытия позиции): `market`, `limit`, `stop_market`, `stop_limit`. Типы закрытия, привязанные к существующей позиции: `stop`, `take`, `trailing_stop`. `liquidation` выставляется самой платформой, а `add_margin` / `remove_margin` — устаревшие; ни один из этих трёх здесь не принимается.","example":"market","schema":{"type":"string · enum","types":["string"],"description":"Тип ордера. Типы увеличения (открытия позиции): `market`, `limit`, `stop_market`, `stop_limit`. Типы закрытия, привязанные к существующей позиции: `stop`, `take`, `trailing_stop`. `liquidation` выставляется самой платформой, а `add_margin` / `remove_margin` — устаревшие; ни один из этих трёх здесь не принимается.","enum":["market","limit","stop","trailing_stop","take","stop_limit","stop_market"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Направление ордера. Для ордера на закрытие оно должно совпадать с направлением позиции, к которой он привязан.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Направление ордера. Для ордера на закрытие оно должно совпадать с направлением позиции, к которой он привязан.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"positionId","type":"string · uuid · nullable","required":false,"description":"Позиция, к которой привязан ордер на закрытие (`stop`, `take`, `trailing_stop`). Обязательна для этих типов, игнорируется для ордеров на увеличение.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid · nullable","types":["string"],"description":"Позиция, к которой привязан ордер на закрытие (`stop`, `take`, `trailing_stop`). Обязательна для этих типов, игнорируется для ордеров на увеличение.","nullable":true,"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":"amount","type":"string · int32","required":true,"description":"По чему задаётся размер ордера, fp9 в исходном виде — единица зависит от класса ордера. Для ордера на увеличение (`market`, `limit`, `stop_market`, `stop_limit`) это сумма в **котируемом активе**, резервируемая из свободного баланса (маржа, комиссия, спред и буфер): на счёте должно быть не меньше этой суммы, и резерв освобождается при отмене ордера. Для ордера на закрытие (`stop`, `take`, `trailing_stop`) это размер позиции для закрытия в **базовом активе**, и ничего не резервируется; размер, превышающий объём позиции, закрывает её полностью.","example":"100000000000","schema":{"type":"string · int32","types":["string"],"description":"По чему задаётся размер ордера, fp9 в исходном виде — единица зависит от класса ордера. Для ордера на увеличение (`market`, `limit`, `stop_market`, `stop_limit`) это сумма в **котируемом активе**, резервируемая из свободного баланса (маржа, комиссия, спред и буфер): на счёте должно быть не меньше этой суммы, и резерв освобождается при отмене ордера. Для ордера на закрытие (`stop`, `take`, `trailing_stop`) это размер позиции для закрытия в **базовом активе**, и ничего не резервируется; размер, превышающий объём позиции, закрывает её полностью.","example":"100000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"expectedAmount","type":"string · int32 · nullable","required":false,"description":"Допуск проскальзывания для ордеров на увеличение: размер позиции, который вызывающий ожидает для `amount`, fp9 в сыром виде. Исполнение вне допуска завершается ошибкой с `slippage_tolerance`. Если не указано или `0` — проверка допуска не выполняется. Не применимо к ордерам на закрытие.","example":"0","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Допуск проскальзывания для ордеров на увеличение: размер позиции, который вызывающий ожидает для `amount`, fp9 в сыром виде. Исполнение вне допуска завершается ошибкой с `slippage_tolerance`. Если не указано или `0` — проверка допуска не выполняется. Не применимо к ордерам на закрытие.","example":"0","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"leverage","type":"string · int32 · nullable","required":false,"description":"Кредитное плечо, fp9 в исходном виде (`10000000000` = 10x). Обязательно для ордеров на увеличение и должно находиться в пределах границ кредитного плеча рынка.","example":"10000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Кредитное плечо, fp9 в исходном виде (`10000000000` = 10x). Обязательно для ордеров на увеличение и должно находиться в пределах границ кредитного плеча рынка.","example":"10000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"triggerPrice","type":"string · int32 · nullable","required":false,"description":"Цена, при которой срабатывает ордер, fp9 в исходном виде. Обязательна для `limit`, `stop`, `take`, `stop_market` и `stop_limit`, и отклоняется для `market`. Для `stop` / `take`, `0` означает, что ордер создаётся без триггера и может быть задан позже.","example":"65000000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Цена, при которой срабатывает ордер, fp9 в исходном виде. Обязательна для `limit`, `stop`, `take`, `stop_market` и `stop_limit`, и отклоняется для `market`. Для `stop` / `take`, `0` означает, что ордер создаётся без триггера и может быть задан позже.","example":"65000000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"stopTriggerPrice","type":"string · int32 · nullable","required":false,"description":"Стоп-лосс, привязанный к ордеру на увеличение, fp9 в исходном виде. Должен находиться ниже цены триггера входа для `long` и выше неё для `short`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Стоп-лосс, привязанный к ордеру на увеличение, fp9 в исходном виде. Должен находиться ниже цены триггера входа для `long` и выше неё для `short`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"takeTriggerPrice","type":"string · int32 · nullable","required":false,"description":"Тейк-профит, привязанный к ордеру на увеличение, fp9 в исходном виде. Должен находиться выше цены триггера входа для `long` и ниже неё для `short`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Тейк-профит, привязанный к ордеру на увеличение, fp9 в исходном виде. Должен находиться выше цены триггера входа для `long` и ниже неё для `short`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopActivationPrice","type":"string · int32 · nullable","required":false,"description":"Цена, с которой `trailing_stop` начинает трейлинг, fp9 в исходном виде. Пропущено — ордер трейлится с момента создания.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Цена, с которой `trailing_stop` начинает трейлинг, fp9 в исходном виде. Пропущено — ордер трейлится с момента создания.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopOffset","type":"string · int32 · nullable","required":false,"description":"Дистанция трейлинга как абсолютная сумма в валюте котировки, fp9 в сыром виде. Требуется ровно один из `trailingStopOffset` / `trailingStopOffsetPercent`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Дистанция трейлинга как абсолютная сумма в валюте котировки, fp9 в сыром виде. Требуется ровно один из `trailingStopOffset` / `trailingStopOffsetPercent`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"trailingStopOffsetPercent","type":"string · int32 · nullable","required":false,"description":"Дистанция трейлинга как доля цены, fp9 в сыром виде и строго ниже `1000000000` (100%). Требуется ровно один из `trailingStopOffset` / `trailingStopOffsetPercent`.","example":"50000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Дистанция трейлинга как доля цены, fp9 в сыром виде и строго ниже `1000000000` (100%). Требуется ровно один из `trailingStopOffset` / `trailingStopOffsetPercent`.","example":"50000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"stopLimitPrice","type":"string · int32 · nullable","required":false,"description":"Лимитная цена, по которой ордер `stop_limit` размещается сразу после срабатывания его триггера, fp9 в сыром виде. Обязательна для этого типа; должна быть не выше цены триггера для `long` и не ниже неё для `short`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Лимитная цена, по которой ордер `stop_limit` размещается сразу после срабатывания его триггера, fp9 в сыром виде. Обязательна для этого типа; должна быть не выше цены триггера для `long` и не ниже неё для `short`.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"sizeMode","type":"string · enum","required":false,"description":"Как выражается размер ордера на увеличение: `quote` (по умолчанию) задаёт его размер через `amount`, `base` задаёт его размер через `baseSize`, при этом `amount` остаётся резервом. Только для ордеров на увеличение — ордер на закрытие всегда задаётся по размеру через `amount` в единицах базового актива.","example":"quote","schema":{"type":"string · enum","types":["string"],"description":"Как выражается размер ордера на увеличение: `quote` (по умолчанию) задаёт его размер через `amount`, `base` задаёт его размер через `baseSize`, при этом `amount` остаётся резервом. Только для ордеров на увеличение — ордер на закрытие всегда задаётся по размеру через `amount` в единицах базового актива.","enum":["quote","base"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"baseSize","type":"string · int32 · nullable","required":false,"description":"Размер ордера в единицах базового актива, fp9 в сыром виде. Обязателен, когда `sizeMode` имеет значение `base`, и в противном случае отклоняется; имеет смысл только для ордеров на увеличение.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Размер ордера в единицах базового актива, fp9 в сыром виде. Обязателен, когда `sizeMode` имеет значение `base`, и в противном случае отклоняется; имеет смысл только для ордеров на увеличение.","example":"1000000000","nullable":true,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"accountId\": \"00000000-0000-4000-8000-000000000000\",\n  \"marketId\": \"00000000-0000-4000-8000-000000000000\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"amount\": \"100000000000\"\n}"}],"responses":[{"status":"401","description":"Неавторизовано","properties":[],"headers":[]},{"status":"403","description":"Аккаунт принадлежит другому пользователю (`account_access_denied`), или запрос аутентифицирован с помощью API-ключа, тогда как `api_trading` отключён на аккаунте (`api_trading_not_enabled`). Торговля на аккаунте завершена в его текущем статусе (`challenge_closed`), или аккаунт заблокирован лимитом управляемого капитала (`funded_limit_trading_locked`). Рынок приостановлен (`market_paused`) или принимает только ордера на закрытие (`market_close_only`).","properties":[],"headers":[]},{"status":"404","description":"Нет такого аккаунта, рынка или позиции.","properties":[],"headers":[]},{"status":"409","description":"Другой вызов с тем же `x-idempotency-key` всё ещё выполняется (`idempotency_key_in_flight`). Повторите попытку, когда он завершится.","properties":[],"headers":[]},{"status":"429","description":"Превышен лимит частоты запросов API-ключа (`api_key_rate_limit_exceeded`). `Retry-After` указывает, когда вернуться; тело содержит бакет (`read` / `write`), окно, которое сработало, его лимит и `retryAt`.","properties":[],"headers":[]},{"status":"default","description":"Ответ","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":"Идентификатор ордера.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Идентификатор ордера.","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":"Идентификатор ордера. Сохранён для обратной совместимости, всегда равен `id`.","example":"string","schema":{"type":"string","types":["string"],"description":"Идентификатор ордера. Сохранён для обратной совместимости, всегда равен `id`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"trader","type":"string · uuid","required":true,"description":"Аккаунт трейдера, которому принадлежит ордер.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Аккаунт трейдера, которому принадлежит ордер.","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":"Рынок, на котором размещён ордер.","example":"00000000-0000-4000-8000-000000000000","schema":{"type":"string · uuid","types":["string"],"description":"Рынок, на котором размещён ордер.","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":"Состояние жизненного цикла: `active`, пока он ожидает, `executed` после исполнения, `canceled` при отмене трейдером или платформой, `canceled_by_update` при замене в результате редактирования, `canceled_by_position` когда позиция, к которой он был привязан, исчезла, `canceled_by_error` при неудачном исполнении — см. `errorCode`.","example":"active","schema":{"type":"string · enum","types":["string"],"description":"Состояние жизненного цикла: `active`, пока он ожидает, `executed` после исполнения, `canceled` при отмене трейдером или платформой, `canceled_by_update` при замене в результате редактирования, `canceled_by_position` когда позиция, к которой он был привязан, исчезла, `canceled_by_error` при неудачном исполнении — см. `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":"Тип ордера. `liquidation` обозначает ордер, который движок выставил сам.","example":"market","schema":{"type":"string · enum","types":["string"],"description":"Тип ордера. `liquidation` обозначает ордер, который движок выставил сам.","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":"Направление ордера.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Направление ордера.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"triggerPrice","type":"string · int32","required":true,"description":"Цена, при которой срабатывает ордер, fp9 в необработанном виде. `0`, когда ордер не имеет триггера.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Цена, при которой срабатывает ордер, fp9 в необработанном виде. `0`, когда ордер не имеет триггера.","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":"Цена триггера, как запрошено, до того как движок вытолкнул её до минимального стоп-расстояния, fp9 в исходном виде. Null, когда запрошенная цена была оставлена как есть.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Цена триггера, как запрошено, до того как движок вытолкнул её до минимального стоп-расстояния, fp9 в исходном виде. Null, когда запрошенная цена была оставлена как есть.","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":"Цена триггера ордера `stop_market` / `stop_limit`, fp9 в исходном виде; `0` для любого другого типа.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Цена триггера ордера `stop_market` / `stop_limit`, fp9 в исходном виде; `0` для любого другого типа.","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":"Цена, по которой ордер размещается при срабатывании, fp9 в исходном виде: цена стоп-лимит, с возвратом к цене триггера.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Цена, по которой ордер размещается при срабатывании, fp9 в исходном виде: цена стоп-лимит, с возвратом к цене триггера.","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":"Стоп-лосс, привязанный к ордеру, fp9 в исходном виде. `0`, если он не привязан.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Стоп-лосс, привязанный к ордеру, fp9 в исходном виде. `0`, если он не привязан.","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":"Тейк-профит, привязанный к ордеру, fp9 в исходном виде. `0`, если он не привязан.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Тейк-профит, привязанный к ордеру, fp9 в исходном виде. `0`, если он не привязан.","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":"Цена, при которой трейлинг-стоп начинает следовать, fp9 в сыром виде. `0`, когда он следует с момента создания.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Цена, при которой трейлинг-стоп начинает следовать, fp9 в сыром виде. `0`, когда он следует с момента создания.","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":"Дистанция трейлинга как абсолютная сумма в котируемой валюте, fp9 в сыром виде. `0`, когда дистанция задана в процентах.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Дистанция трейлинга как абсолютная сумма в котируемой валюте, fp9 в сыром виде. `0`, когда дистанция задана в процентах.","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":"Дистанция трейлинга как доля цены, fp9 в сыром виде. `0`, когда дистанция абсолютная.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Дистанция трейлинга как доля цены, fp9 в сыром виде. `0`, когда дистанция абсолютная.","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":"Кредитное плечо ордера, fp9 в сыром виде. Null для ордеров на закрытие, которые наследуют кредитное плечо позиции.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Кредитное плечо ордера, fp9 в сыром виде. Null для ордеров на закрытие, которые наследуют кредитное плечо позиции.","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":"Идентификатор ордера. Сохранён для обратной совместимости, всегда равен `id`.","example":"string","schema":{"type":"string","types":["string"],"description":"Идентификатор ордера. Сохранён для обратной совместимости, всегда равен `id`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"positionId","type":"string[]","required":true,"description":"Позиция, к которой привязан ордер на закрытие. Null для ордеров, которые открывают или увеличивают позицию.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Позиция, к которой привязан ордер на закрытие. Null для ордеров, которые открывают или увеличивают позицию.","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":"Ордер, из которого был порождён этот: стоп или тейк, созданный из `stopTriggerPrice` / `takeTriggerPrice`, или лимитный ордер, в который превратился `stop_limit`. Null, когда ордер был отправлен напрямую.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Ордер, из которого был порождён этот: стоп или тейк, созданный из `stopTriggerPrice` / `takeTriggerPrice`, или лимитный ордер, в который превратился `stop_limit`. Null, когда ордер был отправлен напрямую.","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":"Всегда null. Сохранено для обратной совместимости — ордера не истекают сами по себе.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time · nullable","types":["string"],"description":"Всегда null. Сохранено для обратной совместимости — ордера не истекают сами по себе.","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":"Размер ордера, fp9 в сыром виде, в единице, которую использует его класс: для ордера на увеличение — сумма в котируемой валюте — резерв, пока он ожидает, и то, что он фактически потратил после исполнения; для ордера на закрытие (`stop`, `take`, `trailing_stop`) — размер базового актива, который он закрывает, как было запрошено при создании.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Размер ордера, fp9 в сыром виде, в единице, которую использует его класс: для ордера на увеличение — сумма в котируемой валюте — резерв, пока он ожидает, и то, что он фактически потратил после исполнения; для ордера на закрытие (`stop`, `take`, `trailing_stop`) — размер базового актива, который он закрывает, как было запрошено при создании.","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":"Цена индекса, по которой был исполнен ордер, fp9 в сыром виде. Null, пока ордер не исполнен.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Цена индекса, по которой был исполнен ордер, fp9 в сыром виде. Null, пока ордер не исполнен.","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":"Всегда `1000000000` (1.0). Сохранено для обратной совместимости.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Всегда `1000000000` (1.0). Сохранено для обратной совместимости.","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":"Когда ордер был принят.","example":"2026-05-01T12:30:00.000Z","schema":{"type":"string · date-time","types":["string"],"description":"Когда ордер был принят.","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":"Всегда null. Сохранён для обратной совместимости — используйте `errorCode`.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Всегда null. Сохранён для обратной совместимости — используйте `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, реализованный этим ордером, fp9 в сыром виде. Устанавливается только для исполненного ордера на закрытие; null, пока ордер в ожидании, и для ордеров, которые открывают или увеличивают позицию.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Pnl, реализованный этим ордером, fp9 в сыром виде. Устанавливается только для исполненного ордера на закрытие; null, пока ордер в ожидании, и для ордеров, которые открывают или увеличивают позицию.","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":"Реализованный pnl до 60-секундной корректировки, fp9 в сыром виде. Отличается от `realizedPnl` только тогда, когда корректировка сработала.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Реализованный pnl до 60-секундной корректировки, fp9 в сыром виде. Отличается от `realizedPnl` только тогда, когда корректировка сработала.","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":"Ограничила ли 60-секундная корректировка прибыль этого ордера — в течение минуты после открытия или увеличения позиции pnl позиции не может вырасти выше значения, которое было в тот момент.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Ограничила ли 60-секундная корректировка прибыль этого ордера — в течение минуты после открытия или увеличения позиции pnl позиции не может вырасти выше значения, которое было в тот момент.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"executedAfterPause","type":"boolean","required":true,"description":"Был ли ордер исполнен после рыночной паузы. Не задаётся текущим движком — всегда `false`.","example":"true","schema":{"type":"boolean","types":["boolean"],"description":"Был ли ордер исполнен после рыночной паузы. Не задаётся текущим движком — всегда `false`.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"sizeMode","type":"string · enum","required":true,"description":"Как был выражен размер при создании: `quote` задаёт размер ордера по `amount`, `base` задаёт его по `baseSize`.","example":"quote","schema":{"type":"string · enum","types":["string"],"description":"Как был выражен размер при создании: `quote` задаёт размер ордера по `amount`, `base` задаёт его по `baseSize`.","enum":["quote","base"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"baseSize","type":"string · int32 · nullable","required":true,"description":"Размер ордера в единицах базового актива, fp9 в сыром виде. Null для ордеров с размером `quote`.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Размер ордера в единицах базового актива, fp9 в сыром виде. Null для ордеров с размером `quote`.","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":"Сумма в котируемой валюте, зарезервированная при создании ордера с sizeMode=base, fp9 в сыром виде. Остаётся равной исходному резерву после исполнения, тогда как `amount` перезаписывается на потраченную сумму. Null для ордеров с размером `quote`, где `amount` — это резерв.","example":"1000000000","schema":{"type":"string · int32 · nullable","types":["string"],"description":"Сумма в котируемой валюте, зарезервированная при создании ордера с sizeMode=base, fp9 в сыром виде. Остаётся равной исходному резерву после исполнения, тогда как `amount` перезаписывается на потраченную сумму. Null для ордеров с размером `quote`, где `amount` — это резерв.","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":"Почему исполнение не удалось, задаётся вместе со статусом `canceled_by_error` — например, `insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth` или `slippage_tolerance`. В остальных случаях Null.","example":"[\n  \"string\"\n]","schema":{"type":"string[]","types":["array"],"description":"Почему исполнение не удалось, задаётся вместе со статусом `canceled_by_error` — например, `insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth` или `slippage_tolerance`. В остальных случаях Null.","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":"Почему платформа сама отменила ордер, например `force_close` или `weekly_session_risk_close`. Null для отмен, инициированных трейдером.","example":"force_close","schema":{"type":"string · enum · nullable","types":["string"],"description":"Почему платформа сама отменила ордер, например `force_close` или `weekly_session_risk_close`. Null для отмен, инициированных трейдером.","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":"Персональный API-ключ с префиксом `usk_`.","required":true,"scopes":[]}],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request POST 'https://api.upscale.trade/orders' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'Content-Type: application/json' \\\n  --data-raw '{\n  \"accountId\": \"00000000-0000-4000-8000-000000000000\",\n  \"marketId\": \"00000000-0000-4000-8000-000000000000\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"amount\": \"100000000000\"\n}'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.upscale.trade/orders\", {\n  method: \"POST\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: \"{\\n  \\\"accountId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"marketId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"type\\\": \\\"market\\\",\\n  \\\"direction\\\": \\\"long\\\",\\n  \\\"amount\\\": \\\"100000000000\\\"\\n}\",\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.upscale.trade/orders\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"},\n    data=\"{\\n  \\\"accountId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"marketId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"type\\\": \\\"market\\\",\\n  \\\"direction\\\": \\\"long\\\",\\n  \\\"amount\\\": \\\"100000000000\\\"\\n}\",\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"Что такое проп-трейдинг","url":"https://docs.upscale.trade/ru"},{"title":"Developers","url":"https://docs.upscale.trade/ru/developers"},{"title":"Создать новый ордер","url":"https://docs.upscale.trade/ru/developers/operations/createorder"}],"headings":[{"depth":2,"id":"authorization","title":"Авторизация"},{"depth":2,"id":"parameters","title":"Параметры"},{"depth":2,"id":"request-body-required","title":"Тело запроса · обязательно"},{"depth":2,"id":"examples","title":"Примеры"},{"depth":2,"id":"responses","title":"Ответы"}],"markdown":"# Создать новый ордер\n\n`POST /orders`\n\nРазмещает ордер и возвращает его в том виде, в котором его сохранил торговый движок. Ордера на увеличение (`market`, `limit`, `stop_market`, `stop_limit`) открывают или увеличивают позицию;\nордера закрытия (`stop`, `take`, `trailing_stop`) привязываются к существующей позиции через `positionId`.\n\n`amount` читается в разных единицах для каждого из двух: в ордере на увеличение это сумма в котируемой валюте, зарезервированная из свободного баланса; в ордере на закрытие это размер базового актива позиции для закрытия, при этом ничего не резервируется. Остальные поля размера (`expectedAmount`, `sizeMode`, `baseSize`, `leverage`) относятся только к ордерам на увеличение.\n\nПомимо схемы на уровне полей, запрос проверяется на:\n\n- **Форма для типа.** Каждое отклонение здесь — это `400`, код которого указывает на проблемную комбинацию полей:\n  - размер — `amount_not_positive`, `base_size_required`, `base_size_negative`, `base_size_not_allowed`;\n  - плечо — `leverage_required`, `leverage_negative`;\n  - цена триггера — `trigger_price_required`, `trigger_price_negative`;\n  - стоп-лосс / тейк-профит, привязанные к ордеру на увеличение — `stop_trigger_price_negative`, `take_trigger_price_negative`,\n    `stop_trigger_price_gt_trigger_price`, `stop_trigger_price_lt_trigger_price`, `take_trigger_price_gt_trigger_price`,\n    `take_trigger_price_lt_trigger_price`;\n  - цена стоп-лимит — `stop_limit_price_required`, `stop_limit_price_negative`, `stop_limit_price_gt_trigger_price`,\n    `stop_limit_price_lt_trigger_price`;\n  - трейлинг-стоп — `trailing_stop_activation_price_negative`, `trailing_stop_offset_required`, `trailing_stop_offset_conflict`,\n    `trailing_stop_offset_negative`, `trailing_stop_offset_percent_negative`, `trailing_stop_offset_percent_gte_one`;\n  - ордера на закрытие — `position_id_required`.\n- **Плечо** ордера на увеличение. Должно оставаться в границах рынка: не ниже минимума рынка и не выше максимума фазы,\n  с `invalid_leverage` (`leverage` плюс `minLeverage` или `maxLeverage` в теле).\n- **Аккаунт.** Должен принадлежать вызывающему и находиться в торговом статусе; ордера на увеличение дополнительно отклоняются, пока аккаунт заблокирован лимитом управляемого капитала, и требуют, чтобы `amount` был доступен как свободный баланс.\n- **Рынок.** Должен быть открыт и относиться к категории, в которой аккаунт может торговать (crypto или RWA). Рынок только для закрытия принимает только `take`-ордер, созданный без триггерной цены.\n- **Позиция**, когда задан `positionId`: она должна существовать (`position_not_found`), быть открытой, находиться на том же аккаунте, принадлежать тому же рынку и иметь то же направление, что и ордер (`position_not_available`).\n- **Триггерная цена**, относительно текущей рыночной цены и — для `stop` / `take` — относительно цены ликвидации позиции\n  (`trigger_price_gt_current`, `trigger_price_lt_current`, `trigger_price_gt_liquidation`, `trigger_price_lt_liquidation`).\n  `market`-ордер с прикреплённым стоп-лоссом / тейк-профитом проверяется относительно цены ликвидации, которая будет у его позиции после исполнения:\n  `market_price_unavailable` когда нет текущей цены для проверки, `order_validation_invariant` когда поля размера, необходимые для этого прогноза, отсутствуют.\n- **Нотионал** ордера на увеличение. `(amount − fee) × leverage` должен укладываться в максимальный открытый нотионал, который рынок допускает в этом направлении\n  (`order_exceeds_max_open_notional`).\n\nОтложенный ордер здесь не исполняется, поэтому он всё ещё может завершиться ошибкой, когда позже сработает его триггер: тогда он получает статус `canceled_by_error` и\n`errorCode` (`insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth`, `order_exceeds_max_open_notional`,\n`order_zero_size_at_execution`, `slippage_tolerance`, `market_close_only_at_execution`), а его резерв освобождается.\n\nОтправьте заголовок `x-idempotency-key`, чтобы сделать вызов безопасным при повторной отправке: в пределах окна повторной отправки, указанного в этом заголовке, тот же ключ на том же маршруте воспроизводит сохранённый ответ (помеченный `X-Idempotency-Cached: true` и `X-Idempotency-Timestamp`) вместо повторного выполнения, а второй вызов, поступивший, пока первый всё ещё выполняется, получает `409` (`idempotency_key_in_flight`).\n\n<a id=\"authorization\"></a>\n\n## Авторизация\n\nbearer: http · bearer (обязательно). Персональный API-ключ с префиксом `usk_`.\n\n<a id=\"parameters\"></a>\n\n## Параметры\n\n- header: x-idempotency-key (string; необязательно). Ключ идемпотентности — любая непрозрачная строка, uuid v4 хорошо подходит. Повторный вызов с тем же ключом на этом маршруте в течение 1 часа воспроизводит сохранённый ответ вместо повторного выполнения; при воспроизведении возвращаются `X-Idempotency-Cached: true` и `X-Idempotency-Timestamp`. Чтобы отказаться, не указывайте заголовок.\n\nТип: string\n\nПример: \"9f1c2b7e-5a3d-4f61-9b0e-2c7d4a8e1f35\"\n\n<a id=\"request-body-ordercreaterequest\"></a>\n\n## Тело запроса · OrderCreateRequest\n\napplication/json · обязательно\n\nСхема: OrderCreateRequest\n\nТип: object\n\nОбязательные поля: accountId, marketId, type, direction, amount\n\nТипы обязательных полей: accountId (string · uuid; обязательно), marketId (string · uuid; обязательно), type (string · enum; обязательно), direction (string · enum; обязательно), amount (string · int32; обязательно)\n\n- accountId (string · uuid; обязательно)\n\naccountId пример: 00000000-0000-4000-8000-000000000000\n\naccountId.Тип: string · uuid\n\naccountId.Торговый аккаунт, на котором размещается ордер. Должен принадлежать вызывающей стороне.\n\naccountId.format: uuid\n\naccountId.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- marketId (string · uuid; обязательно)\n\nmarketId пример: 00000000-0000-4000-8000-000000000000\n\nmarketId.Тип: string · uuid\n\nmarketId.Рынок, на котором размещается ордер, как возвращается `GET /v2/markets`.\n\nmarketId.format: uuid\n\nmarketId.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- type (string · enum; обязательно)\n\ntype пример: market\n\ntype.Тип: string · enum\n\ntype.Тип ордера. Типы увеличения (открытия позиции): `market`, `limit`, `stop_market`, `stop_limit`. Типы закрытия, привязанные к существующей позиции: `stop`, `take`, `trailing_stop`. `liquidation` выставляется самой платформой, а `add_margin` / `remove_margin` — устаревшие; ни один из этих трёх здесь не принимается.\n\ntype.Допустимые значения: [\"market\",\"limit\",\"stop\",\"trailing_stop\",\"take\",\"stop_limit\",\"stop_market\"]\n\n- direction (string · enum; обязательно)\n\ndirection пример: long\n\ndirection.Тип: string · enum\n\ndirection.Направление ордера. Для ордера на закрытие оно должно совпадать с направлением позиции, к которой он привязан.\n\ndirection.Допустимые значения: [\"long\",\"short\"]\n\n- positionId (string · uuid · nullable; необязательно)\n\npositionId пример: 00000000-0000-4000-8000-000000000000\n\npositionId.Тип: string · uuid · nullable\n\npositionId.Позиция, к которой привязан ордер на закрытие (`stop`, `take`, `trailing_stop`). Обязательна для этих типов, игнорируется для ордеров на увеличение.\n\npositionId.format: uuid\n\npositionId.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- amount (string · int32; обязательно)\n\namount пример: 100000000000\n\namount.Тип: string · int32\n\namount.По чему задаётся размер ордера, fp9 в исходном виде — единица зависит от класса ордера. Для ордера на увеличение (`market`, `limit`, `stop_market`, `stop_limit`) это сумма в **котируемом активе**, резервируемая из свободного баланса (маржа, комиссия, спред и буфер): на счёте должно быть не меньше этой суммы, и резерв освобождается при отмене ордера. Для ордера на закрытие (`stop`, `take`, `trailing_stop`) это размер позиции для закрытия в **базовом активе**, и ничего не резервируется; размер, превышающий объём позиции, закрывает её полностью.\n\namount.format: int32\n\namount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- expectedAmount (string · int32 · nullable; необязательно)\n\nexpectedAmount пример: 0\n\nexpectedAmount.Тип: string · int32 · nullable\n\nexpectedAmount.Допуск проскальзывания для ордеров на увеличение: размер позиции, который вызывающий ожидает для `amount`, fp9 в сыром виде. Исполнение вне допуска завершается ошибкой с `slippage_tolerance`. Если не указано или `0` — проверка допуска не выполняется. Не применимо к ордерам на закрытие.\n\nexpectedAmount.format: int32\n\nexpectedAmount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- leverage (string · int32 · nullable; необязательно)\n\nleverage пример: 10000000000\n\nleverage.Тип: string · int32 · nullable\n\nleverage.Кредитное плечо, fp9 в исходном виде (`10000000000` = 10x). Обязательно для ордеров на увеличение и должно находиться в пределах границ кредитного плеча рынка.\n\nleverage.format: int32\n\nleverage.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- triggerPrice (string · int32 · nullable; необязательно)\n\ntriggerPrice пример: 65000000000000\n\ntriggerPrice.Тип: string · int32 · nullable\n\ntriggerPrice.Цена, при которой срабатывает ордер, fp9 в исходном виде. Обязательна для `limit`, `stop`, `take`, `stop_market` и `stop_limit`, и отклоняется для `market`. Для `stop` / `take`, `0` означает, что ордер создаётся без триггера и может быть задан позже.\n\ntriggerPrice.format: int32\n\ntriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- stopTriggerPrice (string · int32 · nullable; необязательно)\n\nstopTriggerPrice пример: 1000000000\n\nstopTriggerPrice.Тип: string · int32 · nullable\n\nstopTriggerPrice.Стоп-лосс, привязанный к ордеру на увеличение, fp9 в исходном виде. Должен находиться ниже цены триггера входа для `long` и выше неё для `short`.\n\nstopTriggerPrice.format: int32\n\nstopTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- takeTriggerPrice (string · int32 · nullable; необязательно)\n\ntakeTriggerPrice пример: 1000000000\n\ntakeTriggerPrice.Тип: string · int32 · nullable\n\ntakeTriggerPrice.Тейк-профит, привязанный к ордеру на увеличение, fp9 в исходном виде. Должен находиться выше цены триггера входа для `long` и ниже неё для `short`.\n\ntakeTriggerPrice.format: int32\n\ntakeTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopActivationPrice (string · int32 · nullable; необязательно)\n\ntrailingStopActivationPrice пример: 1000000000\n\ntrailingStopActivationPrice.Тип: string · int32 · nullable\n\ntrailingStopActivationPrice.Цена, с которой `trailing_stop` начинает трейлинг, fp9 в исходном виде. Пропущено — ордер трейлится с момента создания.\n\ntrailingStopActivationPrice.format: int32\n\ntrailingStopActivationPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopOffset (string · int32 · nullable; необязательно)\n\ntrailingStopOffset пример: 1000000000\n\ntrailingStopOffset.Тип: string · int32 · nullable\n\ntrailingStopOffset.Дистанция трейлинга как абсолютная сумма в валюте котировки, fp9 в сыром виде. Требуется ровно один из `trailingStopOffset` / `trailingStopOffsetPercent`.\n\ntrailingStopOffset.format: int32\n\ntrailingStopOffset.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopOffsetPercent (string · int32 · nullable; необязательно)\n\ntrailingStopOffsetPercent пример: 50000000\n\ntrailingStopOffsetPercent.Тип: string · int32 · nullable\n\ntrailingStopOffsetPercent.Дистанция трейлинга как доля цены, fp9 в сыром виде и строго ниже `1000000000` (100%). Требуется ровно один из `trailingStopOffset` / `trailingStopOffsetPercent`.\n\ntrailingStopOffsetPercent.format: int32\n\ntrailingStopOffsetPercent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- stopLimitPrice (string · int32 · nullable; необязательно)\n\nstopLimitPrice пример: 1000000000\n\nstopLimitPrice.Тип: string · int32 · nullable\n\nstopLimitPrice.Лимитная цена, по которой ордер `stop_limit` размещается сразу после срабатывания его триггера, fp9 в сыром виде. Обязательна для этого типа; должна быть не выше цены триггера для `long` и не ниже неё для `short`.\n\nstopLimitPrice.format: int32\n\nstopLimitPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- sizeMode (string · enum; необязательно)\n\nsizeMode пример: quote\n\nsizeMode.Тип: string · enum\n\nsizeMode.Как выражается размер ордера на увеличение: `quote` (по умолчанию) задаёт его размер через `amount`, `base` задаёт его размер через `baseSize`, при этом `amount` остаётся резервом. Только для ордеров на увеличение — ордер на закрытие всегда задаётся по размеру через `amount` в единицах базового актива.\n\nsizeMode.Допустимые значения: [\"quote\",\"base\"]\n\n- baseSize (string · int32 · nullable; необязательно)\n\nbaseSize пример: 1000000000\n\nbaseSize.Тип: string · int32 · nullable\n\nbaseSize.Размер ордера в единицах базового актива, fp9 в сыром виде. Обязателен, когда `sizeMode` имеет значение `base`, и в противном случае отклоняется; имеет смысл только для ордеров на увеличение.\n\nbaseSize.format: int32\n\nbaseSize.pattern: ^(?:-?[1-9][0-9]*|0)$\n\nПример\n\n\n\n```json\n{\n  \"accountId\": \"00000000-0000-4000-8000-000000000000\",\n  \"marketId\": \"00000000-0000-4000-8000-000000000000\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"amount\": \"100000000000\"\n}\n```\n\n<a id=\"example-curl\"></a>\n\n## Пример · cURL\n\n```bash\ncurl --request POST 'https://api.upscale.trade/orders' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'Content-Type: application/json' \\\n  --data-raw '{\n  \"accountId\": \"00000000-0000-4000-8000-000000000000\",\n  \"marketId\": \"00000000-0000-4000-8000-000000000000\",\n  \"type\": \"market\",\n  \"direction\": \"long\",\n  \"amount\": \"100000000000\"\n}'\n```\n\n<a id=\"example-javascript\"></a>\n\n## Пример · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.upscale.trade/orders\", {\n  method: \"POST\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application/json\"\n  },\n  body: \"{\\n  \\\"accountId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"marketId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"type\\\": \\\"market\\\",\\n  \\\"direction\\\": \\\"long\\\",\\n  \\\"amount\\\": \\\"100000000000\\\"\\n}\",\n});\nconsole.log(response.status, await response.text());\n```\n\n<a id=\"example-python\"></a>\n\n## Пример · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.upscale.trade/orders\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\",\"Content-Type\":\"application/json\"},\n    data=\"{\\n  \\\"accountId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"marketId\\\": \\\"00000000-0000-4000-8000-000000000000\\\",\\n  \\\"type\\\": \\\"market\\\",\\n  \\\"direction\\\": \\\"long\\\",\\n  \\\"amount\\\": \\\"100000000000\\\"\\n}\",\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n<a id=\"response-401\"></a>\n\n## Ответ 401\n\n**401**  — Неавторизовано\n\n<a id=\"response-403\"></a>\n\n## Ответ 403\n\n**403**  — Аккаунт принадлежит другому пользователю (`account_access_denied`), или запрос аутентифицирован с помощью API-ключа, тогда как `api_trading` отключён на аккаунте (`api_trading_not_enabled`). Торговля на аккаунте завершена в его текущем статусе (`challenge_closed`), или аккаунт заблокирован лимитом управляемого капитала (`funded_limit_trading_locked`). Рынок приостановлен (`market_paused`) или принимает только ордера на закрытие (`market_close_only`).\n\n<a id=\"response-404\"></a>\n\n## Ответ 404\n\n**404**  — Нет такого аккаунта, рынка или позиции.\n\n<a id=\"response-409\"></a>\n\n## Ответ 409\n\n**409**  — Другой вызов с тем же `x-idempotency-key` всё ещё выполняется (`idempotency_key_in_flight`). Повторите попытку, когда он завершится.\n\n<a id=\"response-429\"></a>\n\n## Ответ 429\n\n**429**  — Превышен лимит частоты запросов API-ключа (`api_key_rate_limit_exceeded`). `Retry-After` указывает, когда вернуться; тело содержит бакет (`read` / `write`), окно, которое сработало, его лимит и `retryAt`.\n\n<a id=\"response-default-orderresponse\"></a>\n\n## Ответ default · OrderResponse\n\n**default** application/json — Ответ\n\nСхема: OrderResponse\n\nТип: object\n\nОбязательные поля: 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Типы обязательных полей: id (string · uuid; обязательно), txId (string; обязательно), trader (string · uuid; обязательно), market (string · uuid; обязательно), status (string · enum; обязательно), type (string · enum; обязательно), direction (string · enum; обязательно), triggerPrice (string · int32; обязательно), requestedTriggerPrice (string · int32 · nullable; обязательно), stopPrice (string · int32; обязательно), limitPrice (string · int32; обязательно), stopTriggerPrice (string · int32; обязательно), takeTriggerPrice (string · int32; обязательно), trailingStopActivationPrice (string · int32; обязательно), trailingStopOffset (string · int32; обязательно), trailingStopOffsetPercent (string · int32; обязательно), leverage (string · int32 · nullable; обязательно), index (string; обязательно), positionId (string[]; обязательно), parentOrderId (string[]; обязательно), expiration (string · date-time · nullable; обязательно), amount (string · int32; обязательно), indexPrice (string · int32 · nullable; обязательно), settlementOraclePrice (string · int32; обязательно), createdAt (string · date-time; обязательно), error (string[]; обязательно), realizedPnl (string · int32 · nullable; обязательно), rawRealizedPnl (string · int32 · nullable; обязательно), profitAdjustmentApplied (boolean; обязательно), executedAfterPause (boolean; обязательно), sizeMode (string · enum; обязательно), baseSize (string · int32 · nullable; обязательно), reservedAmount (string · int32 · nullable; обязательно), errorCode (string[]; обязательно), reason (string · enum · nullable; обязательно)\n\n- id (string · uuid; обязательно)\n\nid пример: 00000000-0000-4000-8000-000000000000\n\nid.Тип: string · uuid\n\nid.Идентификатор ордера.\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; обязательно)\n\ntxId пример: string\n\ntxId.Тип: string\n\ntxId.Идентификатор ордера. Сохранён для обратной совместимости, всегда равен `id`.\n\n- trader (string · uuid; обязательно)\n\ntrader пример: 00000000-0000-4000-8000-000000000000\n\ntrader.Тип: string · uuid\n\ntrader.Аккаунт трейдера, которому принадлежит ордер.\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; обязательно)\n\nmarket пример: 00000000-0000-4000-8000-000000000000\n\nmarket.Тип: string · uuid\n\nmarket.Рынок, на котором размещён ордер.\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; обязательно)\n\nstatus пример: active\n\nstatus.Тип: string · enum\n\nstatus.Состояние жизненного цикла: `active`, пока он ожидает, `executed` после исполнения, `canceled` при отмене трейдером или платформой, `canceled_by_update` при замене в результате редактирования, `canceled_by_position` когда позиция, к которой он был привязан, исчезла, `canceled_by_error` при неудачном исполнении — см. `errorCode`.\n\nstatus.Допустимые значения: [\"active\",\"canceled\",\"canceled_by_update\",\"canceled_by_error\",\"canceled_by_position\",\"executed\"]\n\n- type (string · enum; обязательно)\n\ntype пример: market\n\ntype.Тип: string · enum\n\ntype.Тип ордера. `liquidation` обозначает ордер, который движок выставил сам.\n\ntype.Допустимые значения: [\"market\",\"limit\",\"stop\",\"trailing_stop\",\"take\",\"stop_limit\",\"stop_market\",\"liquidation\"]\n\n- direction (string · enum; обязательно)\n\ndirection пример: long\n\ndirection.Тип: string · enum\n\ndirection.Направление ордера.\n\ndirection.Допустимые значения: [\"long\",\"short\"]\n\n- triggerPrice (string · int32; обязательно)\n\ntriggerPrice пример: 1000000000\n\ntriggerPrice.Тип: string · int32\n\ntriggerPrice.Цена, при которой срабатывает ордер, fp9 в необработанном виде. `0`, когда ордер не имеет триггера.\n\ntriggerPrice.format: int32\n\ntriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- requestedTriggerPrice (string · int32 · nullable; обязательно)\n\nrequestedTriggerPrice пример: 1000000000\n\nrequestedTriggerPrice.Тип: string · int32 · nullable\n\nrequestedTriggerPrice.Цена триггера, как запрошено, до того как движок вытолкнул её до минимального стоп-расстояния, fp9 в исходном виде. Null, когда запрошенная цена была оставлена как есть.\n\nrequestedTriggerPrice.format: int32\n\nrequestedTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- stopPrice (string · int32; обязательно)\n\nstopPrice пример: 1000000000\n\nstopPrice.Тип: string · int32\n\nstopPrice.Цена триггера ордера `stop_market` / `stop_limit`, fp9 в исходном виде; `0` для любого другого типа.\n\nstopPrice.format: int32\n\nstopPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- limitPrice (string · int32; обязательно)\n\nlimitPrice пример: 1000000000\n\nlimitPrice.Тип: string · int32\n\nlimitPrice.Цена, по которой ордер размещается при срабатывании, fp9 в исходном виде: цена стоп-лимит, с возвратом к цене триггера.\n\nlimitPrice.format: int32\n\nlimitPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- stopTriggerPrice (string · int32; обязательно)\n\nstopTriggerPrice пример: 1000000000\n\nstopTriggerPrice.Тип: string · int32\n\nstopTriggerPrice.Стоп-лосс, привязанный к ордеру, fp9 в исходном виде. `0`, если он не привязан.\n\nstopTriggerPrice.format: int32\n\nstopTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- takeTriggerPrice (string · int32; обязательно)\n\ntakeTriggerPrice пример: 1000000000\n\ntakeTriggerPrice.Тип: string · int32\n\ntakeTriggerPrice.Тейк-профит, привязанный к ордеру, fp9 в исходном виде. `0`, если он не привязан.\n\ntakeTriggerPrice.format: int32\n\ntakeTriggerPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopActivationPrice (string · int32; обязательно)\n\ntrailingStopActivationPrice пример: 1000000000\n\ntrailingStopActivationPrice.Тип: string · int32\n\ntrailingStopActivationPrice.Цена, при которой трейлинг-стоп начинает следовать, fp9 в сыром виде. `0`, когда он следует с момента создания.\n\ntrailingStopActivationPrice.format: int32\n\ntrailingStopActivationPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopOffset (string · int32; обязательно)\n\ntrailingStopOffset пример: 1000000000\n\ntrailingStopOffset.Тип: string · int32\n\ntrailingStopOffset.Дистанция трейлинга как абсолютная сумма в котируемой валюте, fp9 в сыром виде. `0`, когда дистанция задана в процентах.\n\ntrailingStopOffset.format: int32\n\ntrailingStopOffset.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- trailingStopOffsetPercent (string · int32; обязательно)\n\ntrailingStopOffsetPercent пример: 1000000000\n\ntrailingStopOffsetPercent.Тип: string · int32\n\ntrailingStopOffsetPercent.Дистанция трейлинга как доля цены, fp9 в сыром виде. `0`, когда дистанция абсолютная.\n\ntrailingStopOffsetPercent.format: int32\n\ntrailingStopOffsetPercent.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- leverage (string · int32 · nullable; обязательно)\n\nleverage пример: 1000000000\n\nleverage.Тип: string · int32 · nullable\n\nleverage.Кредитное плечо ордера, fp9 в сыром виде. Null для ордеров на закрытие, которые наследуют кредитное плечо позиции.\n\nleverage.format: int32\n\nleverage.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- index (string; обязательно)\n\nindex пример: string\n\nindex.Тип: string\n\nindex.Идентификатор ордера. Сохранён для обратной совместимости, всегда равен `id`.\n\n- positionId (string[]; обязательно)\n\npositionId пример: [\n  \"string\"\n]\n\npositionId.Тип: string[]\n\npositionId.Позиция, к которой привязан ордер на закрытие. Null для ордеров, которые открывают или увеличивают позицию.\n\npositionId.[]Тип: string\n\n- parentOrderId (string[]; обязательно)\n\nparentOrderId пример: [\n  \"string\"\n]\n\nparentOrderId.Тип: string[]\n\nparentOrderId.Ордер, из которого был порождён этот: стоп или тейк, созданный из `stopTriggerPrice` / `takeTriggerPrice`, или лимитный ордер, в который превратился `stop_limit`. Null, когда ордер был отправлен напрямую.\n\nparentOrderId.[]Тип: string\n\n- expiration (string · date-time · nullable; обязательно)\n\nexpiration пример: 2026-05-01T12:30:00.000Z\n\nexpiration.Тип: string · date-time · nullable\n\nexpiration.Всегда null. Сохранено для обратной совместимости — ордера не истекают сами по себе.\n\nexpiration.format: date-time\n\n- amount (string · int32; обязательно)\n\namount пример: 1000000000\n\namount.Тип: string · int32\n\namount.Размер ордера, fp9 в сыром виде, в единице, которую использует его класс: для ордера на увеличение — сумма в котируемой валюте — резерв, пока он ожидает, и то, что он фактически потратил после исполнения; для ордера на закрытие (`stop`, `take`, `trailing_stop`) — размер базового актива, который он закрывает, как было запрошено при создании.\n\namount.format: int32\n\namount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- indexPrice (string · int32 · nullable; обязательно)\n\nindexPrice пример: 1000000000\n\nindexPrice.Тип: string · int32 · nullable\n\nindexPrice.Цена индекса, по которой был исполнен ордер, fp9 в сыром виде. Null, пока ордер не исполнен.\n\nindexPrice.format: int32\n\nindexPrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- settlementOraclePrice (string · int32; обязательно)\n\nsettlementOraclePrice пример: 1000000000\n\nsettlementOraclePrice.Тип: string · int32\n\nsettlementOraclePrice.Всегда `1000000000` (1.0). Сохранено для обратной совместимости.\n\nsettlementOraclePrice.format: int32\n\nsettlementOraclePrice.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- createdAt (string · date-time; обязательно)\n\ncreatedAt пример: 2026-05-01T12:30:00.000Z\n\ncreatedAt.Тип: string · date-time\n\ncreatedAt.Когда ордер был принят.\n\ncreatedAt.format: date-time\n\n- error (string[]; обязательно)\n\nerror пример: [\n  \"string\"\n]\n\nerror.Тип: string[]\n\nerror.Всегда null. Сохранён для обратной совместимости — используйте `errorCode`.\n\nerror.[]Тип: string\n\n- realizedPnl (string · int32 · nullable; обязательно)\n\nrealizedPnl пример: 1000000000\n\nrealizedPnl.Тип: string · int32 · nullable\n\nrealizedPnl.Pnl, реализованный этим ордером, fp9 в сыром виде. Устанавливается только для исполненного ордера на закрытие; null, пока ордер в ожидании, и для ордеров, которые открывают или увеличивают позицию.\n\nrealizedPnl.format: int32\n\nrealizedPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- rawRealizedPnl (string · int32 · nullable; обязательно)\n\nrawRealizedPnl пример: 1000000000\n\nrawRealizedPnl.Тип: string · int32 · nullable\n\nrawRealizedPnl.Реализованный pnl до 60-секундной корректировки, fp9 в сыром виде. Отличается от `realizedPnl` только тогда, когда корректировка сработала.\n\nrawRealizedPnl.format: int32\n\nrawRealizedPnl.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- profitAdjustmentApplied (boolean; обязательно)\n\nprofitAdjustmentApplied пример: true\n\nprofitAdjustmentApplied.Тип: boolean\n\nprofitAdjustmentApplied.Ограничила ли 60-секундная корректировка прибыль этого ордера — в течение минуты после открытия или увеличения позиции pnl позиции не может вырасти выше значения, которое было в тот момент.\n\n- executedAfterPause (boolean; обязательно)\n\nexecutedAfterPause пример: true\n\nexecutedAfterPause.Тип: boolean\n\nexecutedAfterPause.Был ли ордер исполнен после рыночной паузы. Не задаётся текущим движком — всегда `false`.\n\n- sizeMode (string · enum; обязательно)\n\nsizeMode пример: quote\n\nsizeMode.Тип: string · enum\n\nsizeMode.Как был выражен размер при создании: `quote` задаёт размер ордера по `amount`, `base` задаёт его по `baseSize`.\n\nsizeMode.Допустимые значения: [\"quote\",\"base\"]\n\n- baseSize (string · int32 · nullable; обязательно)\n\nbaseSize пример: 1000000000\n\nbaseSize.Тип: string · int32 · nullable\n\nbaseSize.Размер ордера в единицах базового актива, fp9 в сыром виде. Null для ордеров с размером `quote`.\n\nbaseSize.format: int32\n\nbaseSize.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- reservedAmount (string · int32 · nullable; обязательно)\n\nreservedAmount пример: 1000000000\n\nreservedAmount.Тип: string · int32 · nullable\n\nreservedAmount.Сумма в котируемой валюте, зарезервированная при создании ордера с sizeMode=base, fp9 в сыром виде. Остаётся равной исходному резерву после исполнения, тогда как `amount` перезаписывается на потраченную сумму. Null для ордеров с размером `quote`, где `amount` — это резерв.\n\nreservedAmount.format: int32\n\nreservedAmount.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- errorCode (string[]; обязательно)\n\nerrorCode пример: [\n  \"string\"\n]\n\nerrorCode.Тип: string[]\n\nerrorCode.Почему исполнение не удалось, задаётся вместе со статусом `canceled_by_error` — например, `insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth` или `slippage_tolerance`. В остальных случаях Null.\n\nerrorCode.[]Тип: string\n\n- reason (string · enum · nullable; обязательно)\n\nreason пример: force_close\n\nreason.Тип: string · enum · nullable\n\nreason.Почему платформа сама отменила ордер, например `force_close` или `weekly_session_risk_close`. Null для отмен, инициированных трейдером.\n\nreason.Допустимые значения: [\"force_close\",\"stop_accounts_fail\",\"stop_accounts_freeze\",\"stop_accounts_promote\",\"stop_accounts_manual\",\"weekly_session_risk_close\",null]\n\nПример\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":"Создать новый ордер Размещает ордер и возвращает его в том виде, в котором его сохранил торговый движок. Ордера на увеличение (`market`, `limit`, `stop_market`, `stop_limit`) открывают или увеличивают позицию; ордера закрытия (`stop`, `take`, `trailing_stop`) привязываются к существующей позиции через `positionId`. `amount` читается в разных единицах для каждого из двух: в ордере на увеличение это сумма в котируемой валюте, зарезервированная из свободного баланса; в ордере на закрытие это размер базового актива позиции для закрытия, при этом ничего не резервируется. Остальные поля размера (`expectedAmount`, `sizeMode`, `baseSize`, `leverage`) относятся только к ордерам на увеличение. Помимо схемы на уровне полей, запрос проверяется на: - **Форма для типа.** Каждое отклонение здесь — это `400`, код которого указывает на проблемную комбинацию полей: - размер — `amount_not_positive`, `base_size_required`, `base_size_negative`, `base_size_not_allowed`; - плечо — `leverage_required`, `leverage_negative`; - цена триггера — `trigger_price_required`, `trigger_price_negative`; - стоп-лосс / тейк-профит, привязанные к ордеру на увеличение — `stop_trigger_price_negative`, `take_trigger_price_negative`, `stop_trigger_price_gt_trigger_price`, `stop_trigger_price_lt_trigger_price`, `take_trigger_price_gt_trigger_price`, `take_trigger_price_lt_trigger_price`; - цена стоп-лимит — `stop_limit_price_required`, `stop_limit_price_negative`, `stop_limit_price_gt_trigger_price`, `stop_limit_price_lt_trigger_price`; - трейлинг-стоп — `trailing_stop_activation_price_negative`, `trailing_stop_offset_required`, `trailing_stop_offset_conflict`, `trailing_stop_offset_negative`, `trailing_stop_offset_percent_negative`, `trailing_stop_offset_percent_gte_one`; - ордера на закрытие — `position_id_required`. - **Плечо** ордера на увеличение. Должно оставаться в границах рынка: не ниже минимума рынка и не выше максимума фазы, с `invalid_leverage` (`leverage` плюс `minLeverage` или `maxLeverage` в теле). - **Аккаунт.** Должен принадлежать вызывающему и находиться в торговом статусе; ордера на увеличение дополнительно отклоняются, пока аккаунт заблокирован лимитом управляемого капитала, и требуют, чтобы `amount` был доступен как свободный баланс. - **Рынок.** Должен быть открыт и относиться к категории, в которой аккаунт может торговать (crypto или RWA). Рынок только для закрытия принимает только `take`-ордер, созданный без триггерной цены. - **Позиция**, когда задан `positionId`: она должна существовать (`position_not_found`), быть открытой, находиться на том же аккаунте, принадлежать тому же рынку и иметь то же направление, что и ордер (`position_not_available`). - **Триггерная цена**, относительно текущей рыночной цены и — для `stop` / `take` — относительно цены ликвидации позиции (`trigger_price_gt_current`, `trigger_price_lt_current`, `trigger_price_gt_liquidation`, `trigger_price_lt_liquidation`). `market`-ордер с прикреплённым стоп-лоссом / тейк-профитом проверяется относительно цены ликвидации, которая будет у его позиции после исполнения: `market_price_unavailable` когда нет текущей цены для проверки, `order_validation_invariant` когда поля размера, необходимые для этого прогноза, отсутствуют. - **Нотионал** ордера на увеличение. `(amount − fee) × leverage` должен укладываться в максимальный открытый нотионал, который рынок допускает в этом направлении (`order_exceeds_max_open_notional`). Отложенный ордер здесь не исполняется, поэтому он всё ещё может завершиться ошибкой, когда позже сработает его триггер: тогда он получает статус `canceled_by_error` и `errorCode` (`insufficient_reserve_at_execution`, `order_below_min_notional`, `order_exceeds_market_depth`, `order_exceeds_max_open_notional`, `order_zero_size_at_execution`, `slippage_tolerance`, `market_close_only_at_execution`), а его резерв освобождается. Отправьте заголовок `x-idempotency-key`, чтобы сделать вызов безопасным при повторной отправке: в пределах окна повторной отправки, указанного в этом заголовке, тот же ключ на том же маршруте воспроизводит сохранённый ответ (помеченный `X-Idempotency-Cached: true` и `X-Idempotency-Timestamp`) вместо повторного выполнения, а второй вызов, поступивший, пока первый всё ещё выполняется, получает `409` (`idempotency_key_in_flight`). POST /orders Trading x-idempotency-key Ключ идемпотентности — любая непрозрачная строка, uuid v4 хорошо подходит. Повторный вызов с тем же ключом на этом маршруте в течение 1 часа воспроизводит сохранённый ответ вместо повторного выполнения; при воспроизведении возвращаются `X-Idempotency-Cached: true` и `X-Idempotency-Timestamp`. Чтобы отказаться, не указывайте заголовок. string accountId Trader account the order is placed on. Must belong to the caller. string · uuid marketId Market the order is placed on, as returned by `GET /v2/markets`. string · uuid type Order type. Increase (position-opening) types: `market`, `limit`, `stop_market`, `stop_limit`. Close types, attached to an existing position: `stop`, `take`, `trailing_stop`. `liquidation` is raised by the platform itself and `add_margin` / `remove_margin` are legacy — none of the three is accepted here. string · enum direction Order direction. For a close order it must match the direction of the position it is attached to. string · enum positionId Position a close order (`stop`, `take`, `trailing_stop`) is attached to. Required for those types, ignored for increase orders. string · uuid · nullable amount What the order is sized by, fp9 raw — the unit depends on the order class. On an increase order (`market`, `limit`, `stop_market`, `stop_limit`) it is a **quote** amount reserved from the free balance (margin, fee, spread and buffer): the account must hold at least this much, and the reserve is released when the order is cancelled. On a close order (`stop`, `take`, `trailing_stop`) it is the **base asset** size of the position to close and nothing is reserved; a size larger than the position holds closes it in full. string · int32 expectedAmount Slippage tolerance for increase orders: the position size the caller expects for `amount`, fp9 raw. Execution outside the tolerance fails with `slippage_tolerance`. Omitted or `0` — no tolerance check. Not applicable to close orders. string · int32 · nullable leverage Leverage, fp9 raw (`10000000000` = 10x). Required for increase orders and must be within the leverage bounds of the market. string · int32 · nullable triggerPrice Price at which the order fires, fp9 raw. Required for `limit`, `stop`, `take`, `stop_market` and `stop_limit`, and rejected for `market`. For `stop` / `take`, `0` means the order is created without a trigger and can be set later. string · int32 · nullable stopTriggerPrice Stop-loss attached to an increase order, fp9 raw. Must sit below the entry trigger price for `long` and above it for `short`. string · int32 · nullable takeTriggerPrice Take-profit attached to an increase order, fp9 raw. Must sit above the entry trigger price for `long` and below it for `short`. string · int32 · nullable trailingStopActivationPrice Price at which a `trailing_stop` starts trailing, fp9 raw. Omitted — the order trails from the moment it is created. string · int32 · nullable trailingStopOffset Trailing distance as an absolute quote amount, fp9 raw. Exactly one of `trailingStopOffset` / `trailingStopOffsetPercent` is required. string · int32 · nullable trailingStopOffsetPercent Trailing distance as a fraction of price, fp9 raw and strictly below `1000000000` (100%). Exactly one of `trailingStopOffset` / `trailingStopOffsetPercent` is required. string · int32 · nullable stopLimitPrice Limit price a `stop_limit` order is placed at once its trigger fires, fp9 raw. Required for that type; must be at or below the trigger price for `long` and at or above it for `short`. string · int32 · nullable sizeMode How the size of an increase order is expressed: `quote` (default) sizes it by `amount`, `base` sizes it by `baseSize` while `amount` stays the reserve. Increase orders only — a close order is always sized by `amount` in base asset units. string · enum baseSize Order size in base asset units, fp9 raw. Required when `sizeMode` is `base` and rejected otherwise, and meaningful for increase orders only. string · int32 · nullable 401 Неавторизовано 403 Аккаунт принадлежит другому пользователю (`account_access_denied`), или запрос аутентифицирован с помощью API-ключа, тогда как `api_trading` отключён на аккаунте (`api_trading_not_enabled`). Торговля на аккаунте завершена в его текущем статусе (`challenge_closed`), или аккаунт заблокирован лимитом управляемого капитала (`funded_limit_trading_locked`). Рынок приостановлен (`market_paused`) или принимает только ордера на закрытие (`market_close_only`). 404 Нет такого аккаунта, рынка или позиции. 409 Другой вызов с тем же `x-idempotency-key` всё ещё выполняется (`idempotency_key_in_flight`). Повторите попытку, когда он завершится. 429 Превышен лимит частоты запросов API-ключа (`api_key_rate_limit_exceeded`). `Retry-After` указывает, когда вернуться; тело содержит бакет (`read` / `write`), окно, которое сработало, его лимит и `retryAt`. default Ответ 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":"Публичный API Upscale","version":"d796ac9","documentation":"https://docs.upscale.trade/ru/developers","playgroundServer":"https://api.upscale.trade"}}