Skip to main content
Coming soon: order placement over WebSocket becomes available on September 2, 2026, on the global platform only. The EU platform is not yet supported.
Place two linked orders — a limit take-profit and a stop-limit stop-loss — of which only one can execute. When either leg fills, the engine withdraws the other. Both legs point the same way, because both exit the same position.

Rate limits

Place OCO group

Request parameters

Three prices define the pair, and the relative position of each one matters. On a sell group, price — the take-profit limit — sits above the market, while activation_price — the stop-loss trigger — sits below it. The stop_limit_price value goes beyond activation_price, so the stop-loss leg still fills after the trigger fires. Note the naming asymmetry: the response keys the legs as take_profit and stop_loss, but there is no plain client_order_id parameter — only the two per-leg forms, limit_client_order_id and stop_client_order_id.

Response

One request produces three identifiers. The group id is the id inside result, next to type: "oco" — not the frame-level id, which only echoes the request. Each leg carries its own order id. Each leg is a full order object — the take-profit reports type 7, the stop-loss type 9. See the order object reference. Timestamps, deal counters, and stp are elided in the example above for length.
Cancel the pair through order_cancel_conditional using the group id. Passing a leg id there, or the group id to order_cancel, returns error 6. The leg ids serve for tracking fills, not for cancellation.
The take-profit leg must rest as a maker order. A price that would cross the spread and execute immediately is rejected with error 150, which makes an over-tight take-profit the most common cause of a failed OCO placement.

Error codes

Standard transport errors and the shared account, rate-limit, and region codes are listed in Order Management.