Slick Trader 0.11.0
Multi-broker algorithmic trading engine with plugin strategies and a live web dashboard
Loading...
Searching...
No Matches
order.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <string>
6#include <cstdint>
7
8namespace slick::trader {
9
10struct Order {
11 std::string order_id;
12 std::string client_order_id;
13 std::string instrument;
14 BrokerId broker_id{BrokerId::UNKNOWN}; // the broker the order was sent to; stamped on its modifies and cancels
23 price_t avg_fill_price{0}; // updated incrementally on each fill
25 uint64_t created_time{0};
26 uint64_t last_update_time{0};
27 bool post_only{false};
28
34
35 bool is_done() const {
36 return status == OrderStatus::FILLED ||
39 }
40};
41
42} // namespace slick::trader
int64_t qty_t
Definition types.hpp:17
int64_t price_t
Definition types.hpp:16
std::string client_order_id
Definition order.hpp:12
bool is_done() const
Definition order.hpp:35
uint64_t created_time
Definition order.hpp:25
bool is_open() const
Definition order.hpp:29
uint64_t last_update_time
Definition order.hpp:26
std::string order_id
Definition order.hpp:11
price_t avg_fill_price
Definition order.hpp:23
TimeInForce time_in_force
Definition order.hpp:17
OrderStatus status
Definition order.hpp:24
std::string instrument
Definition order.hpp:13
BrokerId broker_id
Definition order.hpp:14