mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-18 22:01:15 +00:00
chore: support snake_case for api keys
This commit is contained in:
@@ -14,12 +14,16 @@ def sanitize_config(config: Config, *, show_sensitive: bool = False) -> Config:
|
|||||||
return config
|
return config
|
||||||
keys_to_remove = [
|
keys_to_remove = [
|
||||||
"exchange.key",
|
"exchange.key",
|
||||||
|
"exchange.api_key",
|
||||||
"exchange.apiKey",
|
"exchange.apiKey",
|
||||||
"exchange.secret",
|
"exchange.secret",
|
||||||
"exchange.password",
|
"exchange.password",
|
||||||
"exchange.uid",
|
"exchange.uid",
|
||||||
|
"exchange.account_id",
|
||||||
"exchange.accountId",
|
"exchange.accountId",
|
||||||
|
"exchange.wallet_address",
|
||||||
"exchange.walletAddress",
|
"exchange.walletAddress",
|
||||||
|
"exchange.private_key",
|
||||||
"exchange.privateKey",
|
"exchange.privateKey",
|
||||||
"telegram.token",
|
"telegram.token",
|
||||||
"telegram.chat_id",
|
"telegram.chat_id",
|
||||||
|
|||||||
@@ -353,14 +353,18 @@ class Exchange:
|
|||||||
raise OperationalException(f"Exchange {name} is not supported by ccxt")
|
raise OperationalException(f"Exchange {name} is not supported by ccxt")
|
||||||
|
|
||||||
ex_config = {
|
ex_config = {
|
||||||
"apiKey": exchange_config.get("apiKey", exchange_config.get("key")),
|
"apiKey": exchange_config.get(
|
||||||
|
"api_key", exchange_config.get("apiKey", exchange_config.get("key"))
|
||||||
|
),
|
||||||
"secret": exchange_config.get("secret"),
|
"secret": exchange_config.get("secret"),
|
||||||
"password": exchange_config.get("password"),
|
"password": exchange_config.get("password"),
|
||||||
"uid": exchange_config.get("uid", ""),
|
"uid": exchange_config.get("uid", ""),
|
||||||
"accountId": exchange_config.get("accountId", ""),
|
"accountId": exchange_config.get("account_id", exchange_config.get("accountId", "")),
|
||||||
# DEX attributes:
|
# DEX attributes:
|
||||||
"walletAddress": exchange_config.get("walletAddress"),
|
"walletAddress": exchange_config.get(
|
||||||
"privateKey": exchange_config.get("privateKey"),
|
"wallet_address", exchange_config.get("walletAddress")
|
||||||
|
),
|
||||||
|
"privateKey": exchange_config.get("private_key", exchange_config.get("privateKey")),
|
||||||
}
|
}
|
||||||
if ccxt_kwargs:
|
if ccxt_kwargs:
|
||||||
logger.info("Applying additional ccxt config: %s", ccxt_kwargs)
|
logger.info("Applying additional ccxt config: %s", ccxt_kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user