From c30d4a3d72946b1f245383df30c9ca176bdf36a8 Mon Sep 17 00:00:00 2001 From: Guillaume De Saint Martin Date: Sun, 17 Nov 2024 15:13:25 +0100 Subject: [PATCH] [Coinbase] handle ccxt ignored errors --- Trading/Exchange/coinbase/coinbase_exchange.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Trading/Exchange/coinbase/coinbase_exchange.py b/Trading/Exchange/coinbase/coinbase_exchange.py index ed85da940..0a0f379e9 100644 --- a/Trading/Exchange/coinbase/coinbase_exchange.py +++ b/Trading/Exchange/coinbase/coinbase_exchange.py @@ -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):