CppTrader
1.0.4.0
C++ Trader
|
#include <order_book.h>
Public Types | |
typedef CppCommon::BinTreeAVL< LevelNode, std::less< LevelNode > > | Levels |
Price level container. More... | |
Public Member Functions | |
OrderBook (MarketManager &manager, const Symbol &symbol) | |
OrderBook (const OrderBook &)=delete | |
OrderBook (OrderBook &&)=delete | |
~OrderBook () | |
OrderBook & | operator= (const OrderBook &)=delete |
OrderBook & | operator= (OrderBook &&)=delete |
operator bool () const noexcept | |
Check if the order book is not empty. More... | |
bool | empty () const noexcept |
Is the order book empty? More... | |
size_t | size () const noexcept |
Get the order book size. More... | |
const Symbol & | symbol () const noexcept |
Get the order book symbol. More... | |
const LevelNode * | best_bid () const noexcept |
Get the order book best bid price level. More... | |
const LevelNode * | best_ask () const noexcept |
Get the order book best ask price level. More... | |
const Levels & | bids () const noexcept |
Get the order book bids container. More... | |
const Levels & | asks () const noexcept |
Get the order book asks container. More... | |
const LevelNode * | best_buy_stop () const noexcept |
Get the order book best buy stop order price level. More... | |
const LevelNode * | best_sell_stop () const noexcept |
Get the order book best sell stop order price level. More... | |
const Levels & | buy_stop () const noexcept |
Get the order book buy stop orders container. More... | |
const Levels & | sell_stop () const noexcept |
Get the order book sell stop orders container. More... | |
const LevelNode * | best_trailing_buy_stop () const noexcept |
Get the order book best trailing buy stop order price level. More... | |
const LevelNode * | best_trailing_sell_stop () const noexcept |
Get the order book best trailing sell stop order price level. More... | |
const Levels & | trailing_buy_stop () const noexcept |
Get the order book trailing buy stop orders container. More... | |
const Levels & | trailing_sell_stop () const noexcept |
Get the order book trailing sell stop orders container. More... | |
const LevelNode * | GetBid (uint64_t price) const noexcept |
Get the order book bid price level with the given price. More... | |
const LevelNode * | GetAsk (uint64_t price) const noexcept |
Get the order book ask price level with the given price. More... | |
const LevelNode * | GetBuyStopLevel (uint64_t price) const noexcept |
Get the order book buy stop level with the given price. More... | |
const LevelNode * | GetSellStopLevel (uint64_t price) const noexcept |
Get the order book sell stop level with the given price. More... | |
const LevelNode * | GetTrailingBuyStopLevel (uint64_t price) const noexcept |
Get the order book trailing buy stop level with the given price. More... | |
const LevelNode * | GetTrailingSellStopLevel (uint64_t price) const noexcept |
Get the order book trailing sell stop level with the given price. More... | |
Friends | |
class | MarketManager |
template<class TOutputStream > | |
TOutputStream & | operator<< (TOutputStream &stream, const OrderBook &order_book) |
Order book.
Order book is used to keep buy and sell orders in a price level order.
Not thread-safe.
Definition at line 28 of file order_book.h.
typedef CppCommon::BinTreeAVL<LevelNode, std::less<LevelNode> > CppTrader::Matching::OrderBook::Levels |
Price level container.
Definition at line 34 of file order_book.h.
CppTrader::Matching::OrderBook::OrderBook | ( | MarketManager & | manager, |
const Symbol & | symbol | ||
) |
Definition at line 15 of file order_book.cpp.
|
delete |
|
delete |
CppTrader::Matching::OrderBook::~OrderBook | ( | ) |
Definition at line 33 of file order_book.cpp.
|
inlinenoexcept |
Get the order book asks container.
Definition at line 64 of file order_book.h.
|
inlinenoexcept |
Get the order book best ask price level.
Definition at line 59 of file order_book.h.
|
inlinenoexcept |
Get the order book best bid price level.
Definition at line 57 of file order_book.h.
|
inlinenoexcept |
Get the order book best buy stop order price level.
Definition at line 67 of file order_book.h.
|
inlinenoexcept |
Get the order book best sell stop order price level.
Definition at line 69 of file order_book.h.
|
inlinenoexcept |
Get the order book best trailing buy stop order price level.
Definition at line 77 of file order_book.h.
|
inlinenoexcept |
Get the order book best trailing sell stop order price level.
Definition at line 79 of file order_book.h.
|
inlinenoexcept |
Get the order book bids container.
Definition at line 62 of file order_book.h.
|
inlinenoexcept |
Get the order book buy stop orders container.
Definition at line 72 of file order_book.h.
|
inlinenoexcept |
Is the order book empty?
Definition at line 48 of file order_book.h.
|
inlinenoexcept |
Get the order book ask price level with the given price.
price | - Price |
Definition at line 32 of file order_book.inl.
|
inlinenoexcept |
Get the order book bid price level with the given price.
price | - Price |
Definition at line 26 of file order_book.inl.
|
inlinenoexcept |
Get the order book buy stop level with the given price.
price | - Price |
Definition at line 38 of file order_book.inl.
|
inlinenoexcept |
Get the order book sell stop level with the given price.
price | - Price |
Definition at line 44 of file order_book.inl.
|
inlinenoexcept |
Get the order book trailing buy stop level with the given price.
price | - Price |
Definition at line 50 of file order_book.inl.
|
inlinenoexcept |
Get the order book trailing sell stop level with the given price.
price | - Price |
Definition at line 56 of file order_book.inl.
|
inlineexplicitnoexcept |
Check if the order book is not empty.
Definition at line 45 of file order_book.h.
|
inlinenoexcept |
Get the order book sell stop orders container.
Definition at line 74 of file order_book.h.
|
inlinenoexcept |
Get the order book size.
Definition at line 51 of file order_book.h.
|
inlinenoexcept |
Get the order book symbol.
Definition at line 54 of file order_book.h.
|
inlinenoexcept |
Get the order book trailing buy stop orders container.
Definition at line 82 of file order_book.h.
|
inlinenoexcept |
Get the order book trailing sell stop orders container.
Definition at line 84 of file order_book.h.
|
friend |
Definition at line 30 of file order_book.h.
|
friend |
Definition at line 13 of file order_book.inl.