Classes Files

Wombat::MamdaOrderBookEntry

MamdaOrderBookEntry is a class that provides/implements order book functionality.

Public Types

  Name
enum class sbyte Actions { Add = (sbyte)’A’, Update = (sbyte)’U’, Delete = (sbyte)’D’, Unknown = (sbyte)’Z’}
An enumeration for book entry actions. Price level actions differ from entry actions because, for example, a price level message with Actions.Add may consist of entries with Actions.Add, Actions.Update or Actions.Delete.

Public Functions

  Name
  MamdaOrderBookEntry()
  MamdaOrderBookEntry(MamdaOrderBookEntry copy)
Copy an order book entry object which is a deep copy of the original.
void copy(MamdaOrderBookEntry copy)
Copy an order book entry object which is an exact and deep copy of the original.
void setId(string id)
void setSize(long size)
void setAction(Actions action)
void setTime(DateTime time)
void setDetails(MamdaOrderBookEntry copy)
string getId()
If supported, Order book entry ID (order ID, participant ID, etc.)
long getSize()
The size of the order entry.
Actions getAction()
Whether to ADD, UPDATE or DELETE the entry.
DateTime getTime()
Time of order book entry update.
bool hasTime()
Returns whether the time part of this entry was set to a valid date
void assertEqual(MamdaOrderBookEntry rhs)
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.
bool equalId(string id)
Whether the id of the entry is equal to the id passed to the method.
void setStrictChecking(bool strict)
Enforce strict checking of order book modifications (at the expense of some performance). This setting is automatically updated by MamdaOrderBook.setStrictChecking().

Public Types Documentation

enum Actions

Enumerator Value Description
Add (sbyte)’A’ A new entry.
Update (sbyte)’U’ An updated entry.
Delete (sbyte)’D’ A deleted entry.
Unknown (sbyte)’Z’ Unknown action (error).

An enumeration for book entry actions. Price level actions differ from entry actions because, for example, a price level message with Actions.Add may consist of entries with Actions.Add, Actions.Update or Actions.Delete.

Public Functions Documentation

function MamdaOrderBookEntry

MamdaOrderBookEntry()

function MamdaOrderBookEntry

MamdaOrderBookEntry(
    MamdaOrderBookEntry copy
)

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

Parameters:

function copy

void copy(
    MamdaOrderBookEntry copy
)

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

Parameters:

function setId

void setId(
    string id
)

Parameters:

  • id

function setSize

void setSize(
    long size
)

Parameters:

  • size

function setAction

void setAction(
    Actions action
)

Parameters:

  • action

function setTime

void setTime(
    DateTime time
)

Parameters:

  • time

function setDetails

void setDetails(
    MamdaOrderBookEntry copy
)

Parameters:

  • copy

function getId

string getId()

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

Return:

function getSize

long getSize()

The size of the order entry.

Return:

function getAction

Actions getAction()

Whether to ADD, UPDATE or DELETE the entry.

Return: The action.

function getTime

DateTime getTime()

Time of order book entry update.

Return:

function hasTime

bool hasTime()

Returns whether the time part of this entry was set to a valid date

Return:

function assertEqual

void assertEqual(
    MamdaOrderBookEntry rhs
)

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.

Parameters:

  • rhs

Exceptions:

function equalId

bool equalId(
    string id
)

Whether the id of the entry is equal to the id passed to the method.

Parameters:

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

Return: Whether the id is the same as the order id.

function setStrictChecking

static void setStrictChecking(
    bool strict
)

Enforce strict checking of order book modifications (at the expense of some performance). This setting is automatically updated by MamdaOrderBook.setStrictChecking().

Parameters:

  • strict

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