Skip to main content

Start with a lifecycle record, not only an order ID

  1. Submit the order request and store the request metadata you will need later: trader, strategy, symbol, nonce, client timestamp, and local submission time.
  2. Bootstrap current order and strategy state from REST before you rely on realtime user-data feeds.
  3. Subscribe to ORDER_UPDATE and STRATEGY_UPDATE with traderAddress and optional strategyIdHash, symbol, or reason filters.
  4. Correlate updates by the stable order identity fields in the payload, plus orderMatchOrdinal and per-outcome ordinals where applicable.
  5. Apply updates using the documented ordering fields, not local arrival time alone.
  6. Keep the order open until a terminal state is explicit in the update stream or reconciled from REST history.

Use a state model that matches the platform

StateMeaning
SubmittedClient sent the request but has not yet confirmed sequencing acceptance
Sequenced / acceptedThe platform admitted the request into ordered processing
PostedOrder entered the book without immediate full fill
Partially filledThe order has fills plus remaining size
Fully filledNo remaining size exists
CanceledRemaining size was intentionally removed
RejectedThe order never became a live executable order or a later lifecycle operation failed
Liquidated / ADL-resolvedOrder/account effects were resolved through stressed-path safety handling

Reconnect and replay safely

  1. If the WebSocket disconnects, reconnect first.
  2. Resubscribe to the affected feeds.
  3. Resume one update family with its own globalOrdinal history rules if you need gap repair.
  4. Reconcile the target order plus its strategy state from REST before concluding the live state is complete again.

Important edge cases

Edge caseWhy it matters
Rejected outcomes with placeholder maker fieldsFully rejected orders can carry incomplete maker-intent fields; do not over-trust those values
Multi-outcome matchesOne match can generate multiple ORDER_UPDATE outcomes; use orderMatchOrdinal and per-outcome ordinal fields
Balance effects after trading outcomesFees, funding, liquidation, and PnL realization can appear on strategy or trader surfaces in addition to order updates

Next routes

Last modified on April 13, 2026