Advanced Order Types and Time in Force
Configure limit, stop, stop-limit, GTC, DAY, and GTD orders and understand their trigger, expiry, escrow, and cancellation behavior.
| Order type | Required fields | Initial behavior |
|---|---|---|
| MARKET | quoteId | Executes against the current dealing workflow. |
| LIMIT | limitPrice | Rests as WORKING until executable or cancelled. |
| STOP | stopPrice | Rests until the trigger is crossed, then enters the execution queue. |
| STOP_LIMIT | stopPrice, limitPrice | Triggers into a limit order. |
Prices (limitPrice, stopPrice) are always in the instrument's local trading currency — the same
units a quote's price is quoted in, so you never have to convert.
Resting orders are available on both the master account and sub-accounts, and behave identically:
| Master account | Sub-account | |
|---|---|---|
| Place | POST /trade | POST /users/{userId}/trade |
| Modify | PATCH /orders/{orderId} | PATCH /users/{userId}/orders/{orderId} |
| Cancel | DELETE /orders/{orderId} | DELETE /users/{userId}/orders/{orderId} |
A MARKET order is quote-gated and requires a quoteId. A resting order is not — you are setting
the price yourself — so it can be placed while the exchange is closed, which is the point: it triggers
when the market reopens and the price crosses.
Time in force
GTCkeeps the order live until execution or cancellation (the default).DAYautomatically cancels if it is not executed within 24 hours.GTDcancels atexpiresAt; the timestamp is required.IOCandFOKare not supported. Orders settle through a dealing desk rather than an automated matching engine, so immediate-or-cancel semantics cannot be honoured. SubmittingIOCreturns a400explaining this.
Modifying a resting order
PATCH an order to change limitPrice, stopPrice, and/or quantity, keeping the same orderId.
Only WORKING resting orders can be modified — a MARKET order is already PENDING at the dealing desk
and can only be cancelled. Check replaceable on the order to know which applies.
An Idempotency-Key is required, because a replace moves money: a BUY re-escrows the difference
(and is refused with INSUFFICIENT_FUNDS if the wallet cannot cover an increase), and a SELL adjusts
the reserved units. A replace is repriced on the same FX basis and fee rates captured when the order
was first placed, so modifying an order never silently reprices it against a newer rate. The response
carries escrowAdjustment on a BUY, and an order.replaced event is emitted.
On expiry or cancellation, BUY escrow is refunded and SELL reservations are released. An order.cancelled event is emitted. Do not infer a fill from a trigger; inspect executions and final order status.
Was this page useful?
Your signal helps us tighten partner onboarding docs.
Last updated on