Make candle_limit optionally timeframe dependent

This commit is contained in:
Matthias
2021-02-14 10:29:45 +01:00
parent 7ecf8f8b80
commit 5622bb3247
5 changed files with 35 additions and 22 deletions

View File

@@ -30,10 +30,10 @@ class AgeFilter(IPairList):
if self._min_days_listed < 1:
raise OperationalException("AgeFilter requires min_days_listed to be >= 1")
if self._min_days_listed > exchange.ohlcv_candle_limit:
if self._min_days_listed > exchange.ohlcv_candle_limit('1d'):
raise OperationalException("AgeFilter requires min_days_listed to not exceed "
"exchange max request size "
f"({exchange.ohlcv_candle_limit})")
f"({exchange.ohlcv_candle_limit('1d')})")
@property
def needstickers(self) -> bool:

View File

@@ -32,10 +32,10 @@ class RangeStabilityFilter(IPairList):
if self._days < 1:
raise OperationalException("RangeStabilityFilter requires lookback_days to be >= 1")
if self._days > exchange.ohlcv_candle_limit:
if self._days > exchange.ohlcv_candle_limit('1d'):
raise OperationalException("RangeStabilityFilter requires lookback_days to not "
"exceed exchange max request size "
f"({exchange.ohlcv_candle_limit})")
f"({exchange.ohlcv_candle_limit('1d')})")
@property
def needstickers(self) -> bool: