Kline
Interval supported:
135153060120240360720minuteDdayWweekMmonth
info
If confirm is true, then the data is a final tick for this interval. Otherwise, it is a snapshot.
Push frequency: 1-60s
Topic:
kline.{interval}.{symbol}
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| topic | string | Topic name |
| type | string | Message type. snapshot |
| ts | number | The timestamp (ms) that system generates the data. |
| data | array | Object |
| > start | number | Candle start timestamp (ms) |
| > end | number | Candle end timestamp (ms) |
| > interval | string | Interval |
| > open | string | Open price |
| > close | string | Close price. If not closed, it is last price |
| > high | string | Highest price |
| > low | string | Lowest price |
| > volume | string | Trading volume |
| > turnover | string | Trading turnover |
| > confirm | boolean | true: last tick. false: this is snapshot data |
| > timestamp | number | The timestamp (ms) of the last matched order in the candle |
Subscription Example
{
"op": "subscribe",
"args": [
"kline.5.BTCUSDT"
],
"req_id": "test" // optional
}
Stream Example
{
"topic": "kline.5.BTCUSDT",
"data": [
{
"start": 1671187800000,
"end": 1671188099999,
"interval": "5",
"open": "16991",
"close": "16980.5",
"high": "16991",
"low": "16980.5",
"volume": "2.501",
"turnover": "42493.2305",
"confirm": false,
"timestamp": 1671187815755
}
],
"ts": 1671187815755,
"type": "snapshot"
}