mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
feat: add always_require_api_keys to ft_has
This commit is contained in:
@@ -137,6 +137,7 @@ class Exchange:
|
|||||||
"ohlcv_has_history": True, # Some exchanges (Kraken) don't provide history via ohlcv
|
"ohlcv_has_history": True, # Some exchanges (Kraken) don't provide history via ohlcv
|
||||||
"ohlcv_partial_candle": True,
|
"ohlcv_partial_candle": True,
|
||||||
"ohlcv_require_since": False,
|
"ohlcv_require_since": False,
|
||||||
|
"always_require_api_keys": False, # purge API keys for Dry-run. Must default to false.
|
||||||
# Check https://github.com/ccxt/ccxt/issues/10767 for removal of ohlcv_volume_currency
|
# Check https://github.com/ccxt/ccxt/issues/10767 for removal of ohlcv_volume_currency
|
||||||
"ohlcv_volume_currency": "base", # "base" or "quote"
|
"ohlcv_volume_currency": "base", # "base" or "quote"
|
||||||
"tickers_have_quoteVolume": True,
|
"tickers_have_quoteVolume": True,
|
||||||
@@ -241,7 +242,11 @@ class Exchange:
|
|||||||
logger.info("Instance is running with dry_run enabled")
|
logger.info("Instance is running with dry_run enabled")
|
||||||
logger.info(f"Using CCXT {ccxt.__version__}")
|
logger.info(f"Using CCXT {ccxt.__version__}")
|
||||||
|
|
||||||
remove_exchange_credentials(exchange_conf, config.get("dry_run", False))
|
# Don't remove exchange credentials for dry-run or if always_require_api_keys is set
|
||||||
|
remove_exchange_credentials(
|
||||||
|
exchange_conf,
|
||||||
|
not self._ft_has["always_require_api_keys"] and config.get("dry_run", False),
|
||||||
|
)
|
||||||
self.log_responses = exchange_conf.get("log_responses", False)
|
self.log_responses = exchange_conf.get("log_responses", False)
|
||||||
|
|
||||||
# Assign this directly for easy access
|
# Assign this directly for easy access
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class FtHas(TypedDict, total=False):
|
|||||||
ohlcv_require_since: bool
|
ohlcv_require_since: bool
|
||||||
ohlcv_volume_currency: str
|
ohlcv_volume_currency: str
|
||||||
ohlcv_candle_limit_per_timeframe: dict[str, int]
|
ohlcv_candle_limit_per_timeframe: dict[str, int]
|
||||||
|
always_require_api_keys: bool
|
||||||
# Tickers
|
# Tickers
|
||||||
tickers_have_quoteVolume: bool
|
tickers_have_quoteVolume: bool
|
||||||
tickers_have_percentage: bool
|
tickers_have_percentage: bool
|
||||||
|
|||||||
Reference in New Issue
Block a user