Websocket channel for Sym K line data
Description
Interval: 1s
Request
{"event": "subscribe", "arg": [{ "channel": "kline","interval":"1m", "sym":"BINANCE_PERP_BTC_USDT" }]}
| Field name | Type | Necessary | Remarks |
|---|---|---|---|
| event | String | Y | subscribe / unsubscribe |
| args | Array | Y | Subscribe param. There can be no more than 50 sym parameters per subscribe. |
| > channel | String | Y | Channel name: kline |
| > sym | String | Y | Unique identifier |
| > interval | String | Y | K Line interval, [1m/3m/5m/15m/30m/1H/2H/4H/8H/12H/1D/2D/5D/1W/1M] |
Response
{"event":"subscribe","arg":[{"channel":"kline","interval":"1m","sym":"BINANCE_PERP_BTC_USDT"}],"code":0,"message":"Success"}
| Field | Type | Remarks |
|---|---|---|
| event | String | subscribe / unsubscribe |
| code | String | Error Code |
| msg | String | Error Message |
| args | Array | Subscribe param |
| > channel | String | Channel name: markprice |
| > sym | String | Unique identifier |
| > interval | String | K Line interval, [1m/3m/5m/15m/30m/1H/2H/4H/8H/12H/1D/2D/5D/1W/1M] |
Data Sample:
{
"arg":{
"channel":"kline",
"sym":"BINANCE_PERP_BTC_USDT",
"interval":"1m"
},
"data":[
[
"1732093980000",
"93483.1",
"93499",
"93452.5",
"93461.5",
"177.371"
]
]
}
| Field | Type | Remarks |
|---|---|---|
| > channel | String | kline |
| > sym | String | Unique identifier |
| > interval | String | K Line interval, [1m/3m/5m/15m/30m/1H/2H/4H/8H/12H/1D/2D/5D/1W/1M] |
| data | Array | Data |
| > ts | String | Timestamp, in Unix millionsecond. e.g. 1732093591811 |
| > o | String | Open Price for the interval |
| > h | String | Highest Price for the interval |
| > l | String | Lowest Price for the interval |
| > c | String | Close Price for the interval |
| > vol | String | Trading Quantity for the interval. Perp for the quantity of underlying coin; Spot for the quantity of quotation coin. |
