Skip to content

Commit

Permalink
[Coinbase] handle ccxt ignored errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Nov 17, 2024
1 parent 2a507c4 commit 4318329
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Trading/Exchange/coinbase/coinbase_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ class Coinbase(exchanges.RestExchange):
# "User is not allowed to convert crypto","message":"User is not allowed to convert crypto"}
("user is not allowed to convert crypto", ),
]
# text content of errors due to exchange internal synch (like when portfolio is not yet up to date after a trade)
EXCHANGE_INTERNAL_SYNC_ERRORS: typing.List[typing.Iterable[str]] = [
# BadRequest coinbase {"error":"INVALID_ARGUMENT","error_details":"account is not available","message":"account is not available"}
("account is not available", )
]
# text content of errors due to missing fnuds when creating an order (when not identified as such by ccxt)
EXCHANGE_MISSING_FUNDS_ERRORS: typing.List[typing.Iterable[str]] = [
("insufficient balance in source account", )
]

@classmethod
def get_name(cls):
Expand Down

0 comments on commit 4318329

Please sign in to comment.