Classes Files

com::wombat::mamda::orderbook::MamdaOrderBookEntry

More…

Public Functions

  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)

Public Attributes

  Name
final char ACTION_ADD
final char ACTION_UPDATE
final char ACTION_DELETE
final char ACTION_UNKNOWN

Detailed Description

class com::wombat::mamda::orderbook::MamdaOrderBookEntry;

MamdaOrderBookEntry is a class that provides implements order book functionality.

Public Functions Documentation

function MamdaOrderBookEntry

inline MamdaOrderBookEntry()

function MamdaOrderBookEntry

inline MamdaOrderBookEntry(
    MamdaOrderBookEntry copy
)

Parameters:

Copy an order book entry object which is a shallow copy of the original.

function MamdaOrderBookEntry

inline MamdaOrderBookEntry(
    String entryId,
    double entrySize,
    char action,
    MamaDateTime eventTime,
    MamaSourceDerivative source
)

function copy

inline void copy(
    MamdaOrderBookEntry copy
)

Parameters:

Copy an order book entry object which is an exact and deep copy of the original.

function setId

inline void setId(
    String id
)

function setSize

inline void setSize(
    double size
)

function setAction

inline void setAction(
    char action
)

function setReason

inline void setReason(
    char reason
)

function setTime

inline void setTime(
    MamaDateTime time
)

function setDetails

inline void setDetails(
    MamdaOrderBookEntry copy
)

function setDetails

inline void setDetails(
    MamdaBookAtomicLevelEntry copy
)

function getId

inline String getId()

Return: the id.

If supported, Order book entry ID (order ID, participant ID, etc.)

function getUniqueId

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.

function getSize

inline double getSize()

Return: the size.

The size of the order entry.

function getAction

inline char getAction()

Return: char The action.

Whether to ADD, UPDATE or DELETE the entry.

function getReason

inline char getReason()

Return: the reason

The reason for the order entry.

function getTime

inline MamaDateTime getTime()

Return: the time.

Time of order book entry update.

function setStatus

inline void setStatus(
    int value
)

Parameters:

  • value the new status value.

Set the status for the entry.

function getStatus

inline int getStatus()

Return: the status.

Return the status for the entry.

function getPrice

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.

function getSide

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.

function getPosition

inline int getPosition(
    int maxPos
)

Parameters:

  • maxPos The maximum position to return;

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.

function getEntryPositionInPriceLevel

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.

function hashCode

inline int hashCode()

function equals

inline boolean equals(
    Object obj
)

function setPriceLevel

inline void setPriceLevel(
    MamdaOrderBookPriceLevel priceLevel
)

Parameters:

  • priceLevel The price level to be associated with.

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.

function getPriceLevel

inline MamdaOrderBookPriceLevel getPriceLevel()

Return: The price level currently associated with this entry.

Get the MamdaOrderBookPriceLevel object to which this entry belongs.

function getOrderBook

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.

function setManager

inline void setManager(
    MamdaOrderBookEntryManager manager
)

Parameters:

  • manager The manager.

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.

function getManager

inline MamdaOrderBookEntryManager getManager()

Return: The manager currently associated with this entry.

Get the MamdaOrderBookEntryManager object to which this entry belongs.

function getSymbol

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.

function setSourceDerivative

inline void setSourceDerivative(
    MamaSourceDerivative source
)

Parameters:

  • source The MAMA source derivative.

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).

function getSourceDerivative

inline MamaSourceDerivative getSourceDerivative()

Return: the MamaSourceDerivative

Return the MamaSourceDerivative for this book entry.

function getSource

inline MamaSource getSource()

Return: the source.

Return the MamaSource for this book entry.

function getCheckSourceState

inline boolean getCheckSourceState()

Return: Whether to check source state.

Get whether this order book wants to check the source state.

function setQuality

inline void setQuality(
    short quality
)

Parameters:

  • quality The new entry-level MAMA quality level.

Set the entry-level quality factor. This level, if not MAMA_QUALITY_OK, overrides the source-level level.

function getQuality

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.

function isVisible

inline boolean isVisible()

function setClosure

inline void setClosure(
    Object closure
)

Parameters:

  • closure The closure.

Set the order book entry closure handle.

function getClosure

inline Object getClosure()

Return: The entry closure.

Get the order book entry closure handle.

function assertEqual

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.

function equalId

inline boolean equalId(
    String id
)

Parameters:

  • id The id to compare to the order entry id.

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.

function setUniqueId

inline void setUniqueId(
    String uniqueId
)

function setStrictChecking

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().

Public Attributes Documentation

variable ACTION_ADD

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.

variable ACTION_UPDATE

static final char ACTION_UPDATE = 'U';

An updated entry.

variable ACTION_DELETE

static final char ACTION_DELETE = 'D';

A deleted entry.

variable ACTION_UNKNOWN

static final char ACTION_UNKNOWN = 'Z';

Unknown action (error).


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