Skip to content

Commit

Permalink
fix match final order
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhou-JiaJun committed May 16, 2023
1 parent 13d823e commit 9d2d7c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def on_tick(self, event):
self._match(tick.order_book_id)

def _match(self, order_book_id=None):
order_filter = None if order_book_id is None else lambda a_and_o: a_and_o[1].order_book_id == order_book_id
order_filter = lambda a_and_o: not (a_and_o[1].is_final() or (order_book_id and a_and_o[1].order_book_id != order_book_id))
for account, order in filter(order_filter, self._open_orders):
self._get_matcher(order.order_book_id).match(account, order, open_auction=False)
for account, order in filter(order_filter, self._open_auction_orders):
Expand Down

0 comments on commit 9d2d7c0

Please sign in to comment.