_lev_prep: fixed typo. dry_run_liquidation_price: use wallet_balance instead of stake_amount

This commit is contained in:
gaardiolor
2024-11-01 19:14:37 +01:00
parent cfa527e9af
commit c4312fbb31

View File

@@ -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