Skip to main content

Trade Channel

Get the public trade data

Request Parameters

ParameterTypeRequiredDescription
opstringYesOperation, subscribe unsubscribe
argslistYesList of channels to request subscription
> instTypestringYesProduct type: SPOT
> channelstringYesChannel name: trade
> instIdstringYesProduct 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

ParameterTypeDescription
actionstringPush data action: snapshot / update
argobjectChannels with successful subscription
> instTypestringProduct type: SPOT
> channelstringChannel name: trade
> instIdstringProduct ID E.g. BTCUSDT
datalistTrade data list
> tradeIdstringTrade ID
> tsstringTrade time
> pricestringFilled price
> sizestringFilled amount
> sidestringFilled side: sell / buy
tsnumberPush 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
}