30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
#include "CreateOrderMsg.h"
|
|
#include "lib/utils/PBUtils.h"
|
|
|
|
namespace bts::orderman {
|
|
|
|
using bts::api::Side_Name;
|
|
using bts::api::orderman::ManualOrderIndicator_Name;
|
|
using bts::api::orderman::NativeOrderType_Name;
|
|
using bts::api::orderman::TimeInForce_Name;
|
|
|
|
std::ostream &operator<<(std::ostream &out, CreateOrderMsg const &msg) {
|
|
out << "key: " << msg.key.value() << " price: " << msg.price.value()
|
|
<< " qty: " << msg.quantity.full_value() << " security: "
|
|
<< (msg.security == nullptr ? "NULL"
|
|
: utils::pb::to_string(*msg.security))
|
|
<< " side: " << Side_Name(msg.side)
|
|
<< " display_qty: " << msg.display_quantity.full_value()
|
|
<< " order_type: " << NativeOrderType_Name(msg.order_type)
|
|
<< " time_in_force: " << TimeInForce_Name(msg.time_in_force)
|
|
<< " manual_order_indicator: "
|
|
<< ManualOrderIndicator_Name(msg.manual_order_indicator)
|
|
<< " routing_record: "
|
|
<< (msg.routing_record == nullptr
|
|
? "NULL"
|
|
: utils::pb::to_string(*msg.routing_record));
|
|
return out;
|
|
}
|
|
|
|
} // namespace bts::orderman
|