CBOE Emulator  1.0
Public Member Functions | Public Attributes | List of all members
DataFeed::LOB::LimitTree< side > Struct Template Reference

A single side (buy/sell) of the LimitOrderBook. More...

#include <limit_tree.hpp>

Public Member Functions

void clear ()
 Clear all the limits in the tree.
 
void limit (Order *order)
 Place a limit order on the limit tree. More...
 
void cancel (Order *order)
 Remove an order from the limit tree. More...
 
template<typename Callback >
void market (Order *order, Callback did_fill)
 Perform a market order of given quantity on the given limit tree. More...
 
Volume volume_at (Price price) const
 Return the volume of orders at the given limit price. More...
 
Count count_at (Price price) const
 Return the number of orders at the given limit price. More...
 

Public Attributes

Limitroot = nullptr
 the sorted tree of orders in the book
 
PriceLimitMap limits
 a mapping of limit prices to limits
 
Limitbest = nullptr
 the best order
 
Price last_best_price = 0
 the last best price
 
Count count = 0
 the total number of active orders for this tree
 
Volume volume = 0
 the total volume of orders for this tree
 

Detailed Description

template<Side side>
struct DataFeed::LOB::LimitTree< side >

A single side (buy/sell) of the LimitOrderBook.

Member Function Documentation

◆ cancel()

template<Side side>
void DataFeed::LOB::LimitTree< side >::cancel ( Order order)
inline

Remove an order from the limit tree.

Parameters
orderan order that exists in the limit tree

◆ count_at()

template<Side side>
Count DataFeed::LOB::LimitTree< side >::count_at ( Price  price) const
inline

Return the number of orders at the given limit price.

Parameters
pricethe limit price to return the number of orders for
Returns
the number of orders at the given limit price

◆ limit()

template<Side side>
void DataFeed::LOB::LimitTree< side >::limit ( Order order)
inline

Place a limit order on the limit tree.

Parameters
orderan order that matches the side of this tree

◆ market()

template<Side side>
template<typename Callback >
void DataFeed::LOB::LimitTree< side >::market ( Order order,
Callback  did_fill 
)
inline

Perform a market order of given quantity on the given limit tree.

Template Parameters
Callbacka callable function that excepts an order ID
Parameters
orderthe order to find a market order for
did_fillthe callback handler for when an order is filled

◆ volume_at()

template<Side side>
Volume DataFeed::LOB::LimitTree< side >::volume_at ( Price  price) const
inline

Return the volume of orders at the given limit price.

Parameters
pricethe limit price to return the volume for
Returns
the volume of orders at the given limit price

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