|
Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
|
Enumerations | |
| enum class | RoutingEffect { Learn , Forget , Ignore } |
| What an execution report means for the order-id -> symbol routing table. More... | |
Functions | |
| constexpr RoutingEffect | routing_effect (OrderStatus status) |
| Terminal reports retire routing. | |
| std::string | dump_json (const json &value) |
| nlohmann's dump() throws on invalid UTF-8. | |
| std::string_view | to_coinbase_string (TimeInForce tif) |
| json | to_json (const Order &order) |
|
strong |
What an execution report means for the order-id -> symbol routing table.
| Enumerator | |
|---|---|
| Learn | The order exists: remember which symbol its id belongs to. |
| Forget | The order is gone: drop its routing. |
| Ignore | Says nothing about routing. |
Definition at line 12 of file coinbase_common.hpp.
|
inline |
nlohmann's dump() throws on invalid UTF-8.
These payloads include client ids and reject/cancel text copied from fixed-size wire fields. Invalid bytes could throw inside a uWebSockets callback and stop the gateway loop thread. Replace them to keep the JSON well formed.
Definition at line 49 of file coinbase_common.hpp.
|
constexpr |
Terminal reports retire routing.
A REJECTED new order has no order id, so there is nothing to forget. A REJECTED amendment or cancel names an order that is still working; forgetting its routing prevented later cancels and amendments. Classify every status explicitly so new statuses require a decision here.
Definition at line 22 of file coinbase_common.hpp.
References slick::sim::ACCEPTED_FOR_BIDDING, slick::sim::CALCULATED, slick::sim::CANCELED, slick::sim::DONE_FOR_DAY, slick::sim::EXPIRED, slick::sim::FILLED, Forget, Ignore, Learn, slick::sim::NEW, slick::sim::PARTIALLY_FILLED, slick::sim::PENDING_CANCEL, slick::sim::PENDING_NEW, slick::sim::PENDING_REPLACE, slick::sim::REJECTED, slick::sim::REPLACED, slick::sim::STOPPED, and slick::sim::SUSPENDED.
|
inline |
Definition at line 53 of file coinbase_common.hpp.
References slick::sim::FILL_OR_KILL, slick::sim::GOOD_TILL_CANCEL, slick::sim::GOOD_TILL_DATE, and slick::sim::IMMEDIATE_OR_CANCEL.
Referenced by to_json().
Definition at line 68 of file coinbase_common.hpp.
References slick::sim::Order::avg_fill_price, slick::sim::utils::fixed_string< N >::c_str(), slick::sim::Order::cancel_message, slick::sim::OrderIdentity::client_order_id, slick::sim::Order::cum_qty_double(), slick::sim::Order::cum_quantity, slick::sim::Order::edit_history, slick::sim::Order::fee, slick::sim::FILL_OR_KILL, slick::sim::Order::filled_value, slick::sim::utils::format_timestamp_iso8601(), slick::sim::GOOD_TILL_CANCEL, slick::sim::IMMEDIATE_OR_CANCEL, slick::sim::Order::last_fill_time, slick::sim::Order::leaves_qty_double(), slick::sim::Order::leaves_quantity, slick::sim::LIMIT, slick::sim::MARKET, slick::sim::Order::num_fills, slick::sim::OrderIdentity::order_id, slick::sim::Order::pending_cancel, slick::sim::Order::post_only, slick::sim::Order::price, slick::sim::Order::product_type, slick::sim::Order::qty_double(), slick::sim::Order::quantity, slick::sim::Order::reject_message, slick::sim::Order::side, slick::sim::Order::status, slick::sim::OrderIdentity::symbol, slick::sim::Order::time_in_force, to_coinbase_string(), slick::sim::to_price_string(), slick::sim::to_qty_string(), slick::sim::to_string(), slick::sim::Order::type, and slick::sim::OrderIdentity::user_id.