Skip to main content

Kline

Subscription Example​

{
"op": "sub",
"ts": 1780372402911,
"tid": "kline-sub-1",
"tps": [{
"t": "kline",
"ch": "linear",
"p": { "pairs": ["SOLUSDT"], "pd": "15m" }
}]
}

Subscription Parameters (p)​

FieldTypeRequiredDescription
pairsarray[string]YesTrading pair list, case-insensitive
pdstringYesK-line intervals: 1m / 5m / 15m / 1h / 4h / 1d (also supports 1min / 5min / 15min notation, server normalizes internally). Invalid values → 40001

Push Fields (data)​

FieldTypeDescription
sstringTrading pair
pdstringKline interval. Futures pushes use a normalized interval. For example, if you request 15min, tps.p.pd echoes 15min and data.pd is 15m.
ostringopening price
hstringhighest price
lstringlowest price
cstringclosing price
vstringexecution volume
tlongK-line data timestamp (milliseconds). For spot trading, the timestamp of an unexpired push may fall within the period.
fboolwhether closed (true = closed)

Push Example​

{
"ts": 1780372403000,
"tps": {
"t": "kline",
"ch": "linear",
"p": { "pairs": ["BTCUSDT"], "pd": "15m" }
},
"data": {
"s": "BTCUSDT",
"pd": "15m",
"o": "64900",
"h": "65100",
"l": "64850",
"c": "65000",
"v": "100.5",
"t": 1780371900000,
"f": true
}
}