33 using BidMap = std::map<common::Price, PriceLevel, std::greater<>>;
39 using AskMap = std::map<common::Price, PriceLevel>;
Represents a single trading order in the system.
Definition Order.h:19
Definition MarketDataPublisher.h:12
Represents the order book for a single financial instrument.
Definition OrderBook.h:22
MarketDataPublisher & mPublisher
Definition OrderBook.h:85
virtual ~OrderBook()=default
AskMap mAskMap
The map of sell orders.
Definition OrderBook.h:83
virtual bool cancelOrder(const common::OrderID &orderId)
Cancels an order from the order book.
Definition OrderBook.cpp:38
virtual void publishSnapshot(common::SessionID sessionId) const
Publishes a full snapshot of the current order book for a specific session.
Definition OrderBook.cpp:107
std::map< common::Price, PriceLevel > AskMap
A map of prices to price levels for sell orders, sorted in ascending order.
Definition OrderBook.h:39
virtual AskMap * getAskMap()
Gets a raw pointer to the ask map.
Definition OrderBook.cpp:158
virtual BidMap * getBidMap()
Gets a raw pointer to the bid map.
Definition OrderBook.cpp:153
std::map< common::Price, PriceLevel, std::greater<> > BidMap
A map of prices to price levels for buy orders, sorted in descending order.
Definition OrderBook.h:33
BidMap mBidMap
The map of buy orders.
Definition OrderBook.h:82
common::Symbol mSymbol
Definition OrderBook.h:84
virtual void insertOrder(common::Order *order)
Inserts an order into the order book.
Definition OrderBook.cpp:12
std::deque< common::Order * > PriceLevel
A deque of orders at a specific price level.
Definition OrderBook.h:27
Instrument
Represents the financial instruments available for trading.
Definition Instrument.h:17
uint64_t OrderID
A type alias for unique order identifiers.
Definition Types.h:134
uint64_t SessionID
A type alias for session identifiers.
Definition Types.h:142
Definition CancelOrder.h:10