1 #ifndef jb_itch5_order_book_hpp 2 #define jb_itch5_order_book_hpp 11 #include <type_traits> 56 template <
typename book_type>
74 return buy_.best_quote();
79 return buy_.worst_quote();
84 return sell_.best_quote();
89 return sell_.worst_quote();
120 return buy_.add_order(px, qty);
122 return sell_.add_order(px, qty);
137 return buy_.reduce_order(px, reduced_qty);
139 return sell_.reduce_order(px, reduced_qty);
143 typename book_type::buys_t
buy_;
150 #endif // jb_itch5_order_book_hpp
bool handle_order_reduced(buy_sell_indicator_t side, price4_t px, int reduced_qty)
Handle an order reduction, which includes executions, cancels and replaces.
half_quote worst_bid() const
unsigned long int book_depth_t
Number of prices on a side order book.
char_list_field< u 'S', u 'B'> buy_sell_indicator_t
Represent the 'Buy/Sell Indicator' field on several messages.
bool handle_add_order(buy_sell_indicator_t side, price4_t px, int qty)
Handle a new order.
typename book_type::config book_type_config
std::pair< price4_t, int > half_quote
A simple representation for price + quantity.
order_book(book_type_config const &cfg)
Initialize an empty order book.
book_depth_t sell_count() const
half_quote best_bid() const
book_depth_t buy_count() const
half_quote worst_offer() const
Maintain the ITCH-5.0 order book for a single security.
half_quote best_offer() const
The top-level namespace for the JayBeams library.
book_depth_t get_book_depth() const