better param for funding_fee_cutoff

This commit is contained in:
Sam Germain 2021-11-09 01:17:29 -06:00
parent 6c8501dadc
commit fbe9e73c5d
2 changed files with 6 additions and 6 deletions

View File

@ -229,10 +229,10 @@ class Binance(Exchange):
return await super()._async_get_historic_ohlcv( return await super()._async_get_historic_ohlcv(
pair=pair, timeframe=timeframe, since_ms=since_ms, is_new_pair=is_new_pair) 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 # 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: 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)

View File

@ -1704,12 +1704,12 @@ class Exchange:
except ccxt.BaseError as e: except ccxt.BaseError as e:
raise OperationalException(e) from 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: 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): def _get_funding_fee_dates(self, start: datetime, end: datetime):
if self.funding_fee_cutoff(start): if self.funding_fee_cutoff(start):