binance / binance-websocket-examples

Example code in Nodejs that demonstrate how to subscribe to Binance Websocket server.
MIT License
154 stars 52 forks source link

Futures stream prblem #16

Closed RalphCodesTheInternet closed 3 years ago

RalphCodesTheInternet commented 3 years ago

Hi

Whenever I create a futures stream like this: wss://stream.binancefuture.com/stream?streams= ... the data that I get from open, close etc. differs slightly with what I can see while having Binance open in the web browser. Some times by as much as ~3 to 5 units.

And when I open a normal stream like this: wss://stream.binance.com:9443/stream?streams= ... the data is very accurate and even has more decimal places.

How can I solve this issue so that the data from the futures stream is just as accurate as the normal streams?

I tested on ETHUSDT perpetual on Futures and ETHUSDT on the FIAT markets

2pd commented 3 years ago

wss://stream.binancefuture.com/stream?streams= ==> this is futures TEST net websocket. wss://stream.binance.com:9443/stream?streams= ==> this is spot Production websocket.

Please make sure you are using the correct stream name.

RalphCodesTheInternet commented 3 years ago

Thanks for responding!

Where can I find the production futures server then? I could not find anything in the documentation

2pd commented 3 years ago

these details are in the api document.

https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams