Use exchange.name instead of config['exchange']['name']

This commit is contained in:
Matthias
2019-10-23 07:06:02 +02:00
parent b4f4fae0ca
commit 87ff7be550
2 changed files with 10 additions and 10 deletions

View File

@@ -86,9 +86,9 @@ def start_download_data(args: Dict[str, Any]) -> None:
pairs_not_available: List[str] = []
# Init exchange
exchange = ExchangeResolver(config['exchange']['name'], config).exchange
try:
# Init exchange
exchange = ExchangeResolver(config['exchange']['name'], config).exchange
if config.get('download_trades'):
pairs_not_available = refresh_backtest_trades_data(
@@ -110,7 +110,7 @@ def start_download_data(args: Dict[str, Any]) -> None:
finally:
if pairs_not_available:
logger.info(f"Pairs [{','.join(pairs_not_available)}] not available "
f"on exchange {config['exchange']['name']}.")
f"on exchange {exchange.name}.")
def start_list_timeframes(args: Dict[str, Any]) -> None:
@@ -127,5 +127,5 @@ def start_list_timeframes(args: Dict[str, Any]) -> None:
if args['print_one_column']:
print('\n'.join(exchange.timeframes))
else:
print(f"Timeframes available for the exchange `{config['exchange']['name']}`: "
print(f"Timeframes available for the exchange `{exchange.name}`: "
f"{', '.join(exchange.timeframes)}")