Some more replacements of ticker_interval

This commit is contained in:
Matthias 2020-06-02 09:41:42 +02:00
parent 947903a4ac
commit 3e895ae74a
4 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,7 @@ class IHyperOptLoss(ABC):
Defines the custom loss function (`hyperopt_loss_function()` which is evaluated every epoch.)
"""
ticker_interval: str
timeframe: str
@staticmethod
@abstractmethod

View File

@ -288,6 +288,7 @@ class Trade(_DECL_BASE):
'max_rate': self.max_rate,
'strategy': self.strategy,
'ticker_interval': self.ticker_interval,
'timeframe': self.ticker_interval,
'open_order_id': self.open_order_id,
'exchange': self.exchange,
}

View File

@ -104,7 +104,7 @@ def test_refresh(mocker, default_conf, ohlcv_history):
timeframe = default_conf["timeframe"]
pairs = [("XRP/BTC", timeframe), ("UNITTEST/BTC", timeframe)]
pairs_non_trad = [("ETH/USDT", ticker_interval), ("BTC/TUSD", "1h")]
pairs_non_trad = [("ETH/USDT", timeframe), ("BTC/TUSD", "1h")]
dp = DataProvider(default_conf, exchange)
dp.refresh(pairs)

View File

@ -87,7 +87,7 @@ def test_load_config_file_error_range(default_conf, mocker, caplog) -> None:
assert isinstance(x, str)
assert (x == '{"max_open_trades": 1, "stake_currency": "BTC", '
'"stake_amount": .001, "fiat_display_currency": "USD", '
'"timeframe": "5m", "dry_run": true, ')
'"timeframe": "5m", "dry_run": true, "cance')
def test__args_to_config(caplog):