Orders Channel

Real-time order updates with initial snapshot.

Channel: orders
Authentication: Required


Subscribe

{
  "method": "subscribe",
  "params": {
    "channel": "orders",
    "market_ids": [1, 2]
  }
}
ParameterTypeRequiredDescription
market_idsnumber[]NoFilter by market IDs. Empty = all markets
makersstring[]NoAccount filter. Omit it — an authenticated client is scoped to its own account

Authenticate before subscribing: for an authenticated client the subscription is scoped to its own account.

Message Format

Snapshot

Sent immediately after subscribing. Contains your currently open orders.

{
  "method": "snapshot",
  "channel": "orders",
  "type": "snapshot",
  "data": [
    {
      "id": "0x0000000400001157000000000126f0fc000000000000026d",
      "wide_order_id": "17179873623",
      "resting_order_id": "8589936811",
      "client_order_id": "1786935033988075033",
      "market_id": "1",
      "sender": "0x36Dc0d99DCaEe443cEbaa5FB8c11877d157C26df",
      "side": "SELL",
      "type": "LIMIT",
      "time_in_force": "GTC",
      "status": "ORDER_STATUS_OPEN",
      "price": "63232.6",
      "size": "1.316786",
      "filled_size": "0.015356",
      "avg_price": "63232.6",
      "fee_bps": "150",
      "expiry": "0",
      "post_only": true,
      "reduce_only": false,
      "is_liquidation": false,
      "stop_type": "TAKE_PROFIT",
      "stop_price": "",
      "stop_price_option": "LAST_TRADED_PRICE",
      "stp_mode": "EXPIRE_MAKER",
      "cancel_reason": "",
      "cancel_requested": false,
      "cancel_requested_at": "0",
      "cancel_tx_hash": "",
      "created_at": "1786935035000000000",
      "tx_hash": "0x4c0c4591888718a4a5cb6a94bf1b30b0ec676f53ce93d16989ff2582a9e25135",
      "block_number": "19329289",
      "log_index": "634"
    }
  ],
  "order_count": 1,
  "worker_timestamp": "1786935049123456789"
}

Update

Sent when one of your orders is placed, filled, or cancelled.

{
  "channel": "orders",
  "type": "update",
  "market_id": "1",
  "data": [
    {
      "id": "0x00000000000058c8000000000126f109000000000000027b",
      "wide_order_id": "22728",
      "resting_order_id": "11364",
      "client_order_id": "4078518646",
      "market_id": "1",
      "sender": "0xc8303Dc1a06EC10d69DF9C7B65D17395C83B1Aa6",
      "side": "BUY",
      "type": "MARKET",
      "time_in_force": "IOC",
      "status": "ORDER_STATUS_FILLED",
      "price": "0",
      "size": "0.000273",
      "filled_size": "0.000273",
      "avg_price": "63232.6",
      "fee_bps": "300",
      "expiry": "0",
      "post_only": false,
      "reduce_only": false,
      "is_liquidation": false,
      "cancel_reason": "filled",
      "cancel_requested": false,
      "cancel_requested_at": "0",
      "cancel_tx_hash": "",
      "created_at": "1786935048000000000",
      "tx_hash": "0x68327dc379122ea0caf5572e2aec8d4ec3ce3b2df4ccc44d73f20755c25e3d05",
      "block_number": "19329289",
      "log_index": "634"
    }
  ],
  "tx_hash": "0x68327dc379122ea0caf5572e2aec8d4ec3ce3b2df4ccc44d73f20755c25e3d05",
  "block_number": 19329289,
  "log_index": 634,
  "worker_timestamp": "1786935049200112233"
}

data is always an array — one message can carry several orders touched by the same transaction.

Snapshot Message Fields

FieldTypeDescription
methodstringAlways "snapshot"
channelstringAlways "orders"
typestringAlways "snapshot"
dataarrayArray of order objects
order_countnumberNumber of orders in the array
worker_timestampstringServer time in nanoseconds

The snapshot carries no market_id and no block metadata.

Update Message Fields

FieldTypeDescription
channelstringAlways "orders"
typestringAlways "update"
market_idstringMarket ID
dataarrayArray of order objects
tx_hashstringTransaction hash
block_numbernumberBlockchain block number
log_indexnumberLog index within the block
worker_timestampstringServer time in nanoseconds

There is no timestamp or block_timestamp field on this channel.

Order Object Fields

FieldTypeDescription
idstringComposite order ID — 24-byte hex (0x…), the ID used by POST /v1/orders/cancel
wide_order_idstringContract-side wide order ID (decimal string)
resting_order_idstringResting order ID on the book (wide_order_id >> 1, decimal string)
client_order_idstringYour client order ID, if one was sent
market_idstringMarket ID
senderstringAccount that owns the order
sidestring"BUY" or "SELL"
typestring"LIMIT" or "MARKET"
time_in_forcestring"GTC", "GTT", "IOC" or "FOK"
statusstring"ORDER_STATUS_OPEN", "ORDER_STATUS_FILLED", "ORDER_STATUS_CANCELLED"
pricestringLimit price, decimal. "0" on market orders
sizestringOrder size, decimal
filled_sizestringFilled so far, decimal
avg_pricestringAverage fill price so far, decimal. "0" if nothing filled
fee_bpsstringFee rate with denominator 1,000,000 — "300" = 0.03 %, "150" = 0.015 %
expirystringExpiry for GTT orders (nanoseconds), "0" otherwise
post_onlybooleanOrder was placed post-only
reduce_onlybooleanOrder can only reduce a position
is_liquidationbooleanOrder was created by the liquidation engine
stop_typestring"TAKE_PROFIT" or "STOP_LOSS" — only meaningful when stop_price is non-empty
stop_pricestringTrigger price, decimal. Empty string on a non-stop order
stop_price_optionstringTrigger reference: "LAST_TRADED_PRICE", "MARK_PRICE", "PRICE_OPTION_NONE"
stp_modestringSelf-trade prevention: "EXPIRE_MAKER", "EXPIRE_TAKER", "EXPIRE_BOTH"
cancel_reasonstringFree-text reason, e.g. "cancelled", "filled". Empty while the order is open
cancel_requestedbooleanA cancel has been submitted for this order
cancel_requested_atstringWhen the cancel was requested (nanoseconds), "0" if never
cancel_tx_hashstringTransaction hash of the cancel, empty if never
created_atstringBlock time when the order was placed (nanoseconds)
tx_hashstringTransaction that placed the order
block_numberstringBlock of the last update to this order (string, unlike the envelope's number)
log_indexstringLog index of the last update (string, unlike the envelope's number)
🚧

stop_type and stop_price_option are always populated

Both fields render their enum's zero value on ordinary orders, so an unrelated limit order still reports "TAKE_PROFIT" / "LAST_TRADED_PRICE". Treat the order as a stop order only when stop_price is a non-empty string.

Examples

Subscribe to all markets

{
  "method": "subscribe",
  "params": {
    "channel": "orders"
  }
}

Subscribe to specific markets

{
  "method": "subscribe",
  "params": {
    "channel": "orders",
    "market_ids": [1, 2]
  }
}

Unsubscribe

{
  "method": "unsubscribe",
  "params": {
    "channel": "orders"
  }
}

Notes

Price Format

All price and size fields are decimal strings, not wei.

Private Channel

Authenticate before subscribing. The channel is meant to carry your own orders only.