Skip to content

Commit

Permalink
[Coinbase] handle CANCEL_QUEUED order status
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Nov 9, 2024
1 parent c01e5d5 commit 7da9914
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Trading/Exchange/coinbase/coinbase_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ def fix_order(self, raw, **kwargs):
fixed[trading_enums.ExchangeConstantsOrderColumns.TYPE.value] = order_type
if fixed[ccxt_enums.ExchangeOrderCCXTColumns.STATUS.value] == "PENDING":
fixed[ccxt_enums.ExchangeOrderCCXTColumns.STATUS.value] = trading_enums.OrderStatus.PENDING_CREATION.value
if fixed[ccxt_enums.ExchangeOrderCCXTColumns.STATUS.value] == "CANCEL_QUEUED":
fixed[ccxt_enums.ExchangeOrderCCXTColumns.STATUS.value] = trading_enums.OrderStatus.PENDING_CANCEL.value
# sometimes amount is not set
if not fixed[ccxt_enums.ExchangeOrderCCXTColumns.AMOUNT.value] \
and fixed[ccxt_enums.ExchangeOrderCCXTColumns.FILLED.value]:
Expand Down

0 comments on commit 7da9914

Please sign in to comment.