Trade Channel
Get the public trade data
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| op | string | Yes | Operation, subscribe unsubscribe |
| args | list | Yes | List of channels to request subscription |
| > instType | string | Yes | Product type: SPOT |
| > channel | string | Yes | Channel name: trade |
| > instId | string | Yes | Product ID E.g. BTCUSDT |
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
}
]
}
Response Example
{
"event": "subscribe",
"arg": {
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
}
}
Push Parameters
| Parameter | Type | Description |
|---|---|---|
| action | string | Push data action: snapshot / update |
| arg | object | Channels with successful subscription |
| > instType | string | Product type: SPOT |
| > channel | string | Channel name: trade |
| > instId | string | Product ID E.g. BTCUSDT |
| data | list | Trade data list |
| > tradeId | string | Trade ID |
| > ts | string | Trade time |
| > price | string | Filled price |
| > size | string | Filled amount |
| > side | string | Filled side: sell / buy |
| ts | number | Push timestamp |
Push Data
{
"action": "snapshot",
"arg": {
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
},
"data": [
{
"tradeId": "1695716760001",
"ts": "1695716760565",
"price": "27000.5",
"size": "0.001",
"side": "buy"
},
{
"tradeId": "1695716760002",
"ts": "1695716759514",
"price": "27000.0",
"size": "0.001",
"side": "sell"
}
],
"ts": 1695716761589
}