Skip to main content
Understanding how an order moves through states is critical for systematic trading. This page documents every state, what triggers each transition, and how to observe them across the three API protocols.

State machine

States

State transitions

Observing state by API

REST

Use OpenOrders to see live orders and ClosedOrders / QueryOrders for historical state. The status field returns the current state string.
Response includes:
  • status: open, pending, closed, canceled, expired
  • vol_exec: volume filled so far
  • reason: populated on cancellation (e.g. "User requested", "Order would trigger immediately")
  • amended: boolean, true if the order was ever amended

WebSocket v2

Subscribe to the executions channel for real-time state changes. Every state transition produces a message.
Key exec_type values:

WebSocket v1

Subscribe to openOrders 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:
For market-making strategies: reducing size without changing price preserves priority. This is a key advantage of AmendOrder over cancel-replace (CancelOrder + AddOrder).

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 APIs CancelAllOrdersAfter sets a countdown timer. If not refreshed before expiry, all open orders are canceled. Use this as a safety net against connectivity issues.
Refresh it periodically from your trading loop. Cancel it by setting 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:

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