epam / java-cme-mdp3-handler

Java Market Data Handler for CME Market Data (MDP 3.0)
GNU Lesser General Public License v3.0
75 stars 31 forks source link

Market data subscription logic #16

Open jheusser opened 7 years ago

jheusser commented 7 years ago

Currently the high-level API MarketDataListener allows you to be notified on top of book refresh with providing the top level only (and not tracking depth), or full refresh providing the whole book and getting every update (also e.g. 5th level quantity change).

It would be quite useful to keep populating the whole book, but only get a callback when the top level (price or quantity) changed with a reference to the full book. This is a combination of subscribedToTop and subscribedToEntireBook of ImpliedBookHandler.

iamolever commented 7 years ago

I suppose the combination should be implemented as possible option. The idea of subscribedToTop to do not even spend a processing time if you need just top of the book in business logic. But yes, from application point of view, in case of high-level, an application probably requests current state of entire book and reacts to top of the book notifications ... So you are right in this case:-)