4#include <nlohmann/json.hpp>
7using json = nlohmann::json;
50 return value.dump(-1,
' ',
false, json::error_handler_t::replace);
56 return "GOOD_UNTIL_DATE_TIME";
58 return "GOOD_UNTIL_CANCELLED";
60 return "IMMEDIATE_OR_CANCEL";
62 return "FILL_OR_KILL";
64 return "UNKNOWN_TIME_IN_FORCE";
74 "market_market_ioc", {
83 "market_market_fok", {
128 "market_market_fok", {
141 {
"order_configuration", order_config},
150 {
"number_of_fills", std::to_string(order.
num_fills)},
151 {
"fee", std::to_string(order.
fee)},
154 {
"size_in_quote",
false},
155 {
"total_fee", std::to_string(order.
fee)},
156 {
"size_inclusive_of_fees",
false},
157 {
"total_value_after_fees", std::to_string(order.
filled_value - order.
fee)},
158 {
"trigger_status",
"UNKNOWN_TRIGGER_STATUS"},
160 {
"reject_reason",
""},
165 {
"order_placement_source",
"UNKNOWN_PLACEMENT_SOURCE"},
166 {
"outstanding_hold_amount",
""},
167 {
"is_liquidation",
false},
171 {
"margin_type",
"CROSS"},
172 {
"attached_order_configuration", {{}}},
173 {
"current_pending_replace", {{}}},
174 {
"commission_detail_total", {{}}},
const char * c_str() const noexcept
RoutingEffect
What an execution report means for the order-id -> symbol routing table.
@ Learn
The order exists: remember which symbol its id belongs to.
@ Forget
The order is gone: drop its routing.
@ Ignore
Says nothing about routing.
std::string dump_json(const json &value)
nlohmann's dump() throws on invalid UTF-8.
std::string_view to_coinbase_string(TimeInForce tif)
constexpr RoutingEffect routing_effect(OrderStatus status)
Terminal reports retire routing.
json to_json(const Order &order)
std::string format_timestamp_iso8601(const std::chrono::system_clock::time_point &tp, int num_sebsecond_digits=3)
constexpr const char * to_string(FeedState state) noexcept
std::string to_price_string(price_t price)
std::string to_qty_string(qty_t qty)
utils::fixed_string< 32 > symbol
utils::fixed_string< 37 > client_order_id
utils::fixed_string< 37 > order_id
utils::fixed_string< 37 > user_id
std::string reject_message
std::optional< uint64_t > last_fill_time
TimeInForce time_in_force
std::string cancel_message
double qty_double() const noexcept
double leaves_qty_double() const noexcept
double cum_qty_double() const noexcept