MamdaOrderBook is a class that provides order book functionality, including iterators over price levels and entries within price levels.
Name | |
---|---|
MamdaOrderBook() Construct a new order book object. Contains no price levels upon construction. |
|
void | clear() Clear all levels from the order book. Clears both the bid and ask side levels from the order book. |
void | setSymbol(string symbol) |
String | getSymbol() |
void | setBookTime(DateTime time) |
DateTime | getBookTime() |
void | addLevel(MamdaOrderBookPriceLevel level) Add a price level to the order book. |
void | updateLevel(MamdaOrderBookPriceLevel level) Update an existing level in the order book. |
void | deleteLevel(MamdaOrderBookPriceLevel level) Delete an existing price level from the book. |
void | apply(MamdaOrderBook deltaBook) Apply a delta to this (presumably) full book. |
void | copy(MamdaOrderBook book) Make a shallow copy of a book. |
void | deepCopy(MamdaOrderBook book) Make a deep copy of a book. |
void | setAsDeltaDeleted(MamdaOrderBook bookToDelete) Set this order book to be a delta that would, when applied, delete all of the fields in the bookToDelete. |
void | setAsDeltaDifference(MamdaOrderBook lhs, MamdaOrderBook rhs) Set this order book to be a delta that would, when applied, be the difference between to other books. |
long | getTotalNumLevels() Get the total number of price levels (both sides of order book). |
void | assertEqual(MamdaOrderBook rhs) Order book equality verification. A MamdaOrderBookException is thrown if the books are not equal, along with the reason for the inequality. |
IEnumerable | getBidLevels() Allows an application to iterate over all the bid side price levels in the order book. |
IEnumerable | getAskLevels() Allows an application to iterate over all the ask side price levels in the order book. |
void | setIsConsistent(bool isConsistent) Set whether the order book is in a consistent or an an inconsistent state. |
bool | getIsConsistent() Get whether the order book is in a consistent or an an inconsistent state. The orderbook will be marked as inconsistent if a gap is detected by the Listener. The book will be marked consistent again once a full recap for the book has been obtained from the feed. |
void | dump() Dump the order book to standard output. |
void | dump(Stream stream) Dumps the order book to the specified stream |
void | dump(TextWriter writer) Dumps the order book using the specified TextWriter instance |
void | setStrictChecking(bool strict) Enforce strict checking of order book modifications (at the expense of some performance). This setting is passed on to the MamdaOrderBookPriceLevel and MamdaOrderBookEntry classes. |
MamdaOrderBook()
Construct a new order book object. Contains no price levels upon construction.
void clear()
Clear all levels from the order book. Clears both the bid and ask side levels from the order book.
void setSymbol(
string symbol
)
Parameters:
String getSymbol()
Return: The order book subscription symbol.
void setBookTime(
DateTime time
)
Parameters:
DateTime getBookTime()
Return: The order book subscription symbol.
void addLevel(
MamdaOrderBookPriceLevel level
)
Add a price level to the order book.
Parameters:
void updateLevel(
MamdaOrderBookPriceLevel level
)
Update an existing level in the order book.
Parameters:
void deleteLevel(
MamdaOrderBookPriceLevel level
)
Delete an existing price level from the book.
Parameters:
void apply(
MamdaOrderBook deltaBook
)
Apply a delta to this (presumably) full book.
Parameters:
void copy(
MamdaOrderBook book
)
Make a shallow copy of a book.
Parameters:
void deepCopy(
MamdaOrderBook book
)
Make a deep copy of a book.
Parameters:
void setAsDeltaDeleted(
MamdaOrderBook bookToDelete
)
Set this order book to be a delta that would, when applied, delete all of the fields in the bookToDelete.
Parameters:
void setAsDeltaDifference(
MamdaOrderBook lhs,
MamdaOrderBook rhs
)
Set this order book to be a delta that would, when applied, be the difference between to other books.
Parameters:
long getTotalNumLevels()
Get the total number of price levels (both sides of order book).
Return: The total number of level in the order book.
void assertEqual(
MamdaOrderBook rhs
)
Order book equality verification. A MamdaOrderBookException is thrown if the books are not equal, along with the reason for the inequality.
Parameters:
Exceptions:
IEnumerable getBidLevels()
Allows an application to iterate over all the bid side price levels in the order book.
Return: IEnumerable for the bid side price levels in the order book - the elements are of type MamdaOrderBookPriceLevel
IEnumerable getAskLevels()
Allows an application to iterate over all the ask side price levels in the order book.
Return: IEnumerable for the ask side price levels in the order book - the elements are of type MamdaOrderBookPriceLevel
void setIsConsistent(
bool isConsistent
)
Set whether the order book is in a consistent or an an inconsistent state.
Parameters:
bool getIsConsistent()
Get whether the order book is in a consistent or an an inconsistent state. The orderbook will be marked as inconsistent if a gap is detected by the Listener. The book will be marked consistent again once a full recap for the book has been obtained from the feed.
Return: Whether the book is in a consistent state.
void dump()
Dump the order book to standard output.
void dump(
Stream stream
)
Dumps the order book to the specified stream
Parameters:
void dump(
TextWriter writer
)
Dumps the order book using the specified TextWriter instance
Parameters:
static void setStrictChecking(
bool strict
)
Enforce strict checking of order book modifications (at the expense of some performance). This setting is passed on to the MamdaOrderBookPriceLevel and MamdaOrderBookEntry classes.
Parameters:
Updated on 2023-03-31 at 15:30:16 +0100