Subscribe to live trade data as individual ticks or time-batched OHLCV aggregations.
TRADE
TRADE_AGG
Type-specific parameters
These parameters are in addition to the common channel parameters.
| Parameter | Type | Applies to | Required | Description |
|---|---|---|---|---|
batchInterval | string | TRADE_AGG | No | Aggregation window (e.g., 200ms, 1s, 5s). |
Raw trades (TRADE)
Individual trades with price, size, and side.
Subscribe
JSON
{
"jsonrpc": "2.0",
"id": 0,
"method": "public/subscribe",
"params": {
"channels": [
{
"type": "TRADE",
"category": "*",
"exchange": "BINANCE_FUTURES",
"symbol": "BTCUSDT"
}
],
"compression": "brotli",
"version": "v2"
}
}
Response
JSON
{
"points": [
{
"series": {
"type": "TRADE",
"symbol": "BTCUSDT",
"exchange": "BINANCE_FUTURES",
"normalizedSymbol": "BTC-USDT",
"category": "PERPETUAL",
"side": "BUY",
"coin": "BTC",
"inverse": false
},
"trade": {
"id": "7126482260",
"price": 90003,
"amount": 0.002,
"timestamp": {
"seconds": 1769058875,
"nanoseconds": 830000000
}
}
}
]
}
Response fields
| Field | Type | Description |
|---|---|---|
series.side | Side | Trade side -- BUY or SELL |
trade.id | string | Exchange trade ID |
trade.price | double | Trade price |
trade.amount | double | Trade size in base asset |
trade.timestamp | Timestamp | Trade execution time (seconds + nanoseconds) |
Aggregated trades (TRADE_AGG)
Trades batched into OHLCV candles over a rolling time window. Useful for rendering real-time charts without processing every individual tick.
Subscribe
JSON
{
"jsonrpc": "2.0",
"id": 0,
"method": "public/subscribe",
"params": {
"channels": [
{
"type": "TRADE_AGG",
"category": "*",
"exchange": "BINANCE_FUTURES",
"symbol": "BTCUSDT",
"batchInterval": "200ms"
}
],
"compression": "brotli",
"version": "v2"
}
}
Response
JSON
{
"points": [
{
"series": {
"type": "TRADE_AGG",
"symbol": "BTCUSDT",
"exchange": "BINANCE_FUTURES",
"normalizedSymbol": "BTC-USDT",
"category": "PERPETUAL",
"session": "0",
"side": "SELL",
"coin": "BTC",
"inverse": false
},
"tradeAggregation": {
"open": 90004.8,
"high": 90004.8,
"low": 90004.8,
"close": 90004.8,
"volume": 0.02,
"timestamp": {
"seconds": 1769058939,
"nanoseconds": 800000000
},
"firstTimestamp": {
"seconds": 1769058939,
"nanoseconds": 865000000
},
"lastTimestamp": {
"seconds": 1769058939,
"nanoseconds": 865000000
}
}
}
]
}
Response fields
| Field | Type | Description |
|---|---|---|
series.side | Side | Aggressor side for this batch |
tradeAggregation.open | double | First trade price in the batch |
tradeAggregation.high | double | Highest trade price |
tradeAggregation.low | double | Lowest trade price |
tradeAggregation.close | double | Last trade price |
tradeAggregation.volume | double | Total volume in the batch |
tradeAggregation.timestamp | Timestamp | Batch timestamp |
tradeAggregation.firstTimestamp | Timestamp | Time of the first trade in the batch |
tradeAggregation.lastTimestamp | Timestamp | Time of the last trade in the batch |