Move config json validation to after strategy loading

Otherwise attributes are mandatory in configuration
while they could be set in the strategy
This commit is contained in:
Matthias
2019-11-23 15:49:46 +01:00
parent 4dc0631a4b
commit af3eea3805
4 changed files with 13 additions and 10 deletions

View File

@@ -9,7 +9,8 @@ from typing import Any, Dict
from tabulate import tabulate
from freqtrade import constants
from freqtrade.configuration import TimeRange, remove_credentials
from freqtrade.configuration import (TimeRange, remove_credentials,
validate_config_consistency)
from freqtrade.edge import Edge
from freqtrade.exchange import Exchange
from freqtrade.resolvers import StrategyResolver
@@ -35,6 +36,8 @@ class EdgeCli:
self.exchange = Exchange(self.config)
self.strategy = StrategyResolver(self.config).strategy
validate_config_consistency(self.config)
self.edge = Edge(config, self.exchange, self.strategy)
# Set refresh_pairs to false for edge-cli (it must be true for edge)
self.edge._refresh_pairs = False