|Book update notification strategies|
|Tracking best bids and offers only|
|Constructing and copying order books|
|Custom order book building|
For each security, two types of order books are available: "Market By Order" (MBO) and "Market By Price" (MBP). The last one consists of three sub-types: direct, implied, and consolidated.
The SDK exposes the corresponding classes:
The handler notifies a client code via the OnixS::CME::MDH::SecurityListener::onBookUpdate callback when an order book is updated.
The instrument definition defines the order book depth for market-by-price (MBP) books: direct, implied and consolidated. The OnixS::CME::MDH::MbpBook::depth method returns the maximum number of price levels that may exist in the book.
The order book maintenance is configurable.
The handler constructs books for each security since the moment it receives a definition for that security. Books could be changed later, and their members are not thread-safe. The handler uses its synchronization primitives while updating the books. Therefore, do not access price levels information outside of book-related event handler and do not store references to any book instance and data returned by its members (e.g., offers and bids collections). This restriction exists because the handler may update the book at any moment.