Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

[Binance] Order book gets out of sync after a while #203

Closed
badgerwithagun opened this issue Jun 17, 2018 · 4 comments
Closed

[Binance] Order book gets out of sync after a while #203

badgerwithagun opened this issue Jun 17, 2018 · 4 comments

Comments

@badgerwithagun
Copy link
Collaborator

I've noticed that an order book snapshot gets out of sync over time (even including #197). We're definitely not using quite the same approach described in Binance's docs for accurately syncing via the streaming API. The solution is probably to follow that more slavishly and/or to do periodic refreshes from the pull API.

I'll be looking into this properly when I get a chance. Just recording it here for reference.

@davidjirovec
Copy link
Contributor

How do you check if it gets out of sync? In which way are they out of sync? Missing values? Wrong values?

There is also repo with implementation of Java client for their api https://github.com/binance-exchange/binance-java-api

@badgerwithagun
Copy link
Collaborator Author

It usually seems to manifest as filled orders not disappearing at the top of the book, so let's say you have bid at 6001 and ask at 6002 on the ticker, the bid and ask sides of the order book might have orders at 6012, 6013 left over from before the price dropped.

Pretty sure the reason will become obvious when I start digging into it...

@davidjirovec
Copy link
Contributor

I would guess it might be an issue of xchange-stream not working with lastUpdateId

@badgerwithagun
Copy link
Collaborator Author

Duplicate of #86

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

No branches or pull requests

2 participants