|
@@ -384,6 +384,7 @@ class HyperliquidClient:
|
|
|
# Add margin mode from config
|
|
|
if Config.HYPERLIQUID_MARGIN_MODE:
|
|
|
order_params['marginMode'] = Config.HYPERLIQUID_MARGIN_MODE.lower()
|
|
|
+ logger.debug(f"📊 Using margin mode: {Config.HYPERLIQUID_MARGIN_MODE} (sent as: {order_params['marginMode']})")
|
|
|
|
|
|
logger.info(f"Placing limit order: {side} {amount} {symbol} @ {price} with params {order_params}")
|
|
|
order = self.sync_client.create_limit_order(symbol, side, amount, price, params=order_params)
|
|
@@ -417,6 +418,7 @@ class HyperliquidClient:
|
|
|
# Add margin mode from config
|
|
|
if Config.HYPERLIQUID_MARGIN_MODE:
|
|
|
order_params['marginMode'] = Config.HYPERLIQUID_MARGIN_MODE.lower()
|
|
|
+ logger.debug(f"📊 Using margin mode: {Config.HYPERLIQUID_MARGIN_MODE} (sent as: {order_params['marginMode']})")
|
|
|
|
|
|
# Hyperliquid requires a price for market orders for slippage protection.
|
|
|
# This must be passed as the 'price' argument, not within 'params'.
|