OnixS C++ HKEX OMD-C Handler 1.0.0
API documentation
Loading...
Searching...
No Matches
PriceLevel Struct Reference

Public Member Functions

 PriceLevel ()
 PriceLevel (const Price &price, Quantity quantity=0, Quantity numberOfOrders=0, const OrderInfos &orders=OrderInfos())
 PriceLevel (const PriceLevel &)
PriceLeveloperator= (const PriceLevel &other)
const PricegetPrice () const noexcept
void setPrice (const Price &value) noexcept
Quantity quantity () const noexcept
void quantity (Quantity value) noexcept
Quantity numberOfOrders () const noexcept
void numberOfOrders (Quantity value) noexcept
std::string toString () const
void toString (std::string &) const
void swap (PriceLevel &) noexcept
const OrderInfosorders () const noexcept
void addOrderId (OrderId id, Quantity quantity)
void removeOrderId (OrderId id)
void updateOrderId (OrderId id, Quantity quantity)

Detailed Description

Definition at line 48 of file OrderBook.h.

Constructor & Destructor Documentation

◆ PriceLevel() [1/3]

Default initialization.

◆ PriceLevel() [2/3]

PriceLevel ( const Price & price,
Quantity quantity = 0,
Quantity numberOfOrders = 0,
const OrderInfos & orders = OrderInfos() )
explicit

Initializes the instances according to specified attributes.

◆ PriceLevel() [3/3]

PriceLevel ( const PriceLevel & )

Member Function Documentation

◆ addOrderId()

void addOrderId ( OrderId id,
Quantity quantity )

add OrderId to the list

◆ getPrice()

const Price & getPrice ( ) const
inlinenoexcept

Price8 value.

Definition at line 232 of file OrderBook.h.

◆ numberOfOrders() [1/2]

Quantity numberOfOrders ( ) const
inlinenoexcept

Total number of orders of given price.

Definition at line 256 of file OrderBook.h.

◆ numberOfOrders() [2/2]

void numberOfOrders ( Quantity value)
inlinenoexcept

Updates total number of orders.

Definition at line 262 of file OrderBook.h.

◆ operator=()

PriceLevel & operator= ( const PriceLevel & other)

◆ orders()

const OrderInfos & orders ( ) const
noexcept

returns list of order IDs for the price level

◆ quantity() [1/2]

Quantity quantity ( ) const
inlinenoexcept

Quantify for the given price.

Definition at line 244 of file OrderBook.h.

◆ quantity() [2/2]

void quantity ( Quantity value)
inlinenoexcept

Updates quantity value.

Definition at line 250 of file OrderBook.h.

◆ removeOrderId()

void removeOrderId ( OrderId id)

remove OrderId from the list

◆ setPrice()

void setPrice ( const Price & value)
inlinenoexcept

Updates price value.

Definition at line 238 of file OrderBook.h.

◆ swap()

void swap ( PriceLevel & )
noexcept

swap values

◆ toString() [1/2]

std::string toString ( ) const

Returns string representation of the instance.

◆ toString() [2/2]

void toString ( std::string & ) const

Appends representation of the instance to the string.

◆ updateOrderId()

void updateOrderId ( OrderId id,
Quantity quantity )

upate order by Id