WebSocket / Kline Channel
Endpoint: /ws/v1/spot/market
Description
Provides real-time Kline (candlestick) data for spot trading pairs.
Channel Name
kline${period}
Note:
${period}represents the Kline interval.
Example: 1-minute Kline useskline1min.
Supported intervals:
| 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 |
Subscription Example
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 | Trading volume (contracts) |
| count | No | int | 1 | Number of trades |
| open | No | string | 1935.2000 | Open price |
| close | No | string | 1879.0000 | Close price |
| low | No | string | 1856.0000 | Low price |
| high | No | string | 1940.0000 | High price |
| vol | No | string | 71031537.978665 | Trading turnover |
| ts | Yes | long | 1597026383085 | Data timestamp (milliseconds) |