19 : price(0), quantity(0), timestamp(0) {}
22 : price(p), quantity(q), timestamp(ts) {}
25 [[nodiscard]]
constexpr bool isEmpty() const noexcept {
31 return price == other.price;
35 return price != other.price;
39 return price < other.price;
43 return price > other.price;
47 return price <= other.price;
51 return price >= other.price;
58 return a.price > b.price;
77 return a.price < b.price;
#define SLICK_DETAIL_NAMESPACE_BEGIN
#define SLICK_DETAIL_NAMESPACE_END
int64_t Quantity
Quantity type - volume or size.
int64_t Price
Price type - fixed-point representation Example: For 4 decimal places, price = actual_price * 10000 T...
uint64_t Timestamp
Timestamp in nanoseconds since epoch.
Comparator for sorting ask levels (ascending price)
constexpr bool operator()(Price a, const PriceLevelL2 &b) const noexcept
constexpr bool operator()(Price a, Price b) const noexcept
constexpr bool operator()(const PriceLevelL2 &a, const PriceLevelL2 &b) const noexcept
constexpr bool operator()(const PriceLevelL2 &a, Price b) const noexcept
Comparator for sorting bid levels (descending price)
constexpr bool operator()(const PriceLevelL2 &a, Price b) const noexcept
constexpr bool operator()(Price a, Price b) const noexcept
constexpr bool operator()(Price a, const PriceLevelL2 &b) const noexcept
constexpr bool operator()(const PriceLevelL2 &a, const PriceLevelL2 &b) const noexcept
Price level for Level 2 orderbook (aggregated) Stores total quantity at a specific price point.
constexpr bool isEmpty() const noexcept
Check if this level is empty.
constexpr bool operator==(const PriceLevelL2 &other) const noexcept
Comparison operators for sorting.
constexpr PriceLevelL2() noexcept
constexpr bool operator<=(const PriceLevelL2 &other) const noexcept
constexpr PriceLevelL2(Price p, Quantity q, Timestamp ts) noexcept
constexpr bool operator<(const PriceLevelL2 &other) const noexcept
constexpr bool operator>(const PriceLevelL2 &other) const noexcept
constexpr bool operator!=(const PriceLevelL2 &other) const noexcept
constexpr bool operator>=(const PriceLevelL2 &other) const noexcept