Kline
Subscribe the kline stream. Please find desired kline interval here.
Topic: kline.{interval}.{symbol}
e.g., kline.30m.BTCUSDT
Response Parameters
Parameter | Type | Comments |
---|---|---|
topic | string | Topic name |
ts | number | The timestamp (ms) that message is sent out |
type | string | Data type. snapshot |
data | array | Object |
> t | number | The start timestamp (ms) of the bar |
> s | string | Trading pair |
> c | string | Close price |
> h | string | High price |
> l | string | Low price |
> o | string | Open price |
> v | string | Trading volume |
Subscribe Example
{
"req_id": "kline00001", //optional
"op": "subscribe",
"args": [
"kline.30m.BTCUSDT"
]
}
Stream Example
{
"type": "snapshot",
"topic": "kline.30m.BTCUSDT",
"data": {
"s": "BTCUSDT",
"t": 1673436600000,
"o": "17439.16",
"c": "17437.82",
"h": "17450.45",
"l": "17433.5",
"v": "34.059614"
},
"ts": 1673438143609
}