From 09e8fabcf27513c7dca9414b442fefd0680e7d5b Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Thu, 2 May 2019 12:14:24 -0400 Subject: [PATCH] ExchangeSim - use open_quantity for mbo instead of quantity --- src/server/sparkd/exchange_sim/ExchangeSimApplication.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }