Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tiagosiebler opened this issue Dec 30, 2021 · 6 comments
Open

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

tiagosiebler opened this issue Dec 30, 2021 · 6 comments

Comments

@tiagosiebler
Copy link
Owner

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

New connection method for WEBSOCKET.

  • Base Url is wss://fstream-auth.binance.com
  • Streams can be access either in a single raw stream or a combined stream
  • Raw streams are accessed at /ws/?listenKey=
  • Combined streams are accessed at /stream?streams=//&listenKey=
  • must be a valid listenKey when you establish a connection.
@ronytesler
Copy link

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

@tiagosiebler
Copy link
Owner Author

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:

  • Open a connection
  • Subscribe to topics on the same connection after the connection opened.

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

@ronytesler
Copy link

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
Copy link
Owner Author

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

@ronytesler
Copy link

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

@tiagosiebler
Copy link
Owner Author

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.

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

No branches or pull requests

2 participants