Hi, first of all thanks for the great package. I'm trying to fetch a fixed number of candles at different timeframes, i set a start date and a limit of say 1000. But it always gets me data up to the present time, for instance, today april 3rd,
I could somewhat fix the issue by changing the code of client.py, line 999 from:
if len(temp_data) < limit:
to
if len(temp_data) == limit:
Now i can set a limit up to 1000 and have exactly that number of candles returned, but limit=1001 in the above will return again 2746 candles.
Any idea how to fix client.py so as to have the expected behavior when setting a limit. I suppose my pseudofix will not hold water in the long run. Thank you very much.
Hi, first of all thanks for the great package. I'm trying to fetch a fixed number of candles at different timeframes, i set a start date and a limit of say 1000. But it always gets me data up to the present time, for instance, today april 3rd,
ticker = 'BTCUSDT' interval=Client.KLINE_INTERVAL_4HOUR client = Client() data = client.get_historical_klines(ticker, interval, start_str='1 Jan, 2022', limit=1000)
returns 2746 candles.
I could somewhat fix the issue by changing the code of client.py, line 999 from: if len(temp_data) < limit: to if len(temp_data) == limit:
Now i can set a limit up to 1000 and have exactly that number of candles returned, but limit=1001 in the above will return again 2746 candles.
Any idea how to fix client.py so as to have the expected behavior when setting a limit. I suppose my pseudofix will not hold water in the long run. Thank you very much.