mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 04:41:15 +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
|
Exchange ohlcv candle limit
|
||||||
Uses ohlcv_candle_limit_per_timeframe if the exchange has different limits
|
Uses ohlcv_candle_limit_per_timeframe if the exchange has different limits
|
||||||
per timeframe (e.g. bittrex), otherwise falls back to ohlcv_candle_limit
|
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 timeframe: Timeframe to check
|
||||||
:param candle_type: Candle-type
|
:param candle_type: Candle-type
|
||||||
:param since_ms: Starting timestamp
|
:param since_ms: Starting timestamp
|
||||||
:return: Candle limit as integer
|
: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(
|
return int(
|
||||||
self._ft_has.get("ohlcv_candle_limit_per_timeframe", {}).get(
|
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_price: str
|
||||||
mark_ohlcv_timeframe: str
|
mark_ohlcv_timeframe: str
|
||||||
funding_fee_timeframe: str
|
funding_fee_timeframe: str
|
||||||
|
funding_fee_candle_limit: int
|
||||||
floor_leverage: bool
|
floor_leverage: bool
|
||||||
needs_trading_fees: bool
|
needs_trading_fees: bool
|
||||||
order_props_in_contracts: list[Literal["amount", "cost", "filled", "remaining"]]
|
order_props_in_contracts: list[Literal["amount", "cost", "filled", "remaining"]]
|
||||||
|
|||||||
Reference in New Issue
Block a user