From 33b0778c0a480998992bd73e7f4922ccf2631ae3 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Mon, 1 Nov 2021 01:13:37 -0600 Subject: [PATCH] updated exchange.calculate_funding_fees to have default close_date --- freqtrade/exchange/exchange.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 3e82dd626..24ab26eb3 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1795,12 +1795,11 @@ class Exchange: """ fees: float = 0 - if close_date: - close_date_timestamp: Optional[int] = int(close_date.timestamp()) + if not close_date: + close_date = datetime.now(timezone.utc) funding_rate_history = self.get_funding_rate_history( pair, - int(open_date.timestamp()), - close_date_timestamp + int(open_date.timestamp()) ) mark_price_history = self._get_mark_price_history( pair,