HuobiRDCenter / huobi_Golang

Go SDK for Huobi Spot API
https://www.htx.com/zh-cn/opend/newApiPages/
Apache License 2.0
176 stars 86 forks source link

How can I get history candlestick data with websocket #29

Closed TuringZhu closed 3 years ago

TuringZhu commented 3 years ago

I run https://github.com/HuobiRDCenter/huobi_Golang/blob/master/cmd/marketwebsocketclientexample/marketwebsocketclientexample.go#L22 code it just get current data. but I want to get hisotry data, e.g.: 2020-10-01 00:00:00 - 2020-11-01 00:00:00,

I have specified from and to params but it does not work.

eynzhang commented 3 years ago

@Turing-Chu , the maximum number of candlestick data for each response is limited to 300 according to our document: https://huobiapi.github.io/docs/spot/v1/en/#market-candlestick

Your example of “from”-“to” is about 1 month and I believe it exceed 300 so there will be no data returned.