Slick OrderBook 1.1.0
High-Performance C++23 OrderBook Library
Loading...
Searching...
No Matches
slick::orderbook::IOrderBookObserver Class Reference

Base interface for orderbook observers Observers receive callbacks for orderbook events. More...

#include <observer.hpp>

Collaboration diagram for slick::orderbook::IOrderBookObserver:

Public Member Functions

virtual ~IOrderBookObserver ()=default
 
virtual void onPriceLevelUpdate (const PriceLevelUpdate &update)
 Called when a price level is updated (L2 event)
 
virtual void onOrderUpdate (const OrderUpdate &update)
 Called when an individual order is updated (L3 event)
 
virtual void onTrade (const Trade &trade)
 Called when a trade occurs.
 
virtual void onTopOfBookUpdate (const TopOfBook &tob)
 Called when top-of-book changes.
 
virtual void onSnapshotBegin (SymbolId symbol, uint64_t seq_num, Timestamp timestamp)
 Called when snapshot processing begins Followed by multiple onPriceLevelUpdate() or onOrderUpdate() calls.
 
virtual void onSnapshotEnd (SymbolId symbol, uint64_t seq_num, Timestamp timestamp)
 Called when snapshot processing completes.
 

Detailed Description

Base interface for orderbook observers Observers receive callbacks for orderbook events.

Users should inherit from this class and implement the callback methods they're interested in. Default implementations do nothing.

Definition at line 20 of file observer.hpp.

Constructor & Destructor Documentation

◆ ~IOrderBookObserver()

virtual slick::orderbook::IOrderBookObserver::~IOrderBookObserver ( )
virtualdefault

Member Function Documentation

◆ onOrderUpdate()

virtual void slick::orderbook::IOrderBookObserver::onOrderUpdate ( const OrderUpdate &  update)
inlinevirtual

Called when an individual order is updated (L3 event)

Definition at line 29 of file observer.hpp.

◆ onPriceLevelUpdate()

virtual void slick::orderbook::IOrderBookObserver::onPriceLevelUpdate ( const PriceLevelUpdate &  update)
inlinevirtual

Called when a price level is updated (L2 event)

Definition at line 25 of file observer.hpp.

◆ onSnapshotBegin()

virtual void slick::orderbook::IOrderBookObserver::onSnapshotBegin ( SymbolId  symbol,
uint64_t  seq_num,
Timestamp  timestamp 
)
inlinevirtual

Called when snapshot processing begins Followed by multiple onPriceLevelUpdate() or onOrderUpdate() calls.

Definition at line 42 of file observer.hpp.

◆ onSnapshotEnd()

virtual void slick::orderbook::IOrderBookObserver::onSnapshotEnd ( SymbolId  symbol,
uint64_t  seq_num,
Timestamp  timestamp 
)
inlinevirtual

Called when snapshot processing completes.

Definition at line 46 of file observer.hpp.

◆ onTopOfBookUpdate()

virtual void slick::orderbook::IOrderBookObserver::onTopOfBookUpdate ( const TopOfBook &  tob)
inlinevirtual

Called when top-of-book changes.

Definition at line 37 of file observer.hpp.

◆ onTrade()

virtual void slick::orderbook::IOrderBookObserver::onTrade ( const Trade &  trade)
inlinevirtual

Called when a trade occurs.

Definition at line 33 of file observer.hpp.


The documentation for this class was generated from the following file: