Skip to main content

Kline

Subscribe the kline stream. Please find desired kline interval here.

Topic: kline.{interval}.{symbol} e.g., kline.30m.BTCUSDT

Response Parameters

ParameterTypeComments
topicstringTopic name
tsnumberThe timestamp (ms) that message is sent out
typestringData type. snapshot
dataarrayObject
> tnumberThe start timestamp (ms) of the bar
> sstringTrading pair
> cstringClose price
> hstringHigh price
> lstringLow price
> ostringOpen price
> vstringTrading 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
}