orderUpdates channel sends incremental state changes for every order associated with an account — the moment an order is placed, partially filled, fully filled, cancelled, or when a conditional (TP/SL) order triggers or is cancelled. On subscribe the server first sends one frame of recent order history (see History snapshot on subscribe); live increments follow. That snapshot contains only orders that have already terminated — for a full view of orders currently resting, subscribe to openOrders or query userOrders.
Pass the account’s wallet address (not the numeric account ID) as the user parameter.
Subscribing
Push envelope
All order update messages share this envelope structure:data array may contain multiple entries when several orders change state in the same block.
Regular order entry
Field reference
History snapshot on subscribe
Immediately after a successful subscription the server pushes one frame carrying up to the last 10 terminated orders, so a client can render history without a separate REST call. It differs from an incremental frame in two ways:Snapshot row fields
Working with the snapshot:
- The payload is at
data.rows, anddatais an object rather than an array. (openOrdersalso sends an object, but its payload key isorders.) - Quoted fields are big integers carried as strings (
order_id,cl_ord_id,price, every*_qty). They can exceed the JavaScript safe-integer range — never pass them throughNumber()before comparing or echoing them back. side,ord_type, andstatusare numeric here and strings in the incremental frames. Map them before display.- It contains only terminated orders. Orders still working are not included — use the
openOrdersfirst frame oruserOrdersfor those. - Fewer than 10 rows, or none at all, is normal — the account may have little history, or the history service may be briefly unavailable. Do not treat it as an error.
- The snapshot and the increments that follow may overlap. Deduplicate by order ID (
order_idin the snapshot,idin increments); nothing is dropped. - The snapshot is fixed at 10 rows, with no paging and no cursor. For deeper history use
orderHistory.
Cancel entry
When an order is cancelled, a compact entry is sent with"st": "Canceled". The s field carries the remaining unfilled size at the time of cancellation.
Rejected order entry
If the matching engine rejects an order (for example, the contract doesn’t exist, insufficient margin, or a position-mode mismatch), a"st": "Rejected" entry is pushed here. A rejected order appears only on this channel — it is never assigned an order ID, never appears in openOrders, and cannot be found by any order-ID or client-order-ID query.
A rejected entry omits
t / tif / p / s — the order never became active, so it has none of those attributes. b appears only when a valid direction can be resolved.
Conditional (TP/SL) order entry
Conditional orders include"cond": true and use a different set of status values:
Conditional order statuses:
orderUpdates provides only incremental changes — there is no initial snapshot on subscribe. If you need the full list of currently active orders as a starting point, subscribe to openOrders first.