diff --git a/Trading/Exchange/bitmart/bitmart_exchange.py b/Trading/Exchange/bitmart/bitmart_exchange.py index ff8bc7579..ea8c12800 100644 --- a/Trading/Exchange/bitmart/bitmart_exchange.py +++ b/Trading/Exchange/bitmart/bitmart_exchange.py @@ -27,9 +27,9 @@ class BitMartConnector(exchanges.CCXTConnector): def _client_factory(self, force_unauth, keys_adapter=None) -> tuple: return super()._client_factory(force_unauth, keys_adapter=self._keys_adapter) - def _keys_adapter(self, key, secret, password, uid): + def _keys_adapter(self, key, secret, password, uid, auth_token): # use password as uid - return key, secret, "", password + return key, secret, "", password, None, None class BitMart(exchanges.RestExchange): diff --git a/Trading/Exchange/coinbase/coinbase_exchange.py b/Trading/Exchange/coinbase/coinbase_exchange.py index 34b4980c6..06a61353c 100644 --- a/Trading/Exchange/coinbase/coinbase_exchange.py +++ b/Trading/Exchange/coinbase/coinbase_exchange.py @@ -65,12 +65,15 @@ class CoinbaseConnector(ccxt_connector.CCXTConnector): def _client_factory(self, force_unauth, keys_adapter=None) -> tuple: return super()._client_factory(force_unauth, keys_adapter=self._keys_adapter) - def _keys_adapter(self, key, secret, password, uid): + def _keys_adapter(self, key, secret, password, uid, auth_token): + if auth_token: + # when auth token is provided, force invalid keys + return "ANY_KEY", "ANY_SECRET", password, uid, auth_token, "Bearer " # CCXT pem key reader is not expecting users to under keys pasted as text from the coinbase UI # convert \\n to \n to make this format compatible as well if secret and "\\n" in secret: secret = secret.replace("\\n", "\n") - return key, secret, password, uid + return key, secret, password, uid, None, None @_coinbase_retrier async def _load_markets(self, client, reload: bool):