Skip to content

Conversation

@jinusean
Copy link

Resolves #705

@jinusean
Copy link
Author

I've included a test of the changes in [examples/futuresChart.js](https://github.com/jaggedsoft/node-binance-api/pull/847/files#diff-235d40e04d4f8f494e32559d54c88928679a3436f73577f7c83dd9a8b279328c).

@Eluvade
Copy link
Contributor

Eluvade commented Feb 8, 2023

Great work @jinusean!

I noticed an inaccuracy in the candlesticks(ohlcv) data that futuresChart returns.
For example, I'm subscribed to the daily chart of BTCUSDT perpetual futures market. If I fetch/curl the data directly from Binance I get: [1675728000000,"22757.80","23368.60","22742.40","23234.10","447273.494",1675814399999,"10297159070.89130",2811376,"227838.755","5246060241.38648","0"] for the last candle. This checks out. (the values I'm particularly keeping an eye out are the: open: 22757.80, high: 23368.60, low: 22742.40 and close: 23234.10)
However, for the same candle, node-binance-api returns: '1675728000000': { time: 1675728000000, closeTime: 1675814399999, open: '22759.40', high: '23998.90', low: '20941.50', close: '23253.90', volume: '189002.105', quoteVolume: '4344856857.73900', takerBuyBaseVolume: '99064.412', takerBuyQuoteVolume: '2281842110.48430', trades: 70487 }
The particular candle we're comparing is for February 7th, 2023.

I'm assuming the error lies within the way node-binance-api is processing the websocket responses, but before I dig deeper into this, I figured I should ask someone more familiar with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

futuresChart cache messed up after second new candle

2 participants