WebSocket / Trade Channel
Endpoint: /ws/v1/futures/market
Description
Provides real-time trade data.
Whenever a trade occurs, a push message will be sent.
Each push contains one single trade record.
Channel Name
trade
Subscription Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| op | Yes | string | sub | Operation: sub to subscribe, unsub to unsubscribe |
| channel | Yes | string | trade | Channel name |
| symbol | Yes | string | BTC-USDT | Trading pair |
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 | trade | Channel name |
| symbol | Yes | string | BTC-USDT | Trading pair |
Push Data Fields
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| channel | Yes | string | trade | Channel name |
| symbol | Yes | string | BTC-USDT | Trading pair |
| id | Yes | long | 17592256642623 | Trade ID |
| amount | Yes | string | 0.04 | Trade quantity (contracts) |
| deal_amount | No | string | 0.12 | Executed quantity (base currency amount) |
| price | Yes | number | 1997 | Trade price |
| direction | Yes | string | buy | Trade side: buy or sell |
| ts | Yes | number | 1502448920106 | Trade timestamp (milliseconds) |