ExchangeSim - use open_quantity for mbo instead of quantity

This commit is contained in:
Eric Harding committed 2019-05-02 12:14:24 -04:00
1 parent 133bd89a2c
commit 09e8fabcf2
1 file changed
+4 -1
@@ -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<precision>(order.price() * price_factor),
(int)order.open_quantity() };
if (order.side() == api::SIDE_BUY) {
snap->bids.push_back(sno);
}