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.
Attach a take-profit and a stop-loss to an existing position rather than to an order. The pair tracks the position: it carries no size of its own and always exits whatever is open at trigger time, so a position that grows or shrinks afterwards stays covered.

Rate limits

Attach take-profit and stop-loss

Request parameters

Neither side nor amount appears among the parameters. The engine derives both from the open position, which is why the legs come back with amount "0". At least one of the two activation prices must be present — sending neither returns error 1. Supplying only one arms a take-profit or a stop-loss on its own. On a long position the take-profit trigger sits above the market and the stop-loss below; a price on the wrong side returns error 105 or 106.

Response

The result object holds the take_profit and stop_loss legs, each reporting type 10. See the order object reference. In the example both legs show side 1 — a sell closes a long position — and amount "0", meaning whatever the position holds when the trigger fires.
An open position is required. Without one the call fails with error 104, so arm the pair after the entry fills rather than alongside it. For an entry that arms its own exit in a single request, use collateral_order_oto_place instead.
Cancellation differs from the group methods. The two legs are independent orders with separate ids, so cancel each one with order_cancel. A TPSL pair has no group id, so order_cancel_conditional does not apply; separately, order_modify returns error 160 for a TPSL leg.

Error codes

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