WS / K-line Channel
Address/future-ws/v1/market
Description
Retrieve K-line Data, the push frequency is as fast as once per second, data is not pushed when no event is triggered, the events that trigger a push are: Transactions.
Channel Name
kline${period}
Note: In channel names, "period" refers to the timeframe. For example: for 1 minute candlestick data: kline1min. The currently supported timeframes include:
| Time-sharing | Value |
|---|---|
| 1 minute | 1min |
| 5 minutes | 5min |
| 15 minutes | 15min |
| 30 minutes | 30min |
| 1 hour | 1hour |
| 6小时 | 6hour |
| 12小时 | 12 hours |
| 1 Day | 1day |
| 1 week | 1week |
| 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 |
Return Parameters
| Parameter Name | Required | Type | Example | Description |
|---|---|---|---|---|
| errno | Yes | int | 0 | Status Code |
| errmsg | Yes | success | success | Status message |
| op | Yes | string | sub | operation, sub: subscribe unsub: unsubscribe |
| channel | Yes | string | kline1min | Channel Name |
| symbol | Yes | string | BTC-USDT | Trading pair name |
Push Data 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 (unit: 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 | Turnover |