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

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

Open wuzzy1212 opened this issue 3 years ago • 6 comments

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

wuzzy1212 avatar Mar 07 '22 09:03 wuzzy1212

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 )

halfelf avatar Mar 09 '22 04:03 halfelf

WOW, that is strange

wuzzy1212 avatar Mar 09 '22 07:03 wuzzy1212

timezone? you get utc timestamps from binance api.

oliver-zehentleitner avatar Mar 11 '22 22:03 oliver-zehentleitner

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

NoahKa0 avatar Mar 15 '22 08:03 NoahKa0

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

ThomasAnderson01 avatar Oct 20 '23 05:10 ThomasAnderson01