18 #ifndef DATA_FEED_LIMIT_ORDER_BOOK_STRUCTURES_HPP
19 #define DATA_FEED_LIMIT_ORDER_BOOK_STRUCTURES_HPP
21 #include "doubly_linked_list.hpp"
22 #include "binary_search_tree.hpp"
32 enum class Side : bool { Sell =
false, Buy =
true };
40 return static_cast<Side>(!
static_cast<bool>(side));
90 struct Limit : BST::Node<Price> {
110 BST::Node<
Price>(order->price),
121 #endif // DATA_FEED_LIMIT_ORDER_BOOK_STRUCTURES_HPP
Quantity quantity
the number of shares in the order
Definition: structures.hpp:60
Order(UID uid_, Side side_, Quantity quantity_, Price price_)
Initialize a new order data.
Definition: structures.hpp:76
const UID uid
the day-unique ID for this particular order
Definition: structures.hpp:56
const Side side
a boolean determining whether the order id a buy (true) or sell (false)
Definition: structures.hpp:58
Count count
the number of orders at this limit price
Definition: structures.hpp:92
Side
the possible sides for the LimitTree
Definition: structures.hpp:32
uint64_t Volume
a type for limit total volume
Definition: structures.hpp:87
Limit(Order *order)
Initialize a new limit data.
Definition: structures.hpp:109
Order * order_tail
the last order in the queue (last to execute)
Definition: structures.hpp:100
Limit()
Initialize a new limit data.
Definition: structures.hpp:103
Logic for sending and receiving messages on a financial data feed.
Definition: heartbeat.hpp:28
A single order in the LimitOrderBook.
Definition: structures.hpp:54
Order * order_head
the first order in the queue (next to execute)
Definition: structures.hpp:98
A price limit containing a FIFO queue of Order objects.
Definition: structures.hpp:90
uint32_t Quantity
a type for order quantities
Definition: structures.hpp:46
uint64_t UID
a type for order IDs
Definition: structures.hpp:44
uint64_t Price
a type for order prices
Definition: structures.hpp:48
Side operator!(Side side)
Return the opposite side using the invert operator.
Definition: structures.hpp:39
const Price price
the limit price for the order (market price if market order)
Definition: structures.hpp:62
uint32_t Count
a type for limit price order counts
Definition: structures.hpp:85
Volume volume
the total amount of volume at this limit price (sum of order shares)
Definition: structures.hpp:96
Limit * limit
the limit this order falls under
Definition: structures.hpp:64
const uint32_t _padding
padding for byte alignment
Definition: structures.hpp:94
Order()
Initialize a new order data.
Definition: structures.hpp:67