From 5b2b5285ed18c5ac73814109a4af1e496c772ba3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 14 Jul 2024 08:57:23 +0200 Subject: [PATCH] chore: Support apiKey as config value (aligns secret configuration with ccxt) --- freqtrade/configuration/config_secrets.py | 1 + freqtrade/exchange/exchange.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/configuration/config_secrets.py b/freqtrade/configuration/config_secrets.py index 5a694dddf..273b597ed 100644 --- a/freqtrade/configuration/config_secrets.py +++ b/freqtrade/configuration/config_secrets.py @@ -14,6 +14,7 @@ def sanitize_config(config: Config, *, show_sensitive: bool = False) -> Config: return config keys_to_remove = [ "exchange.key", + "exchange.apiKey", "exchange.secret", "exchange.password", "exchange.uid", diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 62f0ca4de..8ed311825 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -338,7 +338,7 @@ class Exchange: raise OperationalException(f"Exchange {name} is not supported by ccxt") ex_config = { - "apiKey": exchange_config.get("key"), + "apiKey": exchange_config.get("apiKey", exchange_config.get("key")), "secret": exchange_config.get("secret"), "password": exchange_config.get("password"), "uid": exchange_config.get("uid", ""),