Skip to content

Commit

Permalink
Add BinanceOrderStatus.EXPIRED_IN_MATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Jan 5, 2024
1 parent 73b4729 commit 9789e10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Released on TBD (UTC).
- Fixed handling of configuration objects to work with `StreamingFeatherWriter`
- Fixed `BinanceSpotInstrumentProvider` fee loading key error for partial instruments load, thanks for reporting @doublier1
- Added `BinanceErrorCode.SERVER_BUSY` (-1008). Also added to the retry error codes.
- Added `BinanceOrderStatus.EXPIRED_IN_MATCH` which is when an order was canceled by the exchange due self-trade prevention (STP), thanks for reporting @doublier1

---

Expand Down
2 changes: 2 additions & 0 deletions nautilus_trader/adapters/binance/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class BinanceOrderStatus(Enum):
PENDING_CANCEL = "PENDING_CANCEL"
REJECTED = "REJECTED"
EXPIRED = "EXPIRED"
EXPIRED_IN_MATCH = "EXPIRED_IN_MATCH"
NEW_INSURANCE = "NEW_INSURANCE" # Liquidation with Insurance Fund
NEW_ADL = "NEW_ADL" # Counterparty Liquidation

Expand Down Expand Up @@ -478,6 +479,7 @@ def __init__(self) -> None:
BinanceOrderStatus.NEW_ADL: OrderStatus.FILLED,
BinanceOrderStatus.NEW_INSURANCE: OrderStatus.FILLED,
BinanceOrderStatus.EXPIRED: OrderStatus.EXPIRED,
BinanceOrderStatus.EXPIRED_IN_MATCH: OrderStatus.CANCELED, # Canceled due self-trade prevention (STP)
}

self.ext_to_int_order_side = {
Expand Down

0 comments on commit 9789e10

Please sign in to comment.