WebSocket / Order & Trade Updates
Endpoint: /ws/v1/futures/order
Description
This channel pushes real-time order-related events, including: - New order creation - Order status changes - Trade executions for existing orders
Channel Name
order
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); timestamp deviation 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. The verification rules are identical to REST API signatures |
Response Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| errno | Yes | int | 0 | Status code |
| errmsg | Yes | string | success | Status message |
| op | Yes | string | sub | Operation: sub or unsub |
| channel | Yes | string | order | Channel name |
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, MARKET, STOP_LOSS, STOP_PROFIT, HOLD_LOSS_PROFIT, LIMIT_LOSS_PROFIT) |
| quantity | Yes | string | 20 | Original order quantity. If order_type is HOLD_LOSS_PROFIT, the value is ALL, indicating the entire position |
| price | No | 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, CANCELED) |
| amount | No | string | 12 | Last executed quantity |
| deal_amount | No | string | 0.12 | Total executed quantity (base currency) |
| last_price | No | string | 68000 | Last execution price |
| last_fee | No | string | 0.23 | Last execution fee |
| is_maker | No | boolean | false | Whether the trade was a maker trade |
| ts | No | number | 1502448920 | Trade execution timestamp (seconds) |
| entrust_time | Yes | number | 1502448920 | Order submission timestamp (seconds) |
Push Example
JSON
{
"channel": "order",
"ts": 1710208544,
"order": {
"symbol": "ETH-USDT",
"side": "BUY",
"amount": "",
"deal_amount": "0.12",
"quantity": "1",
"last_fee": "",
"price": "3800",
"event": "NEW",
"order_id": "BL2217102085443303CZQ2P",
"order_type": "LIMIT",
"is_maker": false,
"status": "NEW",
"ts": 1502448920,
"entrust_time": 1502448920,
"last_price": ""
}
}