Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Conversation

@big-andy-coates
Copy link

@big-andy-coates big-andy-coates commented Jan 22, 2018

Hey,

Looking at the docs, it looks like its not possible to maintain a valid cache of open orders without back the 'U' and 'u' field on the Depth event, but only one was exposed. This PR exposes the other. I've left the old accessors in there for backwards compatibility, or they could be removed...

BTW - the example the DepthCacheExample does not subscribe to changes via the WS api before getting a snapshot from the rest API, which is what is recommended by your docs.

Also, if you run the example, you'll notice that the number of bid and ask orders increases over time and sometimes drops below the original snapshot size. I would of expected a consistent cache size after each update. Not sure if there is something that can be done to avoid this?

Thanks!

Andy

@joaopsilva
Copy link
Member

Hi @datalorax , thanks for your contribution. Can you please add the @Deprecated tag to the getUpdateId()/setUpdateId() methods, and put your comemnt in JavaDoc (that getLastUpdateId should be used instead).

@big-andy-coates
Copy link
Author

@joaopsilva thanks for the review. Javadocs updated.

@joaopsilva joaopsilva closed this Jan 23, 2018
@joaopsilva joaopsilva reopened this Jan 23, 2018
@joaopsilva joaopsilva merged commit 382a679 into binance-exchange:master Jan 23, 2018
@big-andy-coates big-andy-coates deleted the expose_first_update branch January 24, 2018 09:10
nilswx pushed a commit to nilswx/binance-java-api that referenced this pull request Dec 14, 2018
…date

Expose the 'U' (first update), as well as the 'u' (final update) on Depth Event.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants