WS / K-line Channel
Address/ws/v1/market
Description
Get K-line Data
Channel Name
kline${period}
Note: In the channel name, "period" refers to the time interval. For example, for the 1-minute candlestick: kline1min. The currently supported intervals are as follows:
| Time Sharing | Value |
|---|---|
| 1 minute | 1min |
| 5 minutes | 5min |
| 15 minutes | 15min |
| 30 minutes | 30min |
| 1 hour | 1hour |
| 6 hours | 6hour |
| 12 hour | 12hour |
| 1 day | 1day |
| 1 week | 1 week |
| January | 1mon |
Submission Parameters
| Parameter Name | Required | Type | Example | Description |
|---|---|---|---|---|
| op | Yes | string | sub | operation, sub: subscribe unsub: unsubscribe |
| channel | Yes | string | kline1min | Channel Name |
| symbol | Yes | string | BTC-USDT | Trading pair name |
Submission Example
Return Parameters
| Parameter Name | Required | Type | Example | Description |
|---|---|---|---|---|
| channel | Yes | string | kline1min | Channel Name |
| symbol | Yes | string | BTC-USDT | trading pair |
| id | Yes | long | 1499184000 | K-line id |
| amount | Yes | string | 37593 | Transaction volume (in contracts) |
| count | Yes | int | 1 | Number of transactions |
| open | Yes | string | 1935.2000 | Opening Price |
| close | Yes | string | 1879.0000 | Closing Price |
| low | Yes | string | 1856.0000 | Lowest price |
| high | Yes | string | 1940.0000 | Highest Price |
| vol | Yes | string | 71031537.978665 | Trading Volume |
| ts | Yes | long | 1597026383085 | Data generation time, millisecond-level timestamp |