tiagosiebler / binance

Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & browser support, integration tests, beautification & more.
MIT License
728 stars 264 forks source link

Add support for new binance futures ws url & mechanism #193

Open tiagosiebler opened 2 years ago

tiagosiebler commented 2 years ago

https://binance-docs.github.io/apidocs/futures/en/#change-log

New connection method for WEBSOCKET.

ronytesler commented 1 year ago

What's the difference between fstream.binance and fstream-auth.binance? The docs are really not clear.

tiagosiebler commented 1 year ago

There's some docs here: https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams

I'd like to move away from opening one stream per topic, instead following the pattern of my other connectors:

It'll take some refactoring though, especially tracking subscribed topics and re-subscribing if the connection drops and is respawned.

ronytesler commented 1 year ago

I read this doc, it doesn't explain the difference. You wanting to follow this pattern has anything to do with the difference between the two streams? According to the docs, you can follow this patter while using both streams.

tiagosiebler commented 1 year ago

True, I don't see a difference either so perhaps this is more of a fallback/alternative domain than a successor.

ronytesler commented 1 year ago

Binance told me it's the same, the one without auth won't be supported in the future.

tiagosiebler commented 1 year ago

That's good to know, so it is the successor but otherwise works the same. Should get it implemented after heavy testing. At least in an optional way where it's configurable which one to use.