Skip to content

Commit

Permalink
Merge pull request #1380 from Drakkar-Software/dev
Browse files Browse the repository at this point in the history
[Coinbase] handle CANCEL_QUEUED order status
  • Loading branch information
GuillaumeDSM authored Nov 9, 2024
2 parents 1089e13 + 7da9914 commit 4f06bd6
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 4f06bd6

Please sign in to comment.