Skip to main content

Trading Channel

Description

Push once if any trade is matched(taker orders)

After first subscription, it will push the recent snapshot data and then push the update data

Request Example
{
"op": "subscribe",
"args": [
{
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
}
]
}

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation, subscribe unsubscribe
argsList<Object>YesList of channels to subscribe to
> instTypeStringYesProduct Line Type, SPOT
> channelStringYesChannel name, trade
> instIdStringYesProduct id For example: ETHUSDT
Response Example
{
"event": "subscribe",
"arg": {
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
}
}

Response Parameters

ParameterTypeDescription
eventStringEvent, subscribe unsubscribe error
argObjectThe channel subscribe to
> instTypeStringproduct type, SPOT
> channelStringChannel name, trade
> instIdStringProduct id. For example: ETHUSDT
codeStringError code, returned only on error
msgStringError message
Push Data
{
"action": "snapshot",
"arg": {
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
},
"data": [
{
"ts": "1695709835822",
"price": "26293.4",
"size": "0.0013",
"side": "buy",
"tradeId": "1000000000"
}
],
"ts": 1695711090682
}

Push Parameters

ParameterTypeDescription
argObjectSuccessfully subscribed channel
> instTypeStringProduct Type, SPOT
> channelStringChannel name, trade
> instIdStringProduct id For example: ETHUSDT
actionStringPush data action, snapshot or update
dataList<Object>Subscribed data
> tradeIdStringTransaction ID
> tsStringTransaction time, millisecond format of Unix timestamp, such as 1597026383085
> priceStringTransaction price
> sizeStringTransaction quantity
> sideStringTransaction direction

How was your Reading Experience with us?