Name | |
---|---|
MamdaOrderBookEntry() | |
MamdaOrderBookEntry(MamdaOrderBookEntry copy) | |
MamdaOrderBookEntry(String entryId, double entrySize, char action, MamaDateTime eventTime, MamaSourceDerivative source) | |
void | copy(MamdaOrderBookEntry copy) |
void | setId(String id) |
void | setSize(double size) |
void | setAction(char action) |
void | setReason(char reason) |
void | setTime(MamaDateTime time) |
void | setDetails(MamdaOrderBookEntry copy) |
void | setDetails(MamdaBookAtomicLevelEntry copy) |
String | getId() |
String | getUniqueId() |
double | getSize() |
char | getAction() |
char | getReason() |
MamaDateTime | getTime() |
void | setStatus(int value) |
int | getStatus() |
double | getPrice() |
char | getSide() |
int | getPosition(int maxPos) |
long | getEntryPositionInPriceLevel() |
int | hashCode() |
boolean | equals(Object obj) |
void | setPriceLevel(MamdaOrderBookPriceLevel priceLevel) |
MamdaOrderBookPriceLevel | getPriceLevel() |
MamdaOrderBook | getOrderBook() |
void | setManager(MamdaOrderBookEntryManager manager) |
MamdaOrderBookEntryManager | getManager() |
String | getSymbol() |
void | setSourceDerivative(MamaSourceDerivative source) |
MamaSourceDerivative | getSourceDerivative() |
MamaSource | getSource() |
boolean | getCheckSourceState() |
void | setQuality(short quality) |
short | getQuality() |
boolean | isVisible() |
void | setClosure(Object closure) |
Object | getClosure() |
void | assertEqual(MamdaOrderBookEntry rhs) |
boolean | equalId(String id) |
void | setUniqueId(String uniqueId) |
void | setStrictChecking(boolean strict) |
Name | |
---|---|
final char | ACTION_ADD |
final char | ACTION_UPDATE |
final char | ACTION_DELETE |
final char | ACTION_UNKNOWN |
class com::wombat::mamda::orderbook::MamdaOrderBookEntry;
MamdaOrderBookEntry is a class that provides implements order book functionality.
inline MamdaOrderBookEntry()
inline MamdaOrderBookEntry(
MamdaOrderBookEntry copy
)
Parameters:
Copy an order book entry object which is a shallow copy of the original.
inline MamdaOrderBookEntry(
String entryId,
double entrySize,
char action,
MamaDateTime eventTime,
MamaSourceDerivative source
)
inline void copy(
MamdaOrderBookEntry copy
)
Parameters:
Copy an order book entry object which is an exact and deep copy of the original.
inline void setId(
String id
)
inline void setSize(
double size
)
inline void setAction(
char action
)
inline void setReason(
char reason
)
inline void setTime(
MamaDateTime time
)
inline void setDetails(
MamdaOrderBookEntry copy
)
inline void setDetails(
MamdaBookAtomicLevelEntry copy
)
inline String getId()
Return: the id.
If supported, Order book entry ID (order ID, participant ID, etc.)
inline String getUniqueId()
Return: The unique entry id
If supported, Order book entry unique ID (order ID, participant ID, etc.). The unique ID should be unique throughout the order book. If no explicit unique ID has been set, then it assumed that the basic ID is unique and that is returned.
inline double getSize()
Return: the size.
The size of the order entry.
inline char getAction()
Return: char The action.
Whether to ADD, UPDATE or DELETE the entry.
inline char getReason()
Return: the reason
The reason for the order entry.
inline MamaDateTime getTime()
Return: the time.
Time of order book entry update.
inline void setStatus(
int value
)
Parameters:
Set the status for the entry.
inline int getStatus()
Return: the status.
Return the status for the entry.
inline double getPrice()
Return: The price for this entry.
Get the price for this entry. This method will throw a MamdaOrderBookInvalidEntry if no MamdaPriceLevel is associated with it because order book price information is only stored in MamdaOrderBookPriceLevel objects.
inline char getSide()
Return: The side for this entry.
Get the price for this entry. This method will throw a MamdaOrderBookInvalidEntry if no MamdaPriceLevel is associated with it because order book price information is only stored in MamdaOrderBookPriceLevel objects.
inline int getPosition(
int maxPos
)
Parameters:
Return: The position of this entry in the order book.
Get the position in the order book for this entry. If maxPos is not zero, then the method will return a result no greater than maxPos. This is to prevent searching the entire book when only a limited search is necessary. Note: the logic used in the positional search is to use the number of entries that MamdaOrderBookPriceLevel::getNumEntries() returns for price levels above the entry’s price level. -1 is return if the entry is in the book but not currently “visible” (i.e., it is being omitted because the MAMA source is turned off). A MamdaOrderBookInvalidEntry is thrown if the entry is not found in the book.
inline long getEntryPositionInPriceLevel()
Return: The position of this entry in the Price Level.
Get the position of the Entry in the Price Level. The value is indexed from 1. A value of 0 may be returned if the Entry is detached from the Price Level.
inline int hashCode()
inline boolean equals(
Object obj
)
inline void setPriceLevel(
MamdaOrderBookPriceLevel priceLevel
)
Parameters:
Set the MamdaOrderBookPriceLevel object to which this entry belongs. This method is invoked automatically internally, by the MAMDA API, when an entry is added to a price level.
inline MamdaOrderBookPriceLevel getPriceLevel()
Return: The price level currently associated with this entry.
Get the MamdaOrderBookPriceLevel object to which this entry belongs.
inline MamdaOrderBook getOrderBook()
Return: The order book or null.
Get the order book for this entry, if possible. This can only be done if the entry is part of a price level and the price level is part of an order book. null is returned if no order book can be found.
inline void setManager(
MamdaOrderBookEntryManager manager
)
Parameters:
Set the MamdaOrderBookEntryManager object to which this entry belongs. This method is invoked automatically internally, by the MAMDA API, when an entry is added to an entry manager.
inline MamdaOrderBookEntryManager getManager()
Return: The manager currently associated with this entry.
Get the MamdaOrderBookEntryManager object to which this entry belongs.
inline String getSymbol()
Return: The symbol or NULL.
Get the symbol for this entry, if possible. This can only be done if the entry is part of a price level and the price level is part of an order book. NULL is returned if no symbol can be found.
inline void setSourceDerivative(
MamaSourceDerivative source
)
Parameters:
Set the MamaSourceDerivative for this book entry. The source derivative is used to help determine what the quality of order book entry is and to efficiently identify all of the entries for a given source (e.g., for aggregated order books).
inline MamaSourceDerivative getSourceDerivative()
Return: the MamaSourceDerivative
Return the MamaSourceDerivative for this book entry.
inline MamaSource getSource()
Return: the source.
Return the MamaSource for this book entry.
inline boolean getCheckSourceState()
Return: Whether to check source state.
Get whether this order book wants to check the source state.
inline void setQuality(
short quality
)
Parameters:
Set the entry-level quality factor. This level, if not MAMA_QUALITY_OK, overrides the source-level level.
inline short getQuality()
Return: The current MAMA quality level.
Get the entry-level quality factor. If the entry-level quality is MAMA_QUALITY_OK, then this method returns the source-level quality.
inline boolean isVisible()
inline void setClosure(
Object closure
)
Parameters:
Set the order book entry closure handle.
inline Object getClosure()
Return: The entry closure.
Get the order book entry closure handle.
inline void assertEqual(
MamdaOrderBookEntry rhs
)
Exceptions:
Order book entry equality verification. A MamdaOrderBookException is thrown if the entries within a price level are not equal, along with the reason for the inequality.
inline boolean equalId(
String id
)
Parameters:
Return: boolean Whether the id is the same as the order id.
Whether the id of the entry is equal to the id passed to the method.
inline void setUniqueId(
String uniqueId
)
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().
static final char ACTION_ADD = 'A';
An enumeration for book entry actions. Price level actions differ from entry actions because, for example, a price level message with ACTION_UPDATE may consist of entries with ACTION_ADD, ACTION_UPDATE or ACTION_DELETE. A new entry.
static final char ACTION_UPDATE = 'U';
An updated entry.
static final char ACTION_DELETE = 'D';
A deleted entry.
static final char ACTION_UNKNOWN = 'Z';
Unknown action (error).
Updated on 2023-03-31 at 15:30:38 +0100