MamdaBookAtomicListener is a class that specializes in handling order book updates. More...
#include <MamdaBookAtomicListener.h>
Public Member Functions | |
MamdaBookAtomicListener () | |
virtual | ~MamdaBookAtomicListener () |
void | addBookHandler (MamdaBookAtomicBookHandler *handler) |
void | addLevelHandler (MamdaBookAtomicLevelHandler *handler) |
void | addLevelEntryHandler (MamdaBookAtomicLevelEntryHandler *handler) |
const char * | getSymbol () const |
Get the instruments string symbol. More... | |
const char * | getPartId () const |
Get the participant identifier. More... | |
const MamaDateTime & | getSrcTime () const |
Get the source time. More... | |
const MamaDateTime & | getActivityTime () const |
Get the activity time. More... | |
const MamaDateTime & | getLineTime () const |
Get the line time. More... | |
const MamaDateTime & | getSendTime () const |
Get the send time. More... | |
const MamaMsgQual & | getMsgQual () const |
Get the message qualifier. More... | |
const MamaDateTime & | getEventTime () const |
Get the event time. More... | |
mama_seqnum_t | getEventSeqNum () const |
Get the event sequence number. More... | |
MamdaFieldState | getSymbolFieldState () const |
Get the string symbol field state. More... | |
MamdaFieldState | getPartIdFieldState () const |
Get the participant identifier field state. More... | |
MamdaFieldState | getEventSeqNumFieldState () const |
Get the event sequence number field state. More... | |
MamdaFieldState | getEventTimeFieldState () const |
Get the event time field state. More... | |
MamdaFieldState | getSrcTimeFieldState () const |
Get the source time field state. More... | |
MamdaFieldState | getActivityTimeFieldState () const |
Get the activity time field state. More... | |
MamdaFieldState | getLineTimeFieldState () const |
Get the line time of the update. More... | |
MamdaFieldState | getSendTimeFieldState () const |
Get the send time field state. More... | |
MamdaFieldState | getMsgQualFieldState () const |
Get the message qualifier field state. More... | |
mama_u32_t | getPriceLevelNumLevels () const |
Return the number of price levels in the order book update. More... | |
mama_u32_t | getPriceLevelNum () const |
Return at which position this level is within an update containing a number of levels. More... | |
double | getPriceLevelPrice () const |
Return the price for this price level. More... | |
MamaPrice & | getPriceLevelMamaPrice () const |
Return the MamaPrice for this price level. More... | |
mama_f64_t | getPriceLevelSize () const |
Return the number of order entries comprising this price level. More... | |
mama_i64_t | getPriceLevelSizeChange () const |
Aggregate size at current price level. More... | |
char | getPriceLevelAction () const |
The action to apply to the orderbook for this price level. More... | |
char | getPriceLevelSide () const |
Side of book at current price level. More... | |
const MamaDateTime & | getPriceLevelTime () const |
Time of order book price level. More... | |
mama_f32_t | getPriceLevelNumEntries () const |
Number of order book entries at current price level. More... | |
mama_u32_t | getPriceLevelActNumEntries () const |
char | getPriceLevelEntryAction () const |
Order book entry action to apply to the full order book. More... | |
char | getPriceLevelEntryReason () const |
Order book entry reason. More... | |
const char * | getPriceLevelEntryId () const |
Order book entry Id. More... | |
mama_u64_t | getPriceLevelEntrySize () const |
Return the order book entry size. More... | |
const MamaDateTime & | getPriceLevelEntryTime () const |
Return the time of order book entry update. More... | |
MamdaOrderBookTypes::OrderType | getOrderType () const |
Get the Order Type. More... | |
void | setOrderType (MamdaOrderBookTypes::OrderType orderType) const |
Set the Order Type. More... | |
bool | getHasMarketOrders () const |
void | setProcessMarketOrders (bool process) const |
mama_seqnum_t | getBeginGapSeqNum () const |
The starting number of a detected sequence number gap in order book updates from the feedhandler. More... | |
mama_seqnum_t | getEndGapSeqNum () const |
The ending number of a detected sequence number gap in order book updates from the feedhandler. More... | |
virtual void | onMsg (MamdaSubscription *subscription, const MamaMsg &msg, short msgType) |
![]() | |
virtual | ~MamdaMsgListener () |
![]() | |
virtual | ~MamdaBookAtomicLevel () |
![]() | |
virtual | ~MamdaBasicRecap () |
Destructor. More... | |
![]() | |
virtual | ~MamdaBookAtomicLevelEntry () |
![]() | |
virtual | ~MamdaBookAtomicGap () |
![]() | |
virtual | ~MamdaBasicEvent () |
Destructor. More... | |
MamdaBookAtomicListener is a class that specializes in handling order book updates.
Unlike the MamdaOrderBookListener no actual order book is built or maintained. The sole purpose of this is to provide clients direct access to the orderbook updates without the overhead of maintaining a book. Developers provide their own implementation of either or both the MamdaBookAtomicLevelHandler and the MamdaBookAtomicLevelEntryHandler interfaces and will be delivered notifications for order book recaps and deltas. While the MamdaBookAtomicLevelHandler handles recaps and deltas at a Price Level granularity the MamdaBookAtomicLevelEntryHandler handles recaps and deltas at a Price Level Entry level (both level & entry data). Notifications for order book deltas include only the delta. An obvious application for this MAMDA class is any kind of program trading application that needs to build its own order book or an application that needs to archive order book data.
Note: The MamdaBookAtomicListener class caches only order book deltas. If only an MamdaBookAtomicLevelHandler is add to this listener updates and deltas are only processed to Price Level granularity and Entry Level data ignored saving on processing time. Among other reasons, caching of these fields makes it possible to provide complete trade-related callbacks, even when the publisher (e.g., feed handler) is only publishing deltas containing modified fields.
Wombat::MamdaBookAtomicListener::MamdaBookAtomicListener | ( | ) |
|
virtual |
void Wombat::MamdaBookAtomicListener::addBookHandler | ( | MamdaBookAtomicBookHandler * | handler) |
void Wombat::MamdaBookAtomicListener::addLevelHandler | ( | MamdaBookAtomicLevelHandler * | handler) |
void Wombat::MamdaBookAtomicListener::addLevelEntryHandler | ( | MamdaBookAtomicLevelEntryHandler * | handler) |
|
virtual |
Get the instruments string symbol.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the participant identifier.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the source time.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the activity time.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the line time.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the send time.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the message qualifier.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the event time.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the event sequence number.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the string symbol field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the participant identifier field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the event sequence number field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the event time field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the source time field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the activity time field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the line time of the update.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the send time field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Get the message qualifier field state.
Implements Wombat::MamdaBasicEvent.
|
virtual |
Return the number of price levels in the order book update.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Return at which position this level is within an update containing a number of levels.
(i.e. level m of n levels in the update)
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Return the price for this price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Return the MamaPrice for this price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Return the number of order entries comprising this price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Aggregate size at current price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
The action to apply to the orderbook for this price level.
Can have a value of:
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Side of book at current price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Time of order book price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Number of order book entries at current price level.
Implements Wombat::MamdaBookAtomicLevel.
|
virtual |
Implements Wombat::MamdaBookAtomicLevelEntry.
|
virtual |
Order book entry action to apply to the full order book.
Implements Wombat::MamdaBookAtomicLevelEntry.
|
virtual |
Order book entry reason.
Implements Wombat::MamdaBookAtomicLevelEntry.
|
virtual |
Order book entry Id.
(order ID, participant ID, etc.)
Implements Wombat::MamdaBookAtomicLevelEntry.
|
virtual |
Return the order book entry size.
Implements Wombat::MamdaBookAtomicLevelEntry.
|
virtual |
Return the time of order book entry update.
Implements Wombat::MamdaBookAtomicLevelEntry.
|
virtual |
|
virtual |
Set the Order Type.
Implements Wombat::MamdaBookAtomicLevel.
bool Wombat::MamdaBookAtomicListener::getHasMarketOrders | ( | ) | const |
void Wombat::MamdaBookAtomicListener::setProcessMarketOrders | ( | bool | process) | const |
|
virtual |
The starting number of a detected sequence number gap in order book updates from the feedhandler.
Implements Wombat::MamdaBookAtomicGap.
|
virtual |
The ending number of a detected sequence number gap in order book updates from the feedhandler.
Implements Wombat::MamdaBookAtomicGap.
|
virtual |
Implements Wombat::MamdaMsgListener.