Slick Trader 0.11.0
Multi-broker algorithmic trading engine with plugin strategies and a live web dashboard
Loading...
Searching...
No Matches
slick::trader::LevelBook Class Reference

#include <slick-trader/brokers/common/level_book.hpp>

Collaboration diagram for slick::trader::LevelBook:

Classes

struct  Level
struct  LevelChange

Public Member Functions

void apply (Side prev_side, int64_t prev_price, int64_t prev_qty, Side side, int64_t price, int64_t qty)
bool dirty () const noexcept
int64_t best (Side side) noexcept
template<typename F>
void flush (F &&f)
template<typename F>
void for_each_level (F &&f) const
size_t level_count () const noexcept

Static Public Attributes

static constexpr int64_t NO_PRICE = std::numeric_limits<int64_t>::max()

Detailed Description

Definition at line 24 of file level_book.hpp.

Member Function Documentation

◆ apply()

void slick::trader::LevelBook::apply ( Side prev_side,
int64_t prev_price,
int64_t prev_qty,
Side side,
int64_t price,
int64_t qty )
inline

Definition at line 45 of file level_book.hpp.

◆ best()

int64_t slick::trader::LevelBook::best ( Side side)
inlinenodiscardnoexcept

Definition at line 57 of file level_book.hpp.

References best(), slick::trader::BUY, and NO_PRICE.

Referenced by best().

◆ dirty()

bool slick::trader::LevelBook::dirty ( ) const
inlinenodiscardnoexcept

Definition at line 54 of file level_book.hpp.

◆ flush()

template<typename F>
void slick::trader::LevelBook::flush ( F && f)
inline

Definition at line 74 of file level_book.hpp.

References slick::trader::BUY.

◆ for_each_level()

template<typename F>
void slick::trader::LevelBook::for_each_level ( F && f) const
inline

Definition at line 93 of file level_book.hpp.

References slick::trader::BUY, and slick::trader::SELL.

◆ level_count()

size_t slick::trader::LevelBook::level_count ( ) const
inlinenodiscardnoexcept

Definition at line 106 of file level_book.hpp.

Member Data Documentation

◆ NO_PRICE

int64_t slick::trader::LevelBook::NO_PRICE = std::numeric_limits<int64_t>::max()
staticconstexpr

Definition at line 27 of file level_book.hpp.

Referenced by best().


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