Add some safety measures for new startup_candles verification

This commit is contained in:
Matthias
2022-05-15 15:12:29 +02:00
parent d60d0f64d2
commit 9143e9ecb1
3 changed files with 4 additions and 2 deletions

View File

@@ -622,7 +622,8 @@ class Exchange:
candle_limit = self.ohlcv_candle_limit(
timeframe, self._config['candle_type_def'],
date_minus_candles(timeframe, startup_candles))
int(date_minus_candles(timeframe, startup_candles).timestamp() * 1000)
if timeframe else None)
# Require one more candle - to account for the still open candle.
candle_count = startup_candles + 1
# Allow 5 calls to the exchange per pair

View File

@@ -1,5 +1,4 @@
import logging
from datetime import datetime, timedelta, timezone
from typing import Dict, List, Optional, Tuple
import ccxt