ensure funding_fee_timeframe is always set

This commit is contained in:
Matthias
2024-01-04 15:29:28 +01:00
parent 3c1bbd9610
commit 50287ce556

View File

@@ -80,6 +80,7 @@ class Exchange:
"l2_limit_range_required": True, # Allow Empty L2 limit (kucoin) "l2_limit_range_required": True, # Allow Empty L2 limit (kucoin)
"mark_ohlcv_price": "mark", "mark_ohlcv_price": "mark",
"mark_ohlcv_timeframe": "8h", "mark_ohlcv_timeframe": "8h",
"funding_fee_timeframe": "8h",
"ccxt_futures_name": "swap", "ccxt_futures_name": "swap",
"needs_trading_fees": False, # use fetch_trading_fees to cache fees "needs_trading_fees": False, # use fetch_trading_fees to cache fees
"order_props_in_contracts": ['amount', 'filled', 'remaining'], "order_props_in_contracts": ['amount', 'filled', 'remaining'],
@@ -2734,8 +2735,7 @@ class Exchange:
# Only really relevant for trades very close to the full hour # Only really relevant for trades very close to the full hour
open_date = timeframe_to_prev_date('1h', open_date) open_date = timeframe_to_prev_date('1h', open_date)
timeframe = self._ft_has['mark_ohlcv_timeframe'] timeframe = self._ft_has['mark_ohlcv_timeframe']
timeframe_ff = self._ft_has.get('funding_fee_timeframe', timeframe_ff = self._ft_has['funding_fee_timeframe']
self._ft_has['mark_ohlcv_timeframe'])
mark_price_type = CandleType.from_string(self._ft_has["mark_ohlcv_price"]) mark_price_type = CandleType.from_string(self._ft_has["mark_ohlcv_price"])
if not close_date: if not close_date: