diff --git a/freqtrade/exchange/exchange_types.py b/freqtrade/exchange/exchange_types.py index 9687057bd..ae84bb502 100644 --- a/freqtrade/exchange/exchange_types.py +++ b/freqtrade/exchange/exchange_types.py @@ -44,6 +44,7 @@ class FtHas(TypedDict, total=False): funding_fee_timeframe: str funding_fee_candle_limit: int floor_leverage: bool + uses_leverage_tiers: bool needs_trading_fees: bool order_props_in_contracts: list[Literal["amount", "cost", "filled", "remaining"]] diff --git a/freqtrade/exchange/hyperliquid.py b/freqtrade/exchange/hyperliquid.py index a75a77892..b6ec23942 100644 --- a/freqtrade/exchange/hyperliquid.py +++ b/freqtrade/exchange/hyperliquid.py @@ -35,6 +35,7 @@ class Hyperliquid(Exchange): "stop_price_prop": "stopPrice", "funding_fee_timeframe": "1h", "funding_fee_candle_limit": 500, + "uses_leverage_tiers": False, } _supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [ diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 9a5e58c92..5d83d4981 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -360,8 +360,9 @@ class Backtesting: ) # Combine data to avoid combining the data per trade. unavailable_pairs = [] + uses_leverage_tiers = self.exchange.get_option("uses_leverage_tiers", True) for pair in self.pairlists.whitelist: - if pair not in self.exchange._leverage_tiers: + if uses_leverage_tiers and pair not in self.exchange._leverage_tiers: unavailable_pairs.append(pair) continue