Hyperliquid Max Leverage and Risk Limits by Asset Class Explained
Hyperliquid sets per-asset open interest caps and maximum leverage that change dynamically as market conditions shift — understanding these limits is critical before sizing into illiquid alt-perps where position caps can force partial fills. This reference covers how to query current risk parameters via the API and build guardrails into your bot.
Hyperliquid max leverage and risk limits are not static numbers you read once and hardcode — they are protocol-level parameters that the exchange updates in response to liquidity conditions, open interest growth, and asset volatility. If you are running a systematic perp strategy or a market-making bot on Hyperliquid and you are not querying these values at startup (and periodically re-fetching them), you will eventually hit a silent constraint that causes partial fills, rejected orders, or unexpected position caps.
How Hyperliquid Structures Per-Asset Risk Parameters
Every perpetual market on Hyperliquid carries a set of risk parameters stored in its metadata. The two that matter most for position sizing are:
maxLeverage— the ceiling on account leverage for a given asset. Ranges from 3× on very illiquid alts up to 50× on BTC and ETH.openInterestcap (OI cap) — a protocol-level ceiling on the total notional open interest, expressed in the base asset. When aggregate OI across all users approaches this cap, the exchange begins rejecting new orders that would push it further.
Critically, these are set per asset, not per account tier. A 40× BTC position is fine; a 40× order on a small-cap alt-perp will be rejected outright. The maxLeverage for a given market is deterministic from the protocol's perspective but changes without notice as listing conditions are revised.
Querying Current Limits via the Hyperliquid Info API
Hyperliquid exposes risk parameters through its public HTTP info endpoint. No authentication is required. The call you want is:
POST https://api.hyperliquid.xyz/info
{"type": "meta"}
The response includes a universe array where each element corresponds to one perpetual market. The fields relevant to risk management are:
{
"name": "SOL",
"szDecimals": 2,
"maxLeverage": 20,
"onlyIsolated": false
}
maxLeverage is exactly what it says. onlyIsolated indicates whether cross-margin is permitted — some listed assets enforce isolated-only mode, which changes how you need to structure your margin account. For OI caps, the companion call {"type": "metaAndAssetCtxs"} returns the live openInterest alongside the static metadata, letting you compute headroom before you size in.
A minimal TypeScript fetch looks like this:
const res = await fetch("https://api.hyperliquid.xyz/info", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ type: "metaAndAssetCtxs" }),
});
const [meta, ctxs] = await res.json();
const assets = meta.universe.map((asset: any, i: number) => ({
name: asset.name,
maxLeverage: asset.maxLeverage,
onlyIsolated: asset.onlyIsolated,
openInterest: Number(ctxs[i].openInterest),
}));
Cache this structure at bot startup and refresh it on a configurable interval — every 15 minutes is reasonable for most strategies.
Asset-Class Tiers: What to Expect
In practice, Hyperliquid's listed perps fall into rough tiers by how the exchange calibrates their limits:
Majors (BTC, ETH): Up to 50× leverage. OI caps are very large — measured in hundreds of millions of dollars — and rarely a concern for retail-scale bots. Cross-margin is always permitted.
Large-cap alts (SOL, AVAX, ARB, etc.): Typically 20× max leverage. OI caps in the tens of millions. Cross-margin generally available. At these sizes, a well-funded trading desk can start to approach the OI ceiling in one-sided trending conditions, so monitoring matters.
Mid and small-cap alt-perps: This is where things get tight. Max leverage of 3× to 10× is common. OI caps can be as low as a few million dollars in notional. These are the markets where partial fills happen — your 200K USDC market order at 5× is trying to place $1M notional against an OI cap that may have only $300K of headroom left. The exchange does not reject gracefully; it fills what it can and silently stops.
Newly listed assets: Frequently launch with isolated-only mode and leverage capped at 3×. These limits often loosen over the first weeks if liquidity develops, so re-fetching the metadata is not optional for any strategy that trades recently listed markets.
Building OI-Aware Guards into Your Bot
The core pattern for a production bot is straightforward: compute how much OI headroom exists before you size the order, and cap your order notional to a fraction of that headroom.
function maxOrderNotional(
assetCtx: AssetCtx,
maxOiUtilization = 0.05 // don't consume more than 5% of remaining cap
): number {
const oiCap = Number(assetCtx.oiCap); // from metaAndAssetCtxs if available
const currentOi = Number(assetCtx.openInterest);
const headroom = oiCap - currentOi;
return Math.max(0, headroom * maxOiUtilization);
}
A few engineering decisions that matter here:
- Use pessimistic OI estimates. OI reported by the API is a point-in-time snapshot. In a fast market, multiple bots can race to fill remaining headroom. Reduce your utilization fraction accordingly.
- Check
onlyIsolatedat order time. If your strategy assumes cross-margin but the asset has switched to isolated-only, your margin math is wrong. - Treat a leverage reduction as a signal. If
maxLeveragedrops between your cached fetch and your next refresh, the protocol is telling you the market has become riskier. Re-evaluate your position size before your next entry.
For a Hyperliquid perps trading bot, these guards belong in the order validation layer — the same place you check notional minimums and lot-size constraints — not buried in strategy logic.
Leverage and Margin Mode Interaction
Hyperliquid supports both cross-margin and isolated-margin accounts, and the two interact with max leverage in non-obvious ways. In cross mode, your entire account balance backs all positions, so a high-leverage position on one asset drains margin available to others. In isolated mode, each position has its own margin bucket and liquidation price independent of other positions.
The practical implication for bots: if you are running a multi-asset strategy in cross-margin mode, the effective leverage constraint is not maxLeverage per asset in isolation — it is the ratio of total notional to total account equity across all open positions. You can be within per-asset limits on every individual position and still be over-leveraged at the portfolio level. Build your position sizing to check total account leverage as a portfolio metric, not just per-asset leverage before each order.
For funding-rate arbitrage strategies that hold offsetting long and short positions, cross-margin typically makes sense because the positions net out — but confirm that both legs of the hedge are on assets that permit cross-margin, or the delta-neutral math breaks.
What Happens When You Ignore These Limits
The failure modes are unglamorous: a market order for 500K notional on a low-OI asset fills 180K and stops, leaving you with a partial position and a sizing model that thinks it placed the full order. A leveraged order placed above maxLeverage is outright rejected. A position opened in cross-margin on an onlyIsolated asset fails silently or errors at the exchange level, depending on how your client handles it.
None of these are catastrophic if your bot's reconciliation loop compares intended versus actual positions after each fill. All of them become catastrophic if they don't — a partial hedge on a delta-neutral trade is a directional position you didn't intend to hold.
If you need a Hyperliquid perp bot that handles OI caps, leverage tiers, and margin mode programmatically from day one, talk to TierZero — these guards ship as standard in every build.
Need a bot like this built?
We design, build and run trading bots on Solana, Hyperliquid and Polymarket.
Start a projectMore from the blog
Public vs Paid RPC: How to Run a Fair Benchmark
A fair comparison of public and paid RPC endpoints must account for quotas, workload, freshness and support guarantees.
Read articleRPC Benchmark Percentiles Explained: p50, p95 and p99
Why averages hide the latency spikes that break trading bots, wallets and production blockchain applications.
Read articleHyperliquid REST vs WebSocket Benchmark: What to Measure
A benchmark plan for Hyperliquid market data that separates request latency from streaming freshness and recovery.
Read article