Classes Files

com::wombat::mamda::orderbook::MamdaOrderBookHandler

More…

Inherited by com.wombat.mamda.examples.MamdaListenerBookPublisher.BookTicker

Public Functions

  Name
void onBookRecap(MamdaSubscription subscription, MamdaOrderBookListener listener, MamaMsg msg, MamdaOrderBookComplexDelta delta, MamdaOrderBookRecap event, MamdaOrderBook book)
void onBookDelta(MamdaSubscription subscription, MamdaOrderBookListener listener, MamaMsg msg, MamdaOrderBookSimpleDelta event, MamdaOrderBook book)
void onBookComplexDelta(MamdaSubscription subscription, MamdaOrderBookListener listener, MamaMsg msg, MamdaOrderBookComplexDelta event, MamdaOrderBook book)
void onBookClear(MamdaSubscription subscription, MamdaOrderBookListener listener, MamaMsg msg, MamdaOrderBookClear event, MamdaOrderBook book)
void onBookGap(MamdaSubscription subscription, MamdaOrderBookListener listener, MamaMsg msg, MamdaOrderBookGap event, MamdaOrderBook fullBook)

Detailed Description

class com::wombat::mamda::orderbook::MamdaOrderBookHandler;

Process updates on the order book. Concrete instances of this interface are passed to the [MamdaOrderBookListener](classcom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaOrderBookListener.html) in order for an application to receive callbacks on order book update events.

Public Functions Documentation

function onBookRecap

void onBookRecap(
    MamdaSubscription subscription,
    MamdaOrderBookListener listener,
    MamaMsg msg,
    MamdaOrderBookComplexDelta delta,
    MamdaOrderBookRecap event,
    MamdaOrderBook book
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • delta The order book delta generated from the update.
  • event The MamdaOrderBookRecap.
  • book The book.

Method invoked when an updated full order book image is available. The reason for the invocation may be any of the following:

  • Initial image.
  • Recap update (e.g., after server fault tolerant event or data quality event.)
  • After stale status removed.

function onBookDelta

void onBookDelta(
    MamdaSubscription subscription,
    MamdaOrderBookListener listener,
    MamaMsg msg,
    MamdaOrderBookSimpleDelta event,
    MamdaOrderBook book
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event The order book delta generated from the update.
  • book The full order book after the update is applied.

Method invoked when a regular update for an order book is available.

function onBookComplexDelta

void onBookComplexDelta(
    MamdaSubscription subscription,
    MamdaOrderBookListener listener,
    MamaMsg msg,
    MamdaOrderBookComplexDelta event,
    MamdaOrderBook book
)

Parameters:

  • subscription The MamdaSubscription handle.
  • listener The order book listener that received the update.
  • msg The MamaMsg that triggered this invocation.
  • event Details of the the delta.
  • book The current full book (after applying the delta).

Method invoked when an order book delta is reported. A delta consists of one or more price levels (add/update/delete), each of which contains zero or more entries (add/update/delete). Some feeds do not provide order book entry information.

function onBookClear

void onBookClear(
    MamdaSubscription subscription,
    MamdaOrderBookListener listener,
    MamaMsg msg,
    MamdaOrderBookClear event,
    MamdaOrderBook book
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event The clear event.

Method invoked when an order book is cleared.

function onBookGap

void onBookGap(
    MamdaSubscription subscription,
    MamdaOrderBookListener listener,
    MamaMsg msg,
    MamdaOrderBookGap event,
    MamdaOrderBook fullBook
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event Access to details on the order book gap event.
  • fullBook The full order book.

Method invoked when a gap in order book updates is discovered.


Updated on 2023-03-31 at 15:30:38 +0100