State machine
States
State transitions
Observing state by API
REST
UseOpenOrders to see live orders and ClosedOrders / QueryOrders for historical state. The status field returns the current state string.
status:open,pending,closed,canceled,expiredvol_exec: volume filled so farreason: populated on cancellation (e.g."User requested","Order would trigger immediately")amended: boolean,trueif the order was ever amended
WebSocket v2
Subscribe to theexecutions channel for real-time state changes. Every state transition produces a message.
exec_type values:
WebSocket v1
Subscribe toopenOrders for live state updates. The feed sends a snapshot on subscribe, then incremental updates.
FIX
ExecutionReport (MsgType=8) is the primary message for order state. Key tags:Amendment and queue priority
When you amend an order, queue priority behaviour depends on what changed:Special cancellation triggers
Cancel on Disconnect (COD) — FIX only When a FIX session disconnects, all orders placed on that session are automatically canceled. COD is configured at the session level during onboarding. Dead Man’s Switch — all APIsCancelAllOrdersAfter sets a countdown timer. If not refreshed before expiry, all open orders are canceled. Use this as a safety net against connectivity issues.
timeout=0.
IOC — Immediate or Cancel
Orders with time_in_force=IOC fill immediately at the available best price and the unfilled remainder is instantly canceled with reason: "Immediate or cancel".
Reduce-only cancellation
If a reduce-only order would flip a position, it matches as much as possible and the remainder is canceled with EOrder:Reduce only:Position is closed.
Self-trade prevention
Self-trade prevention (STP) prevents your orders from matching against each other. Configure at the order level:Related guides
API comparison
Choose between REST, WebSocket, and FIX for order management
Error reference
Order error codes and cancellation reason strings
WebSocket reconnection
Reconcile order state after a disconnect
Order amends
Amend price or quantity without losing queue priority
Rate limits
How order placement and cancellation consume rate limit
FIX ExecutionReport
FIX MsgType=8 — full field reference for order state messages