Comments (10)
from binance-rs-async.
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.
from binance-rs-async.
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
from binance-rs-async.
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.
from binance-rs-async.
Hi, sorry for the long delay, I was unavailable.
Futures need some work to work properly.
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.
from binance-rs-async.
however you will find that maintaining an orderbook from deltas is quite the headache because of failure management.
@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:
- Start buffering deltas into a channel BEFORE I take a snapshot
- Initiate the data structure for the orderbook from a snapshot
- Start updating from deltas and just discard deltas which are pre-snapshot timestamp
- If there is some count or timestamp mismatch on the incoming delta then refresh the snapshot and continue
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 binance-rs
as I couldn't get it to work either. Also re-initiating on failure can make the data collection for backtesting buggy
from binance-rs-async.
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.
Each stream has to monitor update ids and they have to be continuous, if they aren't, the stream should go into failure and restart.
I have code from last year I can rework to match this spec, it's not complicated.
from binance-rs-async.
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 :)
from binance-rs-async.
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?)
from binance-rs-async.
The latest PRs added support for futures websocket streaming
from binance-rs-async.
Related Issues (20)
- Stop Loss Orders & Take Profit Orders for futures HOT 3
- NOT working - get_exchange_info HOT 1
- Support Universal Transfer HOT 5
- Add cargo crate URL to github repo description HOT 1
- Crates.io description says async-std, when the Tokio is used HOT 4
- To support proxy connection to binance websocket HOT 6
- Fix: wallet api bugs HOT 12
- Margin Account cancel_all_orders on open OCO order yields MarginOCOOrderResult instead of MarginOrderCancellationResult HOT 6
- add PartialEq on OrderStatus and similar types HOT 1
- errors while using the wallet feature? HOT 2
- futures position_information implementation HOT 1
- The GET method internally creates a new `reqwest::Client` each time.
- Configure timeout of the client. HOT 5
- Dependency Dashboard
- Proxy support? HOT 11
- Version 1.3.2 didn't match with the available ones HOT 2
- Signature for this request in not valid HOT 2
- How to solve recvWindow error?
- tokio-tungstenite updating to version 0.20 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binance-rs-async.