Search code examples
python-3.xbinance-api-client

"client.get_historical_klines" from Binance API doesn't return good value


Using the function below gives me this result:

[1637971200000, '53756.29000000', '53859.31000000', '53747.77000000', '53853.57000000', '16.49892000', 1637971259999, '887949.68081540', 639, '12.00163000', '645905.65329110', '0']

client.get_historical_klines("BTCBUSD", Client.KLINE_INTERVAL_1MINUTE, "27 Nov, 2021 00:00:00","27 Nov, 2021 00:00:59")

If I compare with the graph at the same date, candle doesn't match.

BTCBUSD Graph

Where did I go wrong? Thanks


Solution

  • It is because you are looking at the wrong candle. Your picture reveals that you are in UTC+1, so you have to look at 01:00 to see the correct handle