diff --git a/src/app_sparkd/sparkd/md/platforms/mdp3_onixs/MDP3Listener.h b/src/app_sparkd/sparkd/md/platforms/mdp3_onixs/MDP3Listener.h index 00a6fa521..d961b6c62 100644 --- a/src/app_sparkd/sparkd/md/platforms/mdp3_onixs/MDP3Listener.h +++ b/src/app_sparkd/sparkd/md/platforms/mdp3_onixs/MDP3Listener.h @@ -767,8 +767,10 @@ void MDP3Listener::onOption( (uint16_t)_latest_sequence, 0); const auto &sec = def.message(); auto exchange_id = sec.securityId(); - LOG(md, Info, "MDP3Listener::onOption exchange_id: {} desc: {}", exchange_id, - std::string(sec.symbol().items())); + std::string sec_name = std::string(sec.symbol().items()); + LOG(md, Info, + R"([mdp3_listener_on_opt_beg.json]{{ "exchId": {}, "name": "{}" }})", + exchange_id, sec_name); if (filter_security(exchange_id, sec) != ADD) return; @@ -790,7 +792,12 @@ void MDP3Listener::onOption( int8_t tick_rule; if (sec.tickRule(tick_rule)) { decode_ticks(tick_rule, double_of_price(min_tick, 0), fsec); + } else { + LOG(md, Error, + R"([mdp3_listener_on_opt_err.json]{{ "err": "No tick rule", "sec": "{}" }})", + sec_name); } + fsec.cash_per_point = double_of_price(min_tick_amount, 0) / fsec.low_tick / pow10(fsec.display_factor); @@ -801,6 +808,11 @@ void MDP3Listener::onOption( auto status = security_trading_status(def.message()) .value_or(co2::TRADINGSTATUS_UNKNOWN); add_security(fsec, status); + LOG(md, Info, + R"([mdp3_listener_on_opt_end.json]{{ "exchId": {}, "name": "{}", "cpp": {}, "cp": {}, "st": {}, "loTick": {}, "hiTick": {}, "pxBreak": {}, "pxDisplay": {}, "ts": {} }})", + exchange_id, sec_name, fsec.cash_per_point, fsec.call_put, fsec.low_tick, + fsec.high_tick, fsec.price_break, fsec.cme_price_display_format, status, + bts::core::TimeStamp::now_ns()); } // min_tick specializations