Skip to content

WebSocket / Order Channel

Endpoint: /ws/v1/spot/order

Channel Name

order

Description

This channel pushes real-time order-related events for spot trading, including: - New order creation - Order cancellation - Trade execution updates

Subscription Parameters

Parameter Required Type Example Description
op Yes string sub Operation: sub to subscribe, unsub to unsubscribe
channel Yes string order Channel name
token Yes string 57ba172a6be125cca2f449826f9980ca User token. Available in User Center → OpenAPI
Nonce Yes string 1534927978_ab43c Random nonce generated per request. Format: timestamp_random(5). Time drift must not exceed 60 seconds. Each nonce can only be used once
Signature Yes string v490hupi0s0bckcp6ivb69p921 Request signature generated from token, secret_key, and nonce. Verification rules are identical to REST API signatures

Subscription Example

JSON
{
  "op": "sub",
  "channel": "order",
  "token": "57ba172a6be125cca2f449826f9980ca",
  "Nonce": "1534927978_ab43c",
  "Signature": "v490hupi0s0bckcp6ivb69p921"
}

Push Data Parameters

Parameter Required Type Example Description
channel Yes string order Channel name
ts Yes number 1502448920 Push timestamp (seconds)
order Yes object See below Order data

Order Object Fields

Parameter Required Type Example Description
symbol Yes string BTC-USDT Trading pair
order_id Yes string BG5000181583375122413SZXEIX Order ID
side Yes string SELL Order side
order_type Yes string LIMIT Order type: LIMIT (limit order), MARKET (market order)
amount Yes string 20 Original order quantity. For market buy orders, this represents the notional amount
entrust_time Yes number 1502448920 Order submission time (seconds)
price Yes string 68000 Order price. Empty for market orders
trigger_price No string 70000 Trigger price for conditional orders
event Yes string NEW Event type: NEW (new order), CANCELED (order canceled), TRADE (trade execution)
status Yes string NEW Order status: NEW, PARTIALLY_FILLED, FILLED, PARTIALLY_CANCELED, CANCELED
last_amount No string 12 Last executed quantity
last_price No string 68000 Last execution price
last_fee No string 0.23 Last execution fee
ts No number 1502448920 Trade execution timestamp (seconds)

Push Example

JSON
{
  "channel": "order",
  "ts": 1710208544,
  "order": {
    "symbol": "ETH-USDT",
    "side": "BUY",
    "amount": "",
    "last_price": "",
    "last_fee": "",
    "last_amount": "",
    "price": "3800",
    "event": "NEW",
    "order_id": "BL2217102085443303CZQ2P",
    "order_type": "LIMIT",
    "status": "NEW",
    "ts": ""
  }
}