Revert ohlcv_candle_limit logic for okx

This commit is contained in:
Matthias
2022-05-14 19:32:28 +02:00
parent 116b58e97c
commit d60d0f64d2
3 changed files with 15 additions and 11 deletions

View File

@@ -619,7 +619,10 @@ class Exchange:
Checks if required startup_candles is more than ohlcv_candle_limit().
Requires a grace-period of 5 candles - so a startup-period up to 494 is allowed by default.
"""
candle_limit = self.ohlcv_candle_limit(timeframe, self._config['candle_type_def'], None)
candle_limit = self.ohlcv_candle_limit(
timeframe, self._config['candle_type_def'],
date_minus_candles(timeframe, startup_candles))
# Require one more candle - to account for the still open candle.
candle_count = startup_candles + 1
# Allow 5 calls to the exchange per pair