This topic sends a new candlestick whenever it is available.
market.$symbol$.kline.$period$
Topic Parameter
key | necessary | type | description | value |
---|---|---|---|---|
symbol | true | string | Pairs | ethbtc, ltcbtc, etcbtc, bccbtc... |
period | true | string | KLine period | 1min, 5min, 15min, 30min, 60min, 1day, 1mon |
{
"sub": "market.ethbtc.kline.1min",
"id": "id1"
}
{
"id": "id1",
"status": "ok",
"subbed": "market.ethbtc.kline.1min",
"ts": 1489474081631
}
Update Parameter
Field | Data Type | Description | |
---|---|---|---|
id | integer | UNIX epoch timestamp in second as response id | |
amount | float | Aggregated trading volume during the interval (in base currency) | |
count | integer | Number of trades during the interval | |
open | float | Opening price during the interval | |
close | float | Closing price during the interval | |
low | float | Low price during the interval | |
high | float | High price during the interval | |
vol | float | Aggregated trading value during the interval (in quote currency) |
{
"ch": "market.ethbtc.kline.1min",
"ts": 1489474082831,
"tick": {
"id": 1489464480,
"amount": 0.0,
"count": 0,
"open": 7962.62,
"close": 7962.62,
"low": 7962.62,
"high": 7962.62,
"vol": 0.0
}
}
Pull Request
Pull request is supported with extra parameters to define the range.
Parameter | Data Type | Required | Default Value | Description | Value Range |
---|---|---|---|---|---|
from | integer | false | 1501174800(2017-07-28T00:00:00+08:00) | "From" time (epoch time in second) | [1501174800, 2556115200] |
to | integer | false | 2556115200(2050-01-01T00:00:00+08:00) | "To" time (epoch time in second) | [1501174800, 2556115200] or ($from, 2556115200] if "from" is set |
{
"req": "market.$symbol.kline.$period",
"id": "id generated by client",
"from": "from time in epoch seconds",
"to": "to time in epoch seconds"
}