From fbe9e73c5d34c61635ec2ba80c41ad1f60c4dd87 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Tue, 9 Nov 2021 01:17:29 -0600 Subject: [PATCH] better param for funding_fee_cutoff --- freqtrade/exchange/binance.py | 6 +++--- freqtrade/exchange/exchange.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index e3662235e..0bb051272 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -229,10 +229,10 @@ class Binance(Exchange): return await super()._async_get_historic_ohlcv( pair=pair, timeframe=timeframe, since_ms=since_ms, is_new_pair=is_new_pair) - def funding_fee_cutoff(self, d: datetime): + def funding_fee_cutoff(self, open_date: datetime): ''' # TODO-lev: Double check that gateio, ftx, and kraken don't also have this - :param d: The open date for a trade + :param open_date: The open date for a trade :return: The cutoff open time for when a funding fee is charged ''' - return d.minute > 0 or (d.minute == 0 and d.second > 15) + return open_date.minute > 0 or (open_date.minute == 0 and open_date.second > 15) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index cacbe4f7e..582e0d003 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1704,12 +1704,12 @@ class Exchange: except ccxt.BaseError as e: raise OperationalException(e) from e - def funding_fee_cutoff(self, d: datetime): + def funding_fee_cutoff(self, open_date: datetime): ''' - :param d: The open date for a trade + :param open_date: The open date for a trade :return: The cutoff open time for when a funding fee is charged ''' - return d.minute > 0 or d.second > 0 + return open_date.minute > 0 or open_date.second > 0 def _get_funding_fee_dates(self, start: datetime, end: datetime): if self.funding_fee_cutoff(start):