get https://api.huobi.us/market/history/kline
This endpoint retrieves all klines in a specific range.
/* GET /market/history/kline?period=1day&size=200&symbol=btcusdt */
{
"status": "ok",
"ch": "market.btcusdt.kline.1day",
"ts": 1499223904680,
“data”: [
{
"id": 1499184000,
"amount": 37593.0266,
"count": 0,
"open": 1935.2000,
"close": 1879.0000,
"low": 1856.0000,
"high": 1940.0000,
"vol": 71031537.97866500
},
// more data here
]
}
/* GET /market/history/kline?period=not-exist&size=200&symbol=ethusdt */
{
"ts": 1490758171271,
"status": "error",
"err-code": "invalid-parameter",
"err-msg": "invalid period"
}
/* GET /market/history/kline?period=1day&size=not-exist&symbol=ethusdt */
{
"ts": 1490758221221,
"status": "error",
"err-code": "bad-request",
"err-msg": "invalid size, valid range: [1,2000]"
}
/* GET /market/history/kline?period=1day&size=200&symbol=not-exist */
{
"ts": 1490758171271,
"status": "error",
"err-code": "invalid-parameter",
"err-msg": "invalid symbol"
}