Skip to content

Commit

Permalink
[Binance] handle "PENDING_NEW" order status
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed May 16, 2024
1 parent 5f629c7 commit 808fce1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Trading/Exchange/binance/binance_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ def _adapt_order_type(self, fixed):
self.logger.error(f"Unknown order type, order: {fixed}")
# stop loss and take profits are not tagged as such by ccxt, force it
fixed[trading_enums.ExchangeConstantsOrderColumns.TYPE.value] = updated_type
if fixed.get(ccxt_enums.ExchangeOrderCCXTColumns.STATUS.value, None) == "PENDING_NEW":
fixed[ccxt_enums.ExchangeOrderCCXTColumns.STATUS.value] = trading_enums.OrderStatus.PENDING_CREATION.value
return fixed

def fix_trades(self, raw, **kwargs):
Expand Down

0 comments on commit 808fce1

Please sign in to comment.