Open hz7451 opened 2 years ago
[Update]Oh, just a minor mistake. It was time zone problem I guess? Is there a way to get the data with custom time zone?
:param start_str: Start date string in UTC format or timestamp in milliseconds
Binance API has nothing to do with timezone. This SDK only try to convert the start_str
argument into a timestamp with UTC as the default timezone, if it is an instance of datetime.
I suggest using timestamp everywhere when needed. Just replace the datetime object with int(your_datetime.timestamp() * 1000)
, which is a milisec timestamp.
Describe the bug Here's part of my code which create csv file after received data from Binance API, I checked OHLC in speicific period and found out the data received was wrong. Compare to TradingView or Binance
To Reproduce Code snippet to reproduce the behavior:
Expected behavior Price should be same as OHLC from TradingView or Binance
Environment (please complete the following information):