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

Level 2 price level update event Note: quantity = 0 implies the price level should be deleted. More...

#include <events.hpp>

Collaboration diagram for slick::orderbook::PriceLevelUpdate:

Public Member Functions

 PriceLevelUpdate () noexcept=default
 
 PriceLevelUpdate (Timestamp ts, SymbolId sym, Side s, Price p, Quantity q, uint16_t order_count=0, uint16_t idx=0, uint8_t flags=0, uint64_t seq=0) noexcept
 
constexpr bool isDelete () const noexcept
 Check if this is a delete action.
 
constexpr bool priceChanged () const noexcept
 Check if price changed (level was added or moved)
 
constexpr bool quantityChanged () const noexcept
 Check if quantity changed.
 
constexpr bool isTopN (uint16_t n) const noexcept
 Check if this update affects the top N levels.
 
constexpr bool isLastInBatch () const noexcept
 Check if this is the last update in a batch.
 

Public Attributes

Timestamp timestamp
 
uint64_t seq_num
 
Price price
 
Quantity quantity
 
SymbolId symbol
 
uint16_t level_index
 
uint16_t num_orders
 
uint8_t change_flags
 
Side side
 

Detailed Description

Level 2 price level update event Note: quantity = 0 implies the price level should be deleted.

Definition at line 21 of file events.hpp.

Constructor & Destructor Documentation

◆ PriceLevelUpdate() [1/2]

slick::orderbook::PriceLevelUpdate::PriceLevelUpdate ( )
defaultnoexcept

◆ PriceLevelUpdate() [2/2]

slick::orderbook::PriceLevelUpdate::PriceLevelUpdate ( Timestamp  ts,
SymbolId  sym,
Side  s,
Price  p,
Quantity  q,
uint16_t  order_count = 0,
uint16_t  idx = 0,
uint8_t  flags = 0,
uint64_t  seq = 0 
)
inlinenoexcept

Definition at line 34 of file events.hpp.

Member Function Documentation

◆ isDelete()

constexpr bool slick::orderbook::PriceLevelUpdate::isDelete ( ) const
inlineconstexprnoexcept

Check if this is a delete action.

Definition at line 40 of file events.hpp.

◆ isLastInBatch()

constexpr bool slick::orderbook::PriceLevelUpdate::isLastInBatch ( ) const
inlineconstexprnoexcept

Check if this is the last update in a batch.

Definition at line 60 of file events.hpp.

References slick::orderbook::LastInBatch.

◆ isTopN()

constexpr bool slick::orderbook::PriceLevelUpdate::isTopN ( uint16_t  n) const
inlineconstexprnoexcept

Check if this update affects the top N levels.

Definition at line 55 of file events.hpp.

◆ priceChanged()

constexpr bool slick::orderbook::PriceLevelUpdate::priceChanged ( ) const
inlineconstexprnoexcept

Check if price changed (level was added or moved)

Definition at line 45 of file events.hpp.

References slick::orderbook::PriceChanged.

◆ quantityChanged()

constexpr bool slick::orderbook::PriceLevelUpdate::quantityChanged ( ) const
inlineconstexprnoexcept

Check if quantity changed.

Definition at line 50 of file events.hpp.

References slick::orderbook::QuantityChanged.

Member Data Documentation

◆ change_flags

uint8_t slick::orderbook::PriceLevelUpdate::change_flags

Definition at line 29 of file events.hpp.

◆ level_index

uint16_t slick::orderbook::PriceLevelUpdate::level_index

Definition at line 27 of file events.hpp.

◆ num_orders

uint16_t slick::orderbook::PriceLevelUpdate::num_orders

Definition at line 28 of file events.hpp.

◆ price

Price slick::orderbook::PriceLevelUpdate::price

Definition at line 24 of file events.hpp.

Referenced by slick::orderbook::OrderBookL2::emitSnapshot().

◆ quantity

Quantity slick::orderbook::PriceLevelUpdate::quantity

Definition at line 25 of file events.hpp.

◆ seq_num

uint64_t slick::orderbook::PriceLevelUpdate::seq_num

Definition at line 23 of file events.hpp.

◆ side

Side slick::orderbook::PriceLevelUpdate::side

Definition at line 30 of file events.hpp.

◆ symbol

SymbolId slick::orderbook::PriceLevelUpdate::symbol

Definition at line 26 of file events.hpp.

◆ timestamp

Timestamp slick::orderbook::PriceLevelUpdate::timestamp

Definition at line 22 of file events.hpp.


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