Kline
Subscription Example
{
"op": "sub",
"ts": 1780372402911,
"tid": "kline-sub-1",
"tps": [{
"t": "kline",
"ch": "linear",
"p": { "pairs": ["SOLUSDT"], "pd": "15m" }
}]
}
Subscription Parameters (p)
| Field | Type | Required | Description |
|---|---|---|---|
pairs | array[string] | Yes | Trading pair list, case-insensitive |
pd | string | Yes | K-line intervals: 1m / 5m / 15m / 1h / 4h / 1d (also supports 1min / 5min / 15min notation, server normalizes internally). Invalid values → 40001 |
Push Fields (data)
| Field | Type | Description |
|---|---|---|
s | string | Trading pair |
pd | string | Kline interval. Futures pushes use a normalized interval. For example, if you request 15min, tps.p.pd echoes 15min and data.pd is 15m. |
o | string | opening price |
h | string | highest price |
l | string | lowest price |
c | string | closing price |
v | string | execution volume |
t | long | K-line data timestamp (milliseconds). For spot trading, the timestamp of an unexpired push may fall within the period. |
f | bool | whether 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
}
}