added 1s timeframe changes and requirements

This commit is contained in:
WCKD 2022-09-08 17:14:52 +03:00
parent 883abe5b4f
commit f8b35dc5b4
3 changed files with 2 additions and 10 deletions

View File

@ -590,9 +590,6 @@ class Exchange:
raise OperationalException( raise OperationalException(
f"Invalid timeframe '{timeframe}'. This exchange supports: {self.timeframes}") f"Invalid timeframe '{timeframe}'. This exchange supports: {self.timeframes}")
if timeframe and timeframe_to_minutes(timeframe) < 1:
raise OperationalException("Timeframes < 1m are currently not supported by Freqtrade.")
def validate_ordertypes(self, order_types: Dict) -> None: def validate_ordertypes(self, order_types: Dict) -> None:
""" """
Checks if order-types configured in strategy/config are supported Checks if order-types configured in strategy/config are supported

View File

@ -2,7 +2,7 @@ numpy==1.23.2
pandas==1.4.4 pandas==1.4.4
pandas-ta==0.3.14b pandas-ta==0.3.14b
ccxt==1.93.3 ccxt==1.93.14
# Pin cryptography for now due to rust build errors with piwheels # Pin cryptography for now due to rust build errors with piwheels
cryptography==37.0.4 cryptography==37.0.4
aiohttp==3.8.1 aiohttp==3.8.1

View File

@ -907,12 +907,7 @@ def test_validate_timeframes_failed(default_conf, mocker):
with pytest.raises(OperationalException, with pytest.raises(OperationalException,
match=r"Invalid timeframe '3m'. This exchange supports.*"): match=r"Invalid timeframe '3m'. This exchange supports.*"):
Exchange(default_conf) Exchange(default_conf)
default_conf["timeframe"] = "15s"
with pytest.raises(OperationalException,
match=r"Timeframes < 1m are currently not supported by Freqtrade."):
Exchange(default_conf)
def test_validate_timeframes_emulated_ohlcv_1(default_conf, mocker): def test_validate_timeframes_emulated_ohlcv_1(default_conf, mocker):
default_conf["timeframe"] = "3m" default_conf["timeframe"] = "3m"