fix matcher partial-fills bug (part 2, fill at actual order price if implied matching is off)
This commit is contained in:
1 parent
89d9585ad8
commit
b85604097d
1 file changed
+5
-2
+5
-2
@@ -321,9 +321,12 @@ MDP3Quantity FifoMergedSecurityMatcher::_fill(
|
||||
uint32_t fills_pos = effects->size();
|
||||
auto target_fill_qty = std::min(quantity, get_qty(dtop));
|
||||
// this is temp hack to ensure partial fills are appropriately created
|
||||
if (!implied_matching_status())
|
||||
auto fill_price = get_price(dtop);
|
||||
if (!implied_matching_status()) {
|
||||
target_fill_qty = quantity;
|
||||
auto rem = matcher()->fill(key, side, get_price(dtop), target_fill_qty, effects, true);
|
||||
fill_price = price;
|
||||
}
|
||||
auto rem = matcher()->fill(key, side, fill_price, target_fill_qty, effects, true);
|
||||
auto fill_qty = target_fill_qty - rem;
|
||||
quantity -= fill_qty;
|
||||
DIAG("filled ", fill_qty, ". Order now: ", ord_desc());
|
||||
|
||||
Reference in new issue
Block a user