Skip to content

Commit

Permalink
Add MatchingEngine processing guard
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Aug 10, 2023
1 parent f076832 commit 5e85a6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nautilus_trader/backtest/matching_engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,9 @@ cdef class OrderMatchingEngine:
# -- EVENT HANDLING -------------------------------------------------------------------------------

cpdef void accept_order(self, Order order):
if order.is_closed_c():
return # Temporary guard to prevent invalid processing

# Check if order already accepted (being added back into the matching engine)
if not order.status_c() == OrderStatus.ACCEPTED:
self._generate_order_accepted(order)
Expand Down

0 comments on commit 5e85a6b

Please sign in to comment.