diff --git a/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp b/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp index 73610381f..17b2c7447 100644 --- a/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp +++ b/src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp @@ -507,7 +507,10 @@ void ExchangeSimApplication::update_md(std::string const &sec_desc) { auto snap = mbo->allocate_snapshot(); for (const auto& order : ob.order()) { auto ek = exchange_key(order.clordid()); - md::SnapshotOrder sno { md::ExchangeOrderKey(std::atoll(ek.getString().c_str())), md::IntPrice(order.price() * 1E9,-precision), (int)order.quantity() }; + md::SnapshotOrder sno { + md::ExchangeOrderKey(std::atoll(ek.getString().c_str())), + md::IntPrice_from_double(order.price() * price_factor), + (int)order.open_quantity() }; if (order.side() == api::SIDE_BUY) { snap->bids.push_back(sno); }