Name | |
---|---|
MamdaOrderBook | getOrderBook() |
void | setOrderBook(MamdaOrderBook book) |
Name | |
---|---|
final char | ACTION_ADD |
final char | ACTION_UPDATE |
final char | ACTION_DELETE |
final char | ACTION_UNKNOWN |
final char | SIDE_BID |
final char | SIDE_ASK |
final char | SIDE_UNKNOWN |
final char | LEVEL_LIMIT |
final char | LEVEL_MARKET |
final char | LEVEL_UNKNOWN |
inline MamdaOrderBookPriceLevel()
Default constructor.
inline MamdaOrderBookPriceLevel(
MamdaOrderBookPriceLevel copy
)
Parameters:
Construct a price level object which is a shallow copy of the original.
inline MamdaOrderBookPriceLevel(
double price,
char side
)
inline void clear()
Clear the pricelevel
inline void copy(
MamdaOrderBookPriceLevel copy
)
Parameters:
Copy a price level object which is an exact and deep copy of the original.
inline void copy(
MamdaBookAtomicLevel copy
)
Parameters:
Copy an atomic price level object which is an exact and deep copy of the original.
inline void copy(
MamdaBookAtomicLevelEntry copy
)
Parameters:
Copy a price level object which is an exact and deep copy of the original.
inline void setPrice(
MamaPrice price
)
inline void setPrice(
double price
)
inline void setSize(
double size
)
inline void setSizeChange(
double size
)
inline void setNumEntries(
double numEntries
)
inline void setSide(
char side
)
inline void setAction(
char action
)
inline void setTime(
MamaDateTime time
)
inline void setOrderType(
char orderType
)
inline char getOrderType()
inline boolean empty()
Return: Whether there are no entries for this level.
Return whether there are no entries for this level.
inline void setDetails(
MamdaOrderBookPriceLevel level
)
Parameters:
Take the details from level
and apply them to this level. This does not update entries within the level, only information pertaining to the level itself. It is intended that this method should not be used externally to the API.
inline void setDetails(
MamdaBookAtomicLevel level
)
Parameters:
Take the details from atomic level
and apply them to this level. This does not update entries within the level, only information pertaining to the level itself. It is intended that this method should not be used externally to the API.
inline void setDetails(
MamdaBookAtomicLevelEntry levelEntry
)
Parameters:
Take the details from atomic levelEntry
and apply them to this levelEntry. This update entries within the level. It is intended that this method should not be used externally to the API.
inline void addEntry(
MamdaOrderBookEntry entry
)
Parameters:
See: MamdaOrderBookEntry
Add a new order book entry to the price level.
inline void addEntry(
MamdaOrderBookEntry entry,
long entryPosition
)
Parameters:
See: MamdaOrderBookEntry
Add a new order book entry to the price level at a specified position.
inline void updateEntry(
MamdaOrderBookEntry entry
)
Parameters:
[MamdaOrderBookEntry](classcom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaOrderBookEntry.html)
with the new details for the entry in the level.See: MamdaOrderBookEntry
Update the details of an existing entry in the level.
inline void updateEntryPosition(
String entryId,
long entryPosition
)
Parameters:
[MamdaOrderBookEntry](classcom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaOrderBookEntry.html)
with the new details for the entry in the level.See: MamdaOrderBookEntry
Update the entry position of an existing entry in the level.
inline void updateEntry(
MamdaBookAtomicLevelEntry levelEntry
)
Parameters:
[MamdaBookAtomicLevelEntry](interfacecom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaBookAtomicLevelEntry.html)
with the new details for the entry in the level.See: MamdaOrderBookEntry
Update the details of an existing entry in the level, where the update details are provied by an atomic levelEntry.
inline void removeEntry(
MamdaOrderBookEntry entry
)
Parameters:
See: MamdaOrderBookEntry
Remove an order book entry from the price level.
inline void removeEntry(
MamdaBookAtomicLevelEntry levelEntry
)
Parameters:
See: MamdaOrderBookEntry
Remove an order book entry from the price level, where the delete details are provied by an atomic levelEntry.
inline Iterator entryIterator()
Return: Iterator The iterator for the price level entries
Returns a java.util.Iterator
for all entries within this level. Price Level entries are represented by the [MamdaOrderBookEntry](classcom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaOrderBookEntry.html)
class.
inline void checkNotExist(
MamdaOrderBookEntry entry
)
Parameters:
Exceptions:
If the provided order book entry exists in the price level a [MamdaOrderBookException](classcom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaOrderBookException.html)
exception is thrown. Otherwise the method simply returns.
inline void checkNotExist(
MamdaBookAtomicLevelEntry levelEntry
)
Parameters:
Exceptions:
If the provided levelEntry entry exists in the price level, as a OrderBookEntry, a [MamdaOrderBookException](classcom_1_1wombat_1_1mamda_1_1orderbook_1_1MamdaOrderBookException.html)
exception is thrown. Otherwise the method simply returns.
inline void markAllDeleted()
Mark everything in this price level as deleted, including entries.
inline void setAsDifference(
MamdaOrderBookPriceLevel lhs,
MamdaOrderBookPriceLevel rhs
)
inline MamaPrice getPrice()
Return: The price for this level.
Return the price for this level.
inline double getSize()
Return: The total size for this level.
Return the total size (across all entries) for this level.
inline double getSizeChange()
Return: The changed size for this level.
Return the size change for this (presumably delta) level. This attribute is only of interest for delta order books. For full order books, this field will be equal to the size of the price level.
inline double getNumEntries()
Return: The actual number of entries for this level.
Return the actual number of entries for this level. The actual number of entries may not equate to the number of entries that can be iterated over if: (a) the feed does not provide the actual entries, or (b) the price level is just a delta.
inline int getNumEntriesTotal()
inline char getSide()
Return: The side of the book for this level.
Return the side (bid/ask) of the book for this level.
inline char getAction()
Return: The action for this level.
Return the action for this price level. All price levels for a full book are marked with ACTION_ADD.
inline MamaDateTime getTime()
Return: The time stamp for when the price level was last updated.
Return the time stamp for when the price level was last updated.
inline void assertEqual(
MamdaOrderBookPriceLevel rhs
)
Exceptions:
Order book price level equality verification. A MamdaOrderBookException is thrown if the price levels are not equal, along with the reason for the inequality.
inline String getSymbol()
inline void removeEntryById(
MamdaOrderBookEntry entry
)
inline void removeEntryById(
MamdaBookAtomicLevelEntry levelEntry
)
inline void addEntriesFromLevel(
MamdaOrderBookPriceLevel bookLevel,
MamdaOrderBookEntryFilter filter,
MamdaOrderBookBasicDeltaList delta
)
inline void deleteEntriesFromSource(
MamaSource source,
MamdaOrderBookBasicDeltaList delta
)
inline boolean reevaluate()
Return: Whether the book info changed based on the re-evaluation.
Re-evaluate the price level. This would be performed after the status of sources and/or subsources of an “aggregated order book” (i.e., a book built from multiple sources) have changed.
inline MamdaOrderBookEntry getEntryAtPosition(
long pos
)
Parameters:
Return: The order book entry or NULL if not found.
Return the order book entry at position “pos” in the price level.
inline long getEntryPositionInPriceLevel(
String entryId
)
Parameters:
Return: The position of the Entry in the Price Level. Indexed from 1.
Return the position of an Entry within the Price Level.
inline MamdaOrderBookEntry findOrCreateEntry(
String id
)
inline MamdaOrderBookEntry findOrCreateEntry(
String id,
long entryPosition
)
inline MamdaOrderBookEntry findEntry(
String id
)
static inline void setStrictChecking(
boolean strict
)
Enforce strict checking of order book modifications (at the expense of some performance). This setting is automatically updated by MamdaOrderBook::setStrictChecking().
inline MamdaOrderBook getOrderBook()
inline void setOrderBook(
MamdaOrderBook book
)
static final char ACTION_ADD = 'A';
static final char ACTION_UPDATE = 'U';
A new price level.
static final char ACTION_DELETE = 'D';
Updated price level.
static final char ACTION_UNKNOWN = 'Z';
Deleted price level.
static final char SIDE_BID = 'B';
Unknown action (error).
static final char SIDE_ASK = 'A';
Bid (buy) side.
static final char SIDE_UNKNOWN = 'Z';
Ask (sell) side.
static final char LEVEL_LIMIT = 'L';
Unknown side (error).
static final char LEVEL_MARKET = 'M';
LIMIT order
static final char LEVEL_UNKNOWN = 'U';
MARKET order
Updated on 2023-03-31 at 15:30:39 +0100