76 throw std::invalid_argument(
"Unknown OrderSide name");
81 = {
"Limit",
"Market"};
92 throw std::invalid_argument(
"Unknown OrderType name");
97 = {
"New",
"PartiallyFilled",
"Filled",
"Cancelled",
"Rejected"};
109 throw std::invalid_argument(
"Unknown OrderStatus name");
114 = {
"DAY",
"GTC",
"IOC",
"FOK",
"MOO",
"MOC"};
126 throw std::invalid_argument(
"Unknown TimeInForce name");
Definition Instrument.h:11
OrderSide from_string_OrderSide(std::string_view name)
Definition Types.h:72
constexpr std::array< std::string_view, 5 > order_status_names
Definition Types.h:97
OrderStatus from_string_OrderStatus(std::string_view name)
Definition Types.h:104
double Price
A type alias for price values.
Definition Types.h:130
Instrument
Represents the financial instruments available for trading.
Definition Instrument.h:17
OrderType from_string_OrderType(std::string_view name)
Definition Types.h:88
OrderType
Represents the execution logic of an order.
Definition Types.h:26
std::string to_string(Instrument symbol)
Converts an Instrument enum to its string representation.
Definition Instrument.h:43
uint64_t OrderID
A type alias for unique order identifiers.
Definition Types.h:134
uint64_t TradeID
A type alias for unique trade identifiers.
Definition Types.h:136
uint64_t Quantity
A type alias for quantity values.
Definition Types.h:132
TimeInForce
Guides How long the order is in the system.
Definition Types.h:54
@ DAY
Keep the order in the system for a day.
@ IOC
Immediate or cancel.
@ GTC
Good till cancellation.
TimeInForce from_string_TimeInForce(std::string_view name)
Definition Types.h:121
std::string ClientID
A type alias for client identifiers.
Definition Types.h:140
OrderStatus
Represents the lifecycle of an order.
Definition Types.h:41
@ New
The order has been created but not yet matched.
@ PartiallyFilled
The order has been partially matched.
@ Cancelled
The order has been cancelled before being fully matched.
@ Filled
The order has been fully matched.
constexpr std::array< std::string_view, 2 > order_side_names
Definition Types.h:65
constexpr std::array< std::string_view, 6 > time_in_force_names
Definition Types.h:114
uint64_t SessionID
A type alias for session identifiers.
Definition Types.h:142
OrderSide
Represents the side of an order (Buy or Sell).
Definition Types.h:17
constexpr std::array< std::string_view, 2 > order_type_names
Definition Types.h:81