Skip to main content

Public trade

This topic pushes raw trade information; each trade has a unique buyer and seller.

Variable "v" acts as a tradeId. This variable is shared across different symbols; however, each ID is unique. For example, suppose in the last 5 seconds 3 trades happened in ETHUSDT, BTCUSDT, and BHTBTC. Their tradeId (which is "v") will be consecutive: 112, 113, 114.

Push frequency: real-time

Topic: trade.{symbol}

Response Parameters

ParameterTypeComments
topicstringTopic name
tsnumberThe timestamp (ms) that message is sent out
typestringData type. snapshot
dataarrayObject
> vstringTrade ID
> tnumberTimestamp (trading time in the match box)
> pstringPrice
> qstringQuantity
> mbooleanTrue indicates buy side is taker, false indicates sell side is taker
> typestringTrade type. 0:Spot trade. 1:Paradigm block trade

Subscribe Example

{
"req_id": "trade0001", //optional
"op": "subscribe",
"args": [
"trade.BTCUSDT"
]
}

Stream Example

{
"topic": "trade.BTCUSDT",
"ts": 1673437259397,
"type": "snapshot",
"data": {
"v": "2290000000036455162",
"t": 1673437259395,
"p": "17440",
"q": "0.0002",
"m": false,
"type": "0"
}
}