Update merge to "left" to avoid creating non-existing mark candles

This commit is contained in:
Matthias
2024-02-29 07:31:22 +01:00
parent e988995d71
commit cdfeae9f90
2 changed files with 9 additions and 3 deletions

View File

@@ -2887,7 +2887,7 @@ class Exchange:
else:
# Fill up missing funding_rate candles with fallback value
combined = mark_rates.merge(
funding_rates, on='date', how="outer", suffixes=["_mark", "_fund"]
funding_rates, on='date', how="left", suffixes=["_mark", "_fund"]
)
combined['open_fund'] = combined['open_fund'].fillna(futures_funding_rate)
return combined