updated exchange.calculate_funding_fees to have default close_date

This commit is contained in:
Sam Germain 2021-11-01 01:13:37 -06:00
parent 8b9dfafdf4
commit 33b0778c0a

View File

@ -1795,12 +1795,11 @@ class Exchange:
""" """
fees: float = 0 fees: float = 0
if close_date: if not close_date:
close_date_timestamp: Optional[int] = int(close_date.timestamp()) close_date = datetime.now(timezone.utc)
funding_rate_history = self.get_funding_rate_history( funding_rate_history = self.get_funding_rate_history(
pair, pair,
int(open_date.timestamp()), int(open_date.timestamp())
close_date_timestamp
) )
mark_price_history = self._get_mark_price_history( mark_price_history = self._get_mark_price_history(
pair, pair,