sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
6.06k stars 2.21k forks source link

Binance klines are much different than what the website and app shows #1156

Open wuzzy1212 opened 2 years ago

wuzzy1212 commented 2 years ago

Sorry to post this here but I am hoping that someone can help me with an extremely annoying issue I am having. Im almost bald from the hair pulling.

This is more of an issue with Binance, then it is with this library. But I thought i would put it here to see if anyone else is having the same issues.

What happens is when I pull the 20 latest candles from Binance on the 1m interval, the open and close values I am getting back are much different than what the website and APP shows, and this is painful because my algo and AI depend on that data to create my formulas. Has anyone seen this issue?

image image image

As you can see the open and close should be showing 2.40200000 for open and 2.40110000 for close, when its showing open as 2.3940 and close 2.4014 WTH?

Also, if you look below and above the line in the array i am cross referencing with you can see that those values do not match either so its not like the value for the 9:07 candle is at 9:08 or 9:06.

*To Reproduce** Pull the last 20 minute candles from ANY symbol, they will not match the website

Expected behavior Expected that the data matches in the web/app AND API

halfelf commented 2 years ago

Sorry, cannot reproduce.

Don't know why your web page shows wrong data.

My screenshot: 捕获

The prices exactly matches the candles in your image. ( note: I'm in GMT+8 timezone )

wuzzy1212 commented 2 years ago

WOW, that is strange

oliver-zehentleitner commented 2 years ago

timezone? you get utc timestamps from binance api.

NoahKa0 commented 2 years ago

Hi, I was actually looking for another issue but I saw this and thought maybe I can help.

You candles don't match because you selected "heikin ashi" candles. There is a formula applied on these to make it more likely to get consecutive red and green candles.

You need to go to the top of the chart and select the normal candles. Untitled

ThomasAnderson01 commented 1 year ago

Hi bro, do you solve this odd problem? This problem seems still alive...