python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

passing a datetime into get_historical_kline() ?

Open leemthai opened this issue 1 year ago • 1 comments

I am familiar with this sort of code and have it working well:

klines = client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1 Jan, 2018")

But I have had no luck passing a specific time into these kinds of functions?

Is that possible or does it always read data from the start of the day in question? Cheers.

leemthai avatar Feb 18 '25 08:02 leemthai

Hello @leemthai,

Not sure you're providing the correct format, can you try to provide a timestamp in milliseconds?

carlosmiei avatar Feb 26 '25 12:02 carlosmiei