Slick Trader 0.11.0
Multi-broker algorithmic trading engine with plugin strategies and a live web dashboard
Loading...
Searching...
No Matches
level2_update_event.hpp
Go to the documentation of this file.
1#pragma once
2
6#include <type_traits>
7#include <limits>
8
9namespace slick::trader {
10
11// QuoteEvent - POD struct for lock-free queue
12#pragma pack(push, 1)
13struct PriceLevel {
16 uint32_t num_orders = std::numeric_limits<uint32_t>::max();
18
20 PriceLevel(price_t p, qty_t q, Side s) : price(p), quantity(q), side(s) {}
21};
22
23struct Level2UpdateEvent : public Event {
24 uint16_t num_levels;
25 uint64_t sequence_num;
26 bool is_snapshot; // true for snapshot, false for update
28
35};
36#pragma pack(pop)
37
38static_assert(std::is_trivially_copyable_v<Level2UpdateEvent>, "Level2UpdateEvent must be trivially copyable");
39
40} // namespace slick::trader
int64_t qty_t
Definition types.hpp:17
int64_t price_t
Definition types.hpp:16
Event(EventType t=EventType::TRADE)
Definition event.hpp:63
PriceLevel(price_t p, qty_t q, Side s)