Simplify load_exchange interface

This commit is contained in:
Matthias
2023-05-13 08:27:27 +02:00
parent b2a3fe6879
commit 1552d81f45
12 changed files with 34 additions and 28 deletions

View File

@@ -633,7 +633,7 @@ def load_and_plot_trades(config: Config):
"""
strategy = StrategyResolver.load_strategy(config)
exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config)
exchange = ExchangeResolver.load_exchange(config)
IStrategy.dp = DataProvider(config, exchange)
strategy.ft_bot_start()
strategy.bot_loop_start(datetime.now(timezone.utc))
@@ -678,7 +678,7 @@ def plot_profit(config: Config) -> None:
if 'timeframe' not in config:
raise OperationalException('Timeframe must be set in either config or via --timeframe.')
exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config)
exchange = ExchangeResolver.load_exchange(config)
plot_elements = init_plotscript(config, list(exchange.markets))
trades = plot_elements['trades']
# Filter trades to relevant pairs