WebSocket / Kline Channel
Endpoint: /ws/v1/futures/market
Description
Provides real-time Kline (candlestick) data.
The fastest push interval is 1 second. No data will be pushed if no triggering event occurs.
Triggering events include: trades.
Channel Name
kline${period}
Note:
${period}represents the kline interval.
For example, 1-minute kline useskline1min.
The supported intervals are listed below:
| Interval | Value |
|---|---|
| 1 Minute | 1min |
| 5 Minutes | 5min |
| 15 Minutes | 15min |
| 30 Minutes | 30min |
| 1 Hour | 1hour |
| 6 Hours | 6hour |
| 12 Hours | 12hour |
| 1 Day | 1day |
| 1 Week | 1week |
| 1 Month | 1mon |
Subscription Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| op | Yes | string | sub | Operation: sub to subscribe, unsub to unsubscribe |
| channel | Yes | string | kline1min | Channel name |
| symbol | Yes | string | BTC-USDT | Trading pair |
Response Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| errno | Yes | int | 0 | Status code |
| errmsg | Yes | string | success | Status message |
| op | Yes | string | sub | Operation: sub or unsub |
| channel | Yes | string | kline1min | Channel name |
| symbol | Yes | string | BTC-USDT | Trading pair |
Push Data Fields
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| channel | Yes | string | kline1min | Channel name |
| symbol | Yes | string | BTC-USDT | Trading pair |
| id | Yes | long | 1499184000 | Kline ID |
| amount | Yes | string | 37593 | Traded quantity (contracts) |
| count | Yes | int | 1 | Number of trades |
| open | Yes | string | 1935.2000 | Open price |
| close | Yes | string | 1879.0000 | Close price |
| low | Yes | string | 1856.0000 | Low price |
| high | Yes | string | 1940.0000 | High price |
| vol | Yes | string | 71031537.978665 | Trading volume |