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:
| Field | Type | Description |
|---|---|---|
filter | string | Market ID filter (e.g. "BTC-PERP") |
oid | string | Order ID (UUID) |
mkt_id | string | Market ID |
sd | string | ORDER_SIDE_BUY or ORDER_SIDE_SELL |
ot | string | ORDER_TYPE_LIMIT, ORDER_TYPE_MARKET, ORDER_TYPE_STOP, ORDER_TYPE_TWAP |
sz | string | Order size |
px | string | Order price |
sndr | string | Sender wallet address |
st | string | ORDER_STATUS_PENDING, ORDER_STATUS_OPEN, ORDER_STATUS_DONE, ORDER_STATUS_UNTRIGGERED |
po | boolean | Post-only flag |
ro | boolean | Reduce-only flag |
tif | string | TIME_IN_FORCE_GTC, TIME_IN_FORCE_IOC, TIME_IN_FORCE_FOK, TIME_IN_FORCE_GTT |
stp | string | Self-trade prevention mode |
filled_sz | string | Filled size |
avg_px | string | Average fill price |
tot_fees | string | Total fees paid |
crt_ts | string | Creation timestamp (nanoseconds) |
upd_ts | string | Last update timestamp (nanoseconds) |
cl_oid | string | Client-provided order ID |
nonce | number | Order signing nonce |
done_rsn | string | Reason an order reached ORDER_STATUS_DONE |
stop_px | string | Stop trigger price (stop/TWAP orders) |
stop_px_type | string | Stop price type |
stop_t | string | Stop trigger time |
is_liq | boolean | Order is a liquidation order |
liq_fee_rt | string | Liquidation fee rate |
mkr_fee_rt | string | Maker fee rate |
tkr_fee_rt | string | Taker fee rate |
cancel_req | boolean | Cancel has been requested |
cancel_req_ts | string | Timestamp of cancel request (nanoseconds) |
exp_ts | string | Expiry timestamp for GTT orders (nanoseconds) |
sched_ts | string | Scheduled execution timestamp (nanoseconds) |
trades | array | Always [] |
See the full schema in POST /orders and GET /orders.