Skip to main content

Advanced Order Management

Advanced Order Management provides trigger orders and multi-leg execution strategies beyond basic LIMIT and MARKET orders. Use these endpoints for conditional order execution based on price triggers.

Trigger Orders

Trigger orders activate when a reference price condition is met. Use private/advanced/create-order to create trigger orders.

TypeDescription
STOP_LOSSConverts to a market order when trigger price is reached. Used to limit losses.
STOP_LIMITConverts to a limit order when trigger price is reached. Offers price control on stop execution.
TAKE_PROFITMarket order activated when price moves favorably to the trigger level. Used to lock in gains.
TAKE_PROFIT_LIMITLimit order activated when price moves favorably to the trigger level.

Trigger orders require:

  • ref_price — the trigger price
  • ref_price_type — reference price source: MARK_PRICE (default), INDEX_PRICE, or LAST_PRICE

Multi-Leg Strategies

Multi-leg orders link multiple orders together with conditional execution logic.

StrategyDescriptionEndpoint
OCO (One-Cancels-Other)Two orders where filling one cancels the other. Typically pairs a take-profit with a stop-loss.private/advanced/create-oco
OTO (One-Triggers-Other)Primary order triggers a secondary order when filled. Used to attach TP/SL to an entry order.private/advanced/create-oto
OTOCO (One-Triggers-OCO)Primary order triggers an OCO pair when filled. Entry order with both TP and SL attached.private/advanced/create-otoco

Contingency Types

Multi-leg orders use contingency types to define the relationship between legs:

TypeDescription
OCOOne-Cancels-Other: two orders, one cancels when the other fills
SPOT_ATTACHAttach trigger orders to a spot position
DERIV_ATTACHAttach trigger orders to a derivatives position (supports isolated margin)

Order Management

Real-Time Updates

Subscribe to user.advanced.order for real-time advanced order lifecycle events.