Don't fail trades loop if one pair fails

This commit is contained in:
Matthias
2024-06-06 18:05:45 +02:00
parent 4e319765ed
commit 31219299d2

View File

@@ -2630,6 +2630,7 @@ class Exchange:
if not all_stored_ticks_df.empty: if not all_stored_ticks_df.empty:
if all_stored_ticks_df.iloc[0]["timestamp"] <= first_candle_ms: if all_stored_ticks_df.iloc[0]["timestamp"] <= first_candle_ms:
last_cached_ms = all_stored_ticks_df.iloc[-1]["timestamp"] last_cached_ms = all_stored_ticks_df.iloc[-1]["timestamp"]
from_id = all_stored_ticks_df.iloc[-1]["id"]
# only use cached if it's closer than first_candle_ms # only use cached if it's closer than first_candle_ms
since_ms = ( since_ms = (
last_cached_ms last_cached_ms
@@ -2650,9 +2651,9 @@ class Exchange:
from_id=from_id, from_id=from_id,
) )
except Exception as e: except Exception:
logger.exception(f"Refreshing TRADES data for {pair} failed") logger.exception(f"Refreshing TRADES data for {pair} failed")
raise e continue
if new_ticks: if new_ticks:
all_stored_ticks_list = all_stored_ticks_df[ all_stored_ticks_list = all_stored_ticks_df[