OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers 18.2.0
API documentation
Loading...
Searching...
No Matches
OrderBook Class Referenceabstract

Public Types

typedef PriceLevels PriceLevelsType

Public Member Functions

virtual ~OrderBook ()
SecurityId securityId () const
virtual UInt32 lastMsgSeqNumProcessed () const =0
size_t depth () const
bool empty () const
virtual const PriceLevelsasks () const =0
virtual const PriceLevelsbids () const =0
virtual bool bestAsk (Decimal &price, Quantity &quantity) const =0
virtual bool bestBid (Decimal &price, Quantity &quantity) const =0
virtual UInt64 mdEntryTime () const =0
std::string toString () const
void toString (std::string &) const
std::string toShortString () const
void toShortString (std::string &) const
std::string toFormattedString () const
void toFormattedString (std::string &) const
OrderBooksnapshot () const
void * operator new (size_t bookSize)
void operator delete (void *book)

Protected Member Functions

 OrderBook (SecurityId securityId, size_t bookDepth)

Protected Attributes

SecurityId securityId_
size_t depth_

Detailed Description

Order Book.

A set of bid prices and ask prices for the given security (bids are descending and asks are ascending). The quantity is provided at each price level.

Definition at line 148 of file OrderBook.h.

Member Typedef Documentation

◆ PriceLevelsType

Definition at line 151 of file OrderBook.h.

Constructor & Destructor Documentation

◆ ~OrderBook()

virtual ~OrderBook ( )
virtual

Destruction interface.

◆ OrderBook()

OrderBook ( SecurityId securityId,
size_t bookDepth )
protected

Member Function Documentation

◆ asks()

virtual const PriceLevels & asks ( ) const
pure virtual

Returns a set of descending bid prices for the given security.

◆ bestAsk()

virtual bool bestAsk ( Decimal & price,
Quantity & quantity ) const
pure virtual

Returns best implied ask.

◆ bestBid()

virtual bool bestBid ( Decimal & price,
Quantity & quantity ) const
pure virtual

Returns best implied bid.

◆ bids()

virtual const PriceLevels & bids ( ) const
pure virtual

Returns a set of ascending ask prices for the given security.

◆ depth()

size_t depth ( ) const
inline

Returns the maximum book depth.

Definition at line 239 of file OrderBook.h.

◆ empty()

bool empty ( ) const
inline

Indicates whether book has no bids & asks.

Definition at line 244 of file OrderBook.h.

◆ lastMsgSeqNumProcessed()

virtual UInt32 lastMsgSeqNumProcessed ( ) const
pure virtual

Sequence number of the last processed message.

◆ mdEntryTime()

virtual UInt64 mdEntryTime ( ) const
pure virtual

For bids and offers the official time of book entry, for trades official time of execution (all in nanoseconds).

◆ operator delete()

void operator delete ( void * book)

De-allocating operator to avoid runtime collision. Primarily designed for snapshot/cloning.

◆ operator new()

void * operator new ( size_t bookSize)

Allocation operator to avoid runtime collision. Primarily designed for snapshot/cloning.

◆ securityId()

SecurityId securityId ( ) const
inline

Unique instrument Id (tag 48) as qualified by the exchange per tag 22-SecurityIDSource.

Definition at line 234 of file OrderBook.h.

◆ snapshot()

OrderBook * snapshot ( ) const

Creates immutable snapshot of the book.

◆ toFormattedString() [1/2]

std::string toFormattedString ( ) const
inline

Returns formatted presentation of the book.

Definition at line 267 of file OrderBook.h.

◆ toFormattedString() [2/2]

void toFormattedString ( std::string & ) const

Appends Formatted presentation of the book.

◆ toShortString() [1/2]

std::string toShortString ( ) const
inline

Returns brief book info.

Definition at line 258 of file OrderBook.h.

◆ toShortString() [2/2]

void toShortString ( std::string & ) const

Appends brief book info to the string.

◆ toString() [1/2]

std::string toString ( ) const
inline

String presentation of the book.

Definition at line 249 of file OrderBook.h.

◆ toString() [2/2]

void toString ( std::string & ) const

String presentation of the book.

Member Data Documentation

◆ depth_

size_t depth_
protected

Definition at line 218 of file OrderBook.h.

◆ securityId_

SecurityId securityId_
protected

Definition at line 215 of file OrderBook.h.