Don't attempt to calculate funding fees when the initial timeframe hasn't been exceeded.
This commit is contained in:
parent
a26c82b7cc
commit
60dfadf446
@ -1865,6 +1865,7 @@ class Exchange:
|
||||
mark_rates = candle_histories[mark_comb]
|
||||
|
||||
df = funding_rates.merge(mark_rates, on='date', how="inner", suffixes=["_fund", "_mark"])
|
||||
if not df.empty:
|
||||
df = df[(df['date'] >= open_date) & (df['date'] <= close_date)]
|
||||
fees = sum(df['open_fund'] * df['open_mark'] * amount)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user