19 bool can_handle(
const uint8_t* data,
size_t length)
const override;
20 void reset()
override;
23 Order parse_new_order_json(
const nlohmann::json& json_order,
int client_id);
24 nlohmann::json create_execution_report_json(
const OrderResponse& response);
25 bool is_complete_json_message(
const std::string& buffer)
const;
27 std::string message_buffer_;
28 std::atomic<uint64_t> exec_id_counter_;
31 struct JsonFieldMapping {
32 std::string client_order_id =
"clientOrderId";
33 std::string symbol =
"symbol";
34 std::string side =
"side";
35 std::string type =
"type";
36 std::string quantity =
"quantity";
37 std::string price =
"price";
38 std::string time_in_force =
"timeInForce";
41 JsonFieldMapping field_mapping_;