WebSocket API

Order Channel

Authenticated order lifecycle stream for your account

Channel name: order

Authentication

You must send a successful auth message before subscribing.

{ "op": "sub", "channel": "order" }

No params field is required. The stream is account-scoped. You may optionally pass { "market": "BTC-PERP" } to receive updates for a single market only.

Message Types

Snapshot

Sent immediately after subscribing. Contains all non-done orders — PENDING, OPEN, and UNTRIGGERED (e.g. stop and TWAP orders awaiting trigger).

{
  "channel": "order",
  "type": "snapshot",
  "data": [
    {
      "oid": "550e8400-e29b-41d4-a716-446655440000",
      "mkt_id": "BTC-PERP",
      "sd": "ORDER_SIDE_BUY",
      "ot": "ORDER_TYPE_LIMIT",
      "sz": "1.0",
      "px": "50000.00",
      "sndr": "0xabcd...",
      "st": "ORDER_STATUS_OPEN",
      "po": false,
      "ro": false,
      "tif": "TIME_IN_FORCE_GTC",
      "filled_sz": "0",
      "avg_px": "0",
      "tot_fees": "0",
      "crt_ts": "1234567890000000000",
      "upd_ts": "1234567890000000000",
      "cl_oid": "",
      "cancel_req": false,
      "trades": []
    }
  ],
  "gsn": 12345,
  "ts": "1234567890000000000"
}

Update

Incremental order state transitions (accepted, open, partially filled, filled, canceled, rejected).

{
  "channel": "order",
  "type": "update",
  "filter": "BTC-PERP",
  "data": [
    {
      "oid": "550e8400-e29b-41d4-a716-446655440000",
      "mkt_id": "BTC-PERP",
      "sd": "ORDER_SIDE_BUY",
      "ot": "ORDER_TYPE_LIMIT",
      "sz": "1.0",
      "px": "50000.00",
      "st": "ORDER_STATUS_DONE",
      "filled_sz": "1.0",
      "avg_px": "49999.50",
      "tot_fees": "4.99",
      "trades": []
    }
  ],
  "gsn": 12346,
  "ts": "1234567891000000000"
}

Fields

Order fields in WebSocket messages use the same v1Order schema as the REST API:

FieldTypeDescription
filterstringMarket ID filter (e.g. "BTC-PERP")
oidstringOrder ID (UUID)
mkt_idstringMarket ID
sdstringORDER_SIDE_BUY or ORDER_SIDE_SELL
otstringORDER_TYPE_LIMIT, ORDER_TYPE_MARKET, ORDER_TYPE_STOP, ORDER_TYPE_TWAP
szstringOrder size
pxstringOrder price
sndrstringSender wallet address
ststringORDER_STATUS_PENDING, ORDER_STATUS_OPEN, ORDER_STATUS_DONE, ORDER_STATUS_UNTRIGGERED
pobooleanPost-only flag
robooleanReduce-only flag
tifstringTIME_IN_FORCE_GTC, TIME_IN_FORCE_IOC, TIME_IN_FORCE_FOK, TIME_IN_FORCE_GTT
stpstringSelf-trade prevention mode
filled_szstringFilled size
avg_pxstringAverage fill price
tot_feesstringTotal fees paid
crt_tsstringCreation timestamp (nanoseconds)
upd_tsstringLast update timestamp (nanoseconds)
cl_oidstringClient-provided order ID
noncenumberOrder signing nonce
done_rsnstringReason an order reached ORDER_STATUS_DONE
stop_pxstringStop trigger price (stop/TWAP orders)
stop_px_typestringStop price type
stop_tstringStop trigger time
is_liqbooleanOrder is a liquidation order
liq_fee_rtstringLiquidation fee rate
mkr_fee_rtstringMaker fee rate
tkr_fee_rtstringTaker fee rate
cancel_reqbooleanCancel has been requested
cancel_req_tsstringTimestamp of cancel request (nanoseconds)
exp_tsstringExpiry timestamp for GTT orders (nanoseconds)
sched_tsstringScheduled execution timestamp (nanoseconds)
tradesarrayAlways []

See the full schema in POST /orders and GET /orders.

On this page