You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
But the first check never passes. So, is there a mistake in the docs, or is the docs only for v1 and if so, how should I handle the order book when using API v3?
The text was updated successfully, but these errors were encountered:
Hello Cecily, I think the problem is you keep fetching snapshots. You only need 1 snapshot and then start processing the events. The first event to be processed is the event where its U <= snapshot.lastUpdateId AND its u >= snapshot.lastUpdateId.
However, you also need to make sure that for each event processed AFTER the first event, currentEvent.U == previousEvent.u + 1.
If the previous condition breaks at any moment, you will need to fetch another snapshot and repeat.. etc
Hope that helps, that's how I implemented it. Feel free to ask for more insight.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've issues to handle local order book. The docs says:
At the end of: https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md#how-to-manage-a-local-order-book-correctly
But the first check never passes
I fetch market depth from
http://api.binance.com/api/v3/depth
I'm listening depth websocket stream like so
AND
But the first check never passes. So, is there a mistake in the docs, or is the docs only for
v1
and if so, how should I handle the order book when using APIv3
?The text was updated successfully, but these errors were encountered: