Slick Trader 0.11.0
Multi-broker algorithmic trading engine with plugin strategies and a live web dashboard
Loading...
Searching...
No Matches
trade_event.hpp
Go to the documentation of this file.
1#pragma once
2
6#include <type_traits>
7#include <cstdint>
8
9namespace slick::trader {
10
11// TradeEvent - POD struct for lock-free queue
12#pragma pack(push, 1)
13struct TradeEvent : public Event {
17 uint64_t trade_id;
19
22 , price(0)
23 , quantity(0)
24 , is_buyer_maker(false)
25 , trade_id(0)
26 , side(Side::UNKNOWN)
27 {}
28};
29#pragma pack(pop)
30
31static_assert(std::is_trivially_copyable_v<TradeEvent>, "TradeEvent must be trivially copyable");
32
33} // 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