mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-15 12:22:18 +00:00
feat: add explicit funding_fee_candle_limit for simplified overriding
This commit is contained in:
@@ -459,15 +459,18 @@ class Exchange:
|
||||
Exchange ohlcv candle limit
|
||||
Uses ohlcv_candle_limit_per_timeframe if the exchange has different limits
|
||||
per timeframe (e.g. bittrex), otherwise falls back to ohlcv_candle_limit
|
||||
TODO: this is most likely no longer needed since only bittrex needed this.
|
||||
:param timeframe: Timeframe to check
|
||||
:param candle_type: Candle-type
|
||||
:param since_ms: Starting timestamp
|
||||
:return: Candle limit as integer
|
||||
"""
|
||||
|
||||
fallback_val = self._ft_has.get("ohlcv_candle_limit")
|
||||
if candle_type == CandleType.FUNDING_RATE:
|
||||
fallback_val = self._ft_has.get("funding_fee_candle_limit", fallback_val)
|
||||
return int(
|
||||
self._ft_has.get("ohlcv_candle_limit_per_timeframe", {}).get(
|
||||
timeframe, str(self._ft_has.get("ohlcv_candle_limit"))
|
||||
timeframe, str(fallback_val)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ class FtHas(TypedDict, total=False):
|
||||
mark_ohlcv_price: str
|
||||
mark_ohlcv_timeframe: str
|
||||
funding_fee_timeframe: str
|
||||
funding_fee_candle_limit: int
|
||||
floor_leverage: bool
|
||||
needs_trading_fees: bool
|
||||
order_props_in_contracts: list[Literal["amount", "cost", "filled", "remaining"]]
|
||||
|
||||
Reference in New Issue
Block a user