Skip to main content

Liquidation

Liquidation protects the system from accounts that can no longer meet their margin obligations. When an account's equity falls below its maintenance margin requirement, Hypercall first tries to repair the account by closing short options. If that does not work in time, the account escalates to full liquidation.

Trigger Conditions​

Liquidation triggers when an account becomes underwater:

Portfolio Margin:

Equity<Maintenance Margin Required\text{Equity} < \text{Maintenance Margin Required}

Standard Margin:

Cash<MM Required\text{Cash} < \text{MM Required}

SM liquidation is driven by cash maintenance headroom (cash - mm_required), not equity, so long-option marks that raise NAV do not prevent a cash shortfall. The maintenance_margin = equity - mm_required API field is still reported but is not the SM liquidation trigger. See Standard Margin.

For a portfolio margin account, equity is net of anything owed to the PM lending pool, and the maintenance requirement also accounts for Hyperliquid's own liquidation of your perps on HyperCore. Hyperliquid can still liquidate those perps under its own rules, independently of Hypercall. See Portfolio Margin.

Hypercall checks the health of every account with positions every 5 seconds.

States​

StateWhat is happeningOrders
HealthyPM: equity at or above MM required. SM: cash at or above MM required.All orders allowed
PreLiquidationPartial liquidation: Hypercall places closing orders on the account's short optionsOnly orders that reduce an existing position
InLiquidationFull liquidation. Standard margin: the account's book is offered to a liquidatorOnly orders that reduce an existing position
LiquidatedA liquidator took over the account's bookOnly orders that reduce an existing position

Withdrawals and PM cash sweeps are disabled in PreLiquidation and InLiquidation. Once a PM account is being drained for full liquidation, all of its orders are blocked.

State Transitions​

  1. Healthy to PreLiquidation: the account falls below its MM threshold.
  2. PreLiquidation to Healthy: the account reaches the buffered target, MM required × 1.05, and none of its liquidation orders are still open. The boundary is inclusive.
  3. PreLiquidation to InLiquidation: the account is still below the target and one of the escalation conditions below is met.
  4. InLiquidation to Healthy: the account recovers before a liquidator takes it over, and the full liquidation is stopped.
  5. InLiquidation to Liquidated: a liquidator takes over the account.

Partial Liquidation​

When an account enters PreLiquidation:

  1. Orders that would add risk are rejected immediately. Orders that reduce an existing position are still accepted.
  2. Hypercall cancels your open orders that add risk and places reduce-only buy orders on your short options, sized to bring the account back to MM required × 1.05. It closes the shorts that free up the most margin per contract first.
  3. Each order is priced at the best ask (or mid, or bid, if there is no ask) plus a liquidation bonus. The bonus starts at 0.5% and rises linearly to 10% over 5 minutes. Orders are repriced every 5 seconds.
  4. As soon as the account is back at or above the target and the liquidation orders are gone, it returns to Healthy.

The bonus is a cost to you: it is what you pay above the market to get your shorts closed quickly.

Use this window to fix the account yourself:

  • Deposit collateral
  • Close positions, especially short options
  • Cancel orders that add risk

Escalation to Full Liquidation​

An account in PreLiquidation that is still below the target escalates to full liquidation when any of these is true:

  • Equity is negative.
  • It has no short options left for partial liquidation to close.
  • The escalation deadline passes. The deadline is 20 minutes after the account entered PreLiquidation.

The 20-minute window also means a brief bad mark does not push an account straight into full liquidation.

Full Liquidation​

For a standard margin account, full liquidation hands the account's book to a liquidator inside the Hypercall engine. Hypercall first cancels all of the account's open orders, then offers the account.

  • The liquidator must bring the account back to MM required × 1.05, so it puts up the margin the account is missing.
  • If the account still has positive equity, the liquidator pays that equity to you.
  • The liquidator takes every position and the account's cash.

If the account recovers before a liquidator takes it, the full liquidation is stopped and the account returns to Healthy.

For a portfolio margin account, the partial liquidation above is the step to plan around. Once a PM account escalates, its open orders are cancelled and its orders are blocked while it is worked; this page will describe the rest of that step once it is final.

Losses Beyond Equity​

A loss beyond an account's equity is never covered by closing other traders' positions; Hypercall has no auto-deleveraging. Who absorbs it depends on the margin mode.

Standard margin. The liquidator takes the account's positions and cash as they stand, deficit included. A negative-equity shortfall stays with the liquidator.

Portfolio margin. What the account still owes after liquidation (pool loans and unpaid settlement) runs through a fixed waterfall:

  1. The borrower's collateral. Hypercall collects from the account's HyperCore collateral. See recovery. A loan is written off only after collection has run out.
  2. The first-loss reserve. It first pays the accounts the borrower still owes settlement to, oldest batch first, then covers the written-off loan.
  3. Pool lenders. Whatever the reserve cannot cover lowers the pool's share price.

The debt is not forgiven. Anything recovered from the borrower later first pays settlement counterparties still owed, oldest batch first, then any outstanding pool loan; only the remainder goes to the reserve and lenders, in proportion to what each lost. The first-loss reserve backs PM loans only; there is no venue-wide insurance fund.

API Endpoints​

Get Liquidation Status​

GET /liquidation/status?wallet=0x...

data is null for an account that has never left Healthy.

Response:

{
"success": true,
"data": {
"wallet": "0x...",
"state": "pre_liquidation",
"liquidation_mode": "partial",
"margin_mode": "portfolio",
"equity": "4500.00",
"mm_required": "5000.00",
"maintenance_margin": "-500.00",
"shortfall": "500.00",
"partial_liquidation": {
"entered_at": 1737312000000,
"target_equity": "5250.00",
"mm_shortfall": "500.00",
"escalation_deadline": 1737313200000,
"bonus_bps": 50
},
"full_liquidation": null
}
}

partial_liquidation also lists the open liquidation order IDs. full_liquidation carries the takeover details, including margin_needed, winner and the current required bid.

Get Liquidation History​

GET /liquidation/history?wallet=0x...&limit=20

Returns state transition history for an account.

Get Public Liquidation History​

GET /liquidations?limit=50

Returns newest-first liquidation transition history across wallets. The endpoint is public and uses cursor pagination for liquidator bots and monitoring tools.

Query parameters

  • cursor: Opaque cursor returned by the previous page.
  • limit: Page size, default 50, maximum 100.
  • wallet: Optional wallet filter.
  • status or state: Optional liquidation transition state filter. Accepted values are healthy, pre_liquidation, in_liquidation, and liquidated.
  • margin_mode: Optional margin mode filter. Accepted values are standard and portfolio.
  • liquidation_mode: Optional liquidation mode filter. Accepted values are partial and full.

Response: PublicLiquidationsResponse with liquidation transition entries and page.next_cursor for the next request.

Get Auction Details​

GET /liquidation/auction/{auction_id}

Returns the full liquidation's status, positions, and settlement details.

WebSocket Notifications​

Liquidation state changes are broadcast on the liquidation channel:

{
"type": "LiquidationStateChange",
"wallet_address": "0x...",
"previous_state": "healthy",
"new_state": "pre_liquidation",
"liquidation_mode": "partial",
"margin_mode": "portfolio",
"equity": "4500.00",
"mm_required": "5000.00",
"maintenance_margin": "-500.00",
"shortfall": "500.00",
"partial_liquidation": { "escalation_deadline": 1737313200000, "bonus_bps": 50 },
"full_liquidation": null,
"timestamp": 1737312000000
}

partial_liquidation and full_liquidation carry the same fields as the status endpoint. Subscribe to receive real-time updates for your wallet.

Parameters​

ParameterValueDescription
Health check interval5 secondsHow often account health is checked
Recovery targetMM required × 1.05Equity (PM) or cash (SM) needed to return to Healthy, and the level a full liquidation restores
Minimum shortfall0Any shortfall starts partial liquidation
Liquidation bonus0.5% rising to 10% over 5 minutesPremium over the reference price on partial liquidation orders
Reprice interval5 secondsHow often partial liquidation orders are repriced
Escalation deadline20 minutesTime in PreLiquidation before full liquidation starts

Best Practices​

For Traders​

  1. Monitor margin ratio: Keep equity well above MM (recommend 2x buffer)
  2. Set alerts: Use WebSocket to detect pre-liquidation early
  3. Prepare dry powder: Keep spare collateral ready to deposit
  4. Close shorts yourself: You pay no liquidation bonus on orders you place

Querying Health​

Check your margin status regularly:

curl "https://api.hypercall.xyz/portfolio?wallet=0x..."

# Look for:
# - span_margin.equity vs span_margin.maintenance_margin_required (portfolio)
# - margin_summary.standard_margin.maintenance_margin_headroom (standard)

See also: