From c4312fbb311fb28903eba6f729bb7e01265eb1ca Mon Sep 17 00:00:00 2001 From: gaardiolor Date: Fri, 1 Nov 2024 19:14:37 +0100 Subject: [PATCH] _lev_prep: fixed typo. dry_run_liquidation_price: use wallet_balance instead of stake_amount --- freqtrade/exchange/hyperliquid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/hyperliquid.py b/freqtrade/exchange/hyperliquid.py index d7c64e462..f37b9dc84 100644 --- a/freqtrade/exchange/hyperliquid.py +++ b/freqtrade/exchange/hyperliquid.py @@ -66,7 +66,7 @@ class Hyperliquid(Exchange): # Hyperliquid expects leverage to be an int leverage = int(leverage) # Hyperliquid needs the parameter leverage. - # Don't use set_leverage(), as this sets margin back to cross + # Don't use _set_leverage(), as this sets margin back to cross self.set_margin_mode(pair, self.margin_mode, params={"leverage": leverage}) def dry_run_liquidation_price( @@ -98,7 +98,7 @@ class Hyperliquid(Exchange): 'SOL/USDC:USDC': 43}} """ # Defining/renaming variables to match the documentation - isolated_margin = stake_amount + isolated_margin = wallet_balance position_size = amount price = open_rate position_value = price * position_size