Updated exchange._get_funding_fee_dates to use new method funding_fee_cutoff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
""" Binance exchange subclass """
|
||||
import json
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
|
||||
@@ -227,3 +228,11 @@ class Binance(Exchange):
|
||||
f"{arrow.get(since_ms // 1000).isoformat()}.")
|
||||
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):
|
||||
'''
|
||||
# TODO-lev: Double check that gateio, ftx, and kraken don't also have this
|
||||
:param d: 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)
|
||||
|
||||
Reference in New Issue
Block a user