Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas

This commit is contained in:
Pedro Pinto committed 2020-12-13 10:33:21 -05:00
commit 533ca3e601
3 files changed
+14 -6

No files matched your search

@@ -82,7 +82,8 @@ FifoPriceLevelMatcher::_one_pass_cross_order(MDP3OrderKey cross_ord_key,
_sec,
_side,
MDP3Quantity(filled),
_price
_price,
OrderUpdate::FillType::PASSIVE
};
MatcherUtils::validate_outgoing_update(passive_upd);
res->push_back(passive_upd);
@@ -96,7 +97,8 @@ FifoPriceLevelMatcher::_one_pass_cross_order(MDP3OrderKey cross_ord_key,
_sec,
_opp_side(_side),
MDP3Quantity(filled),
_price
_price,
OrderUpdate::FillType::AGGRESSIVE
};
MatcherUtils::validate_outgoing_update(agg_upd);
res->push_back(agg_upd);
@@ -268,7 +270,8 @@ void FifoPriceLevelMatcher::on_order_cancel(MatcherOrder& order,
_sec,
_side,
MDP3Quantity(0),
_price
_price,
std::nullopt
};
if(res != nullptr)
res->push_back(o);
@@ -239,7 +239,8 @@ void FifoSecurityMatcher::_on_order_not_affecting_books(
ord.security,
ord.side,
MDP3Quantity(fill_size),
pl.price()
pl.price(),
OrderUpdate::FillType::AGGRESSIVE
});
}
else
@@ -257,7 +258,8 @@ void FifoSecurityMatcher::_on_order_not_affecting_books(
ord.security,
ord.side,
MDP3Quantity(0),
md::IntPrice()
md::IntPrice(),
std::nullopt
});
// nothing to do since this order was never made a part of the book
break;
@@ -46,7 +46,10 @@ struct OrderUpdate {
MDP3SecurityID security_id;
api::Side side;
MDP3Quantity last_fills;
md::IntPrice last_price;
md::IntPrice last_price;
enum FillType { PASSIVE, AGGRESSIVE };
// non null when Status == FILLED or PARTIALLY_FILLED
std::optional<FillType> fill_type;// = std::nullopt;
const char*status_str() const {
switch (status) {
case FILLED: return "filled";