SPARK-696, Modifying order size was not properly updating book
This commit is contained in:
1 parent
da3956764c
commit
4caaa36d26
1 file changed
+6
-1
@@ -51,7 +51,11 @@ void OrderMatcher::update(std::string const &clordid, Price price, Quantity qty,
|
||||
|
||||
auto order_cpy = *order;
|
||||
order_cpy.price = price;
|
||||
order_cpy.quantity = qty;
|
||||
if (order_cpy.quantity != qty) {
|
||||
order_cpy.quantity = qty;
|
||||
order_cpy.open_quantity = qty;
|
||||
}
|
||||
|
||||
if (order->side == api::SIDE_BUY) {
|
||||
me->bids.erase(
|
||||
std::find_if(me->bids.begin(), me->bids.end(), OrderFinder(clordid)));
|
||||
@@ -128,3 +132,4 @@ Book OrderMatcher::get_book() const {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user