Replies: 2 comments 4 replies
-
the data object returned to the L2 callback has a delta field with the delta, and it has the book field with the complete orderbook. you can access either one at any time, so you can control yourself how often you take the snapshot vs the delta |
Beta Was this translation helpful? Give feedback.
-
yep, the code follows the binance documentation. the documentation tells you to get a snapshot and the apply deltas to it. Is it possible that someone enters an order at the 5001th level and it eventually makes it into relevant levels above? Probably, but the binance documentation doesnt mention this, and it seems like an event of very low relevance to me. If you feel otherwise, please feel free to open a PR to address the issue. |
Beta Was this translation helpful? Give feedback.
-
I am wondering how to configure the L2_BOOK feed so as to maintain a snapshot of the book with deltas and periodic snapshots when connecting to Binance. I see that
snapshot_interval
is listed in the 1.6.1 changelog, but it currently doesn't seem to be in the exchange codebase. I found this issue #604 -- but I am not familiar enough with the code to guess what the best practice is (until this is resolved?). Should I setmax_depth
to 5K .. 10K .. 20K? How do I control how often I receive a snapshot?(NB this is for machine learning -- I do want the whole book or as much as I can get.)
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions