Skip to main content

Leverage and Margin Modes

Your perps sit on Hyperliquid, and your account is margined by Hypercall portfolio margin. Two risk systems look at the same positions. Hypercall makes you satisfy both.

Your risk is the worse of PM and Hyperliquid​

Every time you place an order or change leverage, Hypercall computes two requirements on your whole account:

  • Portfolio margin (PM). The worst loss across Hypercall's stress scenarios, with your options and perps netted against each other. A short call hedged with a long perp needs far less than the two legs on their own.
  • Hyperliquid margin. What Hyperliquid needs so that none of your perp positions gets liquidated on Hyperliquid. Your cross positions share one pool of collateral. Each isolated position has only its own margin.

Your requirement is the larger of the two. In code terms, max(PM, HL).

Why both: a PM offset only protects you while both legs exist. If Hyperliquid liquidates the perp leg of a hedge, the option leg is suddenly naked, and the PM credit you were relying on is gone. So Hypercall checks that each Hyperliquid compartment survives the same stress moves, and charges any loss from a venue liquidation (and from losing the hedge) in the PM number. It runs the check on Hyperliquid marks and again on Hypercall's spot price, and charges the worse.

Open orders count as filled. Resting perp orders, and the order you are about to send, are charged as if they fill. Cancelling orders frees margin.

A new position uses the market's maximum leverage. For a market where you have no position yet, Hypercall models the fill at the market's max leverage in both cross and isolated and charges the worse. You do not get extra room by picking a lower leverage before opening.

Leverage​

Leverage is set per market on Hyperliquid and applies to your open position and every order in that market. Open the leverage panel from the Cross 20× chip at the top of the order form. Changing leverage needs an active trading key and the TEE execution route, which is the app default; the smart contract route cannot change leverage.

  • Range. 1× up to the market's maximum, which Hyperliquid sets per market. The slider has stops at 1×, ¼, ½, ¾ and max.
  • Preview first. The panel shows Max order size and Margin for this order before and after the change. If the change would be refused, the confirm button is disabled with the reason.
  • The rule. A leverage change is accepted only if your account still covers the stricter of PM and Hyperliquid margin after the change, counting open perp orders as filled.
  • Raising leverage lowers the margin an order needs on Hyperliquid and raises your max size. On an isolated position it also pulls the liquidation price closer.
  • Lowering leverage with resting orders is allowed if you can still cover them at the new leverage. If not, you get insufficient_margin with the equity and requirement; cancel some orders or add funds.
  • Clock check. A leverage change is signed with a short expiry (about 10 seconds). If your device clock is far off, the change can expire in flight. Set your clock to update automatically.

Cross or isolated​

Cross

Shared collateral

  • All cross positions draw on one pool of Hyperliquid collateral
  • Liquidation price depends on total account equity, not the leverage setting
  • Leverage changes mostly move how much you can open

Isolated

Collateral per position

  • Only the margin assigned to the position is at risk on Hyperliquid
  • Liquidation price depends on that margin, so leverage moves it
  • Your Hyperliquid cross balance must fund the isolated margin
  • Required on isolated-only markets

When the mode switch is locked:

  • You hold a position in that market. Hyperliquid does not allow switching cross and isolated on an open position, and neither does Hypercall (mode_change_with_position). Close the position, switch, reopen.
  • The market is isolated-only. Some markets are isolated-only on Hyperliquid. The panel shows the explanation and no switch. See supported markets.

The isolated margin comes out of your Hyperliquid cross balance. If that balance cannot fund the isolated margin a new leverage needs, the change is refused. Add funds or pick a higher leverage.

What the order form numbers mean​

Every number in the form comes from the same check that runs when you submit. The form asks the server about 250 ms after you stop typing.

FieldMeaning
AvailableInitial margin you have left before this order.
Margin requiredInitial margin this order adds: margin after minus margin before, both on the max(PM, HL) basis with every open order counted.
Liquidation price before → afterWhere this market's position would be liquidated now and after this order fills: whichever comes first of Hyperliquid's liquidation of the compartment that holds the market (cross, or this isolated position) and the underlying price at which your Hypercall portfolio margin equity meets maintenance. The form labels which one binds. "After" assumes every pending perp order, including this one, fills. Shows a dash when the price cannot be evaluated.
Max (next to size)The largest size on this side that still passes the real admission check, found by testing sizes against it. If the form could not find a failing size, it is a lower bound. When Reduce only is on, max is your position size.
Order valueSize times price.
SlippageFor market orders, the furthest the fill can be from the reference price. See order types.

The Account block shows equity, unrealized PnL, margin in use, maintenance margin and margin ratio, on the same basis.

Once a position is open, the positions table shows a leverage badge (for example 20× Cross or 5× Iso; on desktop it opens the leverage panel) and the Liq. Px column: the earlier of the Hyperliquid and portfolio margin liquidation prices, with the distance to it. Hover the price to see both and which one binds. Isolated positions sit outside portfolio margin, so only Hyperliquid can liquidate them and the column shows Hyperliquid's price.

If the preview is unavailable, the form shows no numbers and you can still submit. The server runs the full check on submit either way.

Not enough margin​

When an order fails the margin check, the button reads Not enough margin and a card offers three fixes:

  1. Use max. Sets the size to the largest that passes.
  2. Raise to N×. The smallest leverage at which this order passes. It opens the leverage panel for you to confirm; nothing changes until you do.
  3. Deposit. Opens the deposit form prefilled with the shortfall.

Cancelling resting perp orders, or adding an offsetting option position, also frees margin under PM.