Skip to content

Commit

Permalink
Allow reject after a pending state
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Mar 11, 2023
1 parent 298a921 commit d47a776
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nautilus_trader/model/orders/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ cdef dict _ORDER_STATE_TABLE = {
(OrderStatus.ACCEPTED, OrderStatus.FILLED): OrderStatus.FILLED,
(OrderStatus.CANCELED, OrderStatus.PARTIALLY_FILLED): OrderStatus.PARTIALLY_FILLED, # Real world possibility
(OrderStatus.CANCELED, OrderStatus.FILLED): OrderStatus.FILLED, # Real world possibility
(OrderStatus.PENDING_UPDATE, OrderStatus.REJECTED): OrderStatus.REJECTED, # Real world possibility
(OrderStatus.PENDING_UPDATE, OrderStatus.ACCEPTED): OrderStatus.ACCEPTED,
(OrderStatus.PENDING_UPDATE, OrderStatus.CANCELED): OrderStatus.CANCELED,
(OrderStatus.PENDING_UPDATE, OrderStatus.EXPIRED): OrderStatus.EXPIRED,
Expand All @@ -98,6 +99,7 @@ cdef dict _ORDER_STATE_TABLE = {
(OrderStatus.PENDING_UPDATE, OrderStatus.PENDING_CANCEL): OrderStatus.PENDING_CANCEL,
(OrderStatus.PENDING_UPDATE, OrderStatus.PARTIALLY_FILLED): OrderStatus.PARTIALLY_FILLED,
(OrderStatus.PENDING_UPDATE, OrderStatus.FILLED): OrderStatus.FILLED,
(OrderStatus.PENDING_CANCEL, OrderStatus.REJECTED): OrderStatus.REJECTED, # Real world possibility
(OrderStatus.PENDING_CANCEL, OrderStatus.PENDING_CANCEL): OrderStatus.PENDING_CANCEL, # Allow multiple requests
(OrderStatus.PENDING_CANCEL, OrderStatus.CANCELED): OrderStatus.CANCELED,
(OrderStatus.PENDING_CANCEL, OrderStatus.ACCEPTED): OrderStatus.ACCEPTED, # Allows failed cancel requests
Expand Down

0 comments on commit d47a776

Please sign in to comment.