diff --git a/src/lib/orderman/actors/ilink3/IL3GW.cpp b/src/lib/orderman/actors/ilink3/IL3GW.cpp index 26cd03ec6..7004bbcb8 100644 --- a/src/lib/orderman/actors/ilink3/IL3GW.cpp +++ b/src/lib/orderman/actors/ilink3/IL3GW.cpp @@ -176,12 +176,7 @@ uint64_t IL3GW::send_party_details(const api::orderman::RoutingRecord &route) { msg.selfMatchPreventionID( PartyDetailsDefinitionRequest518::selfMatchPreventionIDNullValue()); } else { - // CME needs the SMP_ID to be 12 characters or less - // after they to_string() the uint64 - bts_assert_d(route.smp_id().size() == 8); - const uint64_t *psmp_id = - reinterpret_cast(&route.smp_id()); - uint64_t smp_id = (*psmp_id) % (2UL << 39); + auto smp_id = std::atoi(route.smp_id().c_str()); msg.selfMatchPreventionID(smp_id); } msg.cmtaGiveupCD(CmtaGiveUpCD::NULL_VALUE); diff --git a/src/lib/orderman/actors/ilink3/ILink3Utils.h b/src/lib/orderman/actors/ilink3/ILink3Utils.h index 3e017cf60..88a742976 100644 --- a/src/lib/orderman/actors/ilink3/ILink3Utils.h +++ b/src/lib/orderman/actors/ilink3/ILink3Utils.h @@ -25,7 +25,7 @@ iLinkBinary::SideReq::Value map_side(api::Side side); api::Side map_side(iLinkBinary::SideReq::Value side); inline int64_t to_price9(Price p) { - return p.value() * 1E9; + return std::round(p.value() * 1E9); } iLinkBinary::OrderTypeReq::Value map_order_type(api::orderman::NativeOrderType ot);