execution report handling tweaks
This commit is contained in:
1 parent
4e4a48283d
commit
a28bfa1175
3 files changed
+24
-8
No files matched your search
@@ -47,6 +47,9 @@ void IL3ExecutionReportParser::common(const T& msg, ExecutionReport* data) {
|
||||
data->stop_price = Price { 0.0 };
|
||||
data->time_in_force = map_time_in_force(msg.timeInForce());
|
||||
data->transact_time = ExchangeTimeStamp64 { msg.transactTime() };
|
||||
|
||||
data->ice_cl_ord_id = 0;
|
||||
data->ice_company_id = 0;
|
||||
}
|
||||
|
||||
bool IL3ExecutionReportParser::parse(const iLinkBinary::ExecutionReportNew522& msg, ExecutionReport* data) {
|
||||
@@ -57,8 +60,6 @@ bool IL3ExecutionReportParser::parse(const iLinkBinary::ExecutionReportNew522& m
|
||||
data->exchange_fill_id = ExchangeFillID { };
|
||||
data->exec_type = api::orderman::EXEC_TYPE_NEW;
|
||||
data->filled_quantity = Quantity { 0 };
|
||||
data->ice_cl_ord_id = 0;
|
||||
data->ice_company_id = 0;
|
||||
data->last_price = Price { 0.0 };
|
||||
data->last_shares = Quantity { 0 };
|
||||
data->max_show = Quantity { 0 };
|
||||
|
||||
@@ -575,36 +575,39 @@ void ILinkGW::handle(const iLinkBinary::BusinessReject521& msg) {
|
||||
set_state(State::ERROR);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportNew522& msg) {
|
||||
auto* report = _pool.construct();
|
||||
bool result = _exe_parser.parse(msg, report);
|
||||
bts_assert(result);
|
||||
_on_exe_report(report);
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportReject523& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportElimination524& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportTradeOutright525& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
if (msg.uUID() != _session.uuid) {
|
||||
}
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportTradeSpread526& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportTradeSpreadLeg527& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportModify531& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportStatus532& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::ExecutionReportCancel534& msg) {
|
||||
handle_exe_report(msg);
|
||||
log_in(msg);
|
||||
}
|
||||
void ILinkGW::handle(const iLinkBinary::OrderCancelReject535& msg) {
|
||||
|
||||
@@ -126,6 +126,18 @@ private:
|
||||
|
||||
size_t on_data(const std::string_view&) override;
|
||||
|
||||
template <class T>
|
||||
void handle_exe_report(const T& msg) {
|
||||
auto* report = _pool.construct();
|
||||
bool result = _exe_parser.parse(msg, report);
|
||||
if (result) _on_exe_report(report);
|
||||
else {
|
||||
LOG(OrderMan, Error, "Failed to parse error report");
|
||||
}
|
||||
}
|
||||
// void exe_report_error(
|
||||
|
||||
|
||||
public:
|
||||
void handle(const iLinkBinary::NegotiationResponse501&);
|
||||
void handle(const iLinkBinary::NegotiationReject502&);
|
||||
|
||||
Reference in new issue
Block a user