mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: initialize exchange before strategy
This commit is contained in:
@@ -93,14 +93,16 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
# Remove credentials from original exchange config to avoid accidental credential exposure
|
# Remove credentials from original exchange config to avoid accidental credential exposure
|
||||||
remove_exchange_credentials(config["exchange"], True)
|
remove_exchange_credentials(config["exchange"], True)
|
||||||
|
|
||||||
|
self.exchange = ExchangeResolver.load_exchange(
|
||||||
|
self.config, exchange_config=exchange_config, load_leverage_tiers=True
|
||||||
|
)
|
||||||
|
|
||||||
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
||||||
|
|
||||||
# Check config consistency here since strategies can set certain options
|
# Check config consistency here since strategies can set certain options
|
||||||
validate_config_consistency(config)
|
validate_config_consistency(config)
|
||||||
|
# Re-validate exchange compatibility
|
||||||
self.exchange = ExchangeResolver.load_exchange(
|
self.exchange.validate_config(self.config)
|
||||||
self.config, exchange_config=exchange_config, load_leverage_tiers=True
|
|
||||||
)
|
|
||||||
|
|
||||||
init_db(self.config["db_url"])
|
init_db(self.config["db_url"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user