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 |
| > channel | string | Yes | Channel name |
| > instId | string | Yes | Product ID E.g. BTCUSDT |
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "trade",
"instId": "BTCUSDT"
}
]
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| event | string | Event |
| arg | object | Subscribed channels |
| > instType | string | Product type |
| > channel | string | Channel name |
| > instId | string | Product ID E.g. BTCUSDT |
| code | string | Error code |
| msg | string | Error message |
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "trade",
"instId": "BTCUSDT"
}
}
Push Parameters
| Parameter | Type | Description |
|---|---|---|
| action | string | Push data action |
| arg | object | Channels with successful subscription |
| > instType | string | Product type |
| > channel | string | Channel name |
| > instId | string | Product ID E.g. BTCUSDT |
| data | list | Subscription data |
| > price | string | Filled price |
| > size | string | Filled amount |
| > side | string | Filled side, SELL / BUY |
| > ts | number | Fill time |
Push Data
{
"action": "snapshot",
"arg": {
"instType": "USDT-FUTURES",
"channel": "ticker",
"instId": "BTCUSDT"
},
"data": [
{
"price": "27000.5",
"size": "0.001",
"side": "BUY",
"ts": 1695716760565
},
{
"price": "27000.0",
"size": "0.001",
"side": "SELL",
"ts": 1695716759514
}
],
"ts": 1695716761589
}