gateio / gateapi-python

250 stars 93 forks source link

possible issue with list_futures_candlesticks #129

Closed sanJuan2021 closed 1 year ago

sanJuan2021 commented 2 years ago

settle = 'usdt' contract = 'BTC_USDT' api_response = api_instance.list_futures_candlesticks(settle, contract, interval='1h')

returns data. But the following call doesn't return anything:

api_response = api_instance.list_futures_candlesticks(settle, contract, interval='1h',to = 1546935600)

to = 1546935600 is taken from code sample.

revilwang commented 2 years ago

API only returns the latest 30d's data. to is too old. It is an example value, you can replace it to any other time in recent 30 days.

sanJuan2021 commented 2 years ago

So this function cannot be used to pull historical data?

revilwang commented 2 years ago

You can download historical data from https://www.gate.io/developer/historical_quotes

sanJuan2021 commented 2 years ago

Ok. Can you tell me what's the meaning of the "size" column in the candlestick files?

revilwang commented 2 years ago

Total number of contracts traded during one interval. It has the same meaning with the size in a futures order.