-
Notifications
You must be signed in to change notification settings - Fork 112
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
Is futures websocket stream not implemented? #46
Comments
I think it's not implemented. I also need this feature, and I am currently working on it. It's going smooth so far, but it will still take some time to do it right, especially since I'm new with Rust. |
I actually managed to get it working yesterday by just changing the URL. However, I didn't have time to look into whether the library is building the orderbook from deltas or just getting the entire orderbook every time because that wouldn't be very efficient. Do you know? I don't even know if Binance supports sending orderbook deltas to avoid sending the entire book every 100 ms |
I don't use the orderbooks in my application. Fom what I understood you can ask for the orderbook of a market, specifying the depth you want, and after that you can subscribe to a websocket that will send you new additions to the order book in real time. You are supposed to match the orders yourself. |
Hi, sorry for the long delay, I was unavailable. In spot, binance offers two modes for orderbooks, one with deltas and one where you get updates every 100ms. It maybe your opinion that getting ticks for orderbooks is overkill, however you will find that maintaining an orderbook from deltas is quite the headache because of failure management. If you'd like example/library code for orderbook management specifically we can work on that. |
@Igosuki is there a better way than just refreshing the book from a new snapshot when you miss a delta, it doesn't seem to happen often to me? I'm using the following flow in general for Binance:
It would be great to see a suggested example implementation though in this library of following the futures orderbooks. I've had to write my own implementation by hacking together logic from this package and |
Ideally, you'll manage fault tolerance with having multiple websocket streams up, and a way to realign your data with live data in case the main data stream fails. I have code from last year I can rework to match this spec, it's not complicated. |
Hi @Igosuki are futures coming to the library? Also, I can see that Binance allows live subscription/unsubscription to new instruments for depth, for example: https://binance-docs.github.io/apidocs/spot/en/#live-subscribing-unsubscribing-to-streams However this doesn't seem to be supported in the library. I'm quite happy to help with the coding, in needed :) |
Hey, I'm up for it but I wanted to wait to see if binance could produce an
open API spec for futures.
Let me get back to you on that.
…On Wed, Aug 16, 2023, 14:35 zelenij ***@***.***> wrote:
Hi @Igosuki <https://github.com/Igosuki> are futures coming to the
library?
Also, I can see that Binance allows live subscription/unsubscription to
new instruments for depth, for example:
https://binance-docs.github.io/apidocs/spot/en/#live-subscribing-unsubscribing-to-streams
However this doesn't seem to be supported in the library
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADDFBT6AUFJ24K7TWUZHQ3XVS5C5ANCNFSM56GHABAQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hasn't it been published and in use for quite a bit? The .NET library has had support for futures for awhile now. Also, the "dynamic subscription" support sounds like an easy win. Without it, if you want to subscribe to more/fewer instruments with this library, you have to recreate the web sockets (unless I'm missing something?) |
The latest PRs added support for futures websocket streaming |
I see the endpoint is available in the code but it is not used anywhere, spot endpoint is used by default in
connect
andconnect_multiple
.The text was updated successfully, but these errors were encountered: