Skip to content
TradePerpetuals9 pages
What a perpetual future isFoundationA perpetual future is a contract on an asset's price that never expires, kept close to that price by an hourly payment between longs and shorts.Contract specificationsPractitionerEvery Hyperliquid perp is a linear contract on 1 unit of its asset, defined by size decimals, maximum leverage, a margin table and a margin mode.FundingPractitionerFunding is an hourly payment between longs and shorts, set by how far the perp trades from the oracle price, that ties a contract with no expiry to its index.Margin: cross, isolated and margin tiersPractitionerMargin is the collateral behind a perp: initial margin to open, maintenance margin to stay open, shared in cross mode or ring-fenced in isolated mode.Leverage and liquidationPractitionerBelow maintenance margin, positions go to the order book as market orders; below two thirds of it, the liquidator vault takes them over.Auto-deleveragingExpertWhen an account goes below zero, auto-deleveraging closes the most profitable, most leveraged opposing positions at the previous mark price, leaving no bad debt.Hyperps and index perpetualsPractitionerHyperps fund against a moving average of their own mark price until spot trading exists; index perps track a formula the validators publish.AMM-priced perpetualsExpertSome perps price off a Uniswap V2 or V3 pool instead of exchange spot prices, and are isolated only, with margin locked in until the position closes.DelistingPractitionerWhen validators vote to delist a perp, positions settle at the 1-hour time-weighted oracle price before the vote and no new orders are accepted.

Contract specifications

Practitioner

Every Hyperliquid perp is a linear contract on 1 unit of its asset, defined by size decimals, maximum leverage, a margin table and a margin mode.

Every order you send must fit its market’s grid of size and price, and every position its leverage limits. The docs describe “few contract-specific details and no address-specific restrictions”: no position limit, the same rules for every account.

A position is worth size x price, with hourly funding instead of expiry.

Validator-operated perps are quanto: USDT PnL is paid 1:1 in USDC, with no conversion. PURR-USD and HYPE-USD use USDC oracles, since Hyperliquid spot is their most liquid source. On a HIP-3 dex, collateral is the deployer’s chosen quote asset, collateralToken in meta.

The meta info request returns them:

Field Meaning
name Coin name. HIP-3 names are already qualified as dex:COIN
szDecimals Size decimals. The lot size is 10^-szDecimals
maxLeverage The highest leverage a position may be opened at
marginTableId The margin table that lowers maximum leverage for large positions
marginMode "strictIsolated" (isolated, margin cannot be removed) or "noCross" (isolated, margin can be removed). HIP-3 registration also accepts "normal"; on the cross-enabled assets in the mainnet reads below, the field was absent
onlyIsolated Deprecated. True for either restricted margin mode
isDelisted True once the asset is delisted

A size has at most szDecimals decimals: with 3, 1.001 is valid and 1.0001 is not.

There is no tick field. A price is valid with at most 5 significant figures and at most 6 - szDecimals decimals; integers are always valid.

Price Valid Reason
123456 yes integer, any length
12345.6 no not an integer, 6 significant figures
1234.5 yes
1234.56 no 6 significant figures
0.001234 yes
0.0012345 no 7 decimals
0.01234, szDecimals = 1 yes
0.012345, szDecimals = 1 no 6 decimals against a cap of 5

So the tick depends on the price level. With szDecimals = 2 (at most 4 decimals):

Price range Rule that binds Tick
100,000 and above integers always valid 1
10,000 to 99,999 5 significant figures 1
1,000 to 9,999.9 5 significant figures 0.1
100 to 999.99 5 significant figures 0.01
10 to 99.999 5 significant figures 0.001
1 to 9.9999 both 0.0001
below 1 4 decimals 0.0001

In one line: tick = min(1, max(10^(floor(log10(price)) - 4), 10^-(6 - szDecimals))). A price off the grid is rejected with Price must be divisible by tick size.

  • Orders under $10 are rejected with Order must have minimum value of $10.; maximum order values scale with maximum leverage.
  • Margin tiers cut leverage above a notional threshold (margin); HIP-3 margin tables have at most 3 tiers.
  • The funding premium is measured where the impact notional would execute; the 4 per cent hourly cap is the same for every asset (funding).
Parameter Value
Instrument type Linear perpetual
Contract 1 unit of the underlying spot asset
Underlying Hyperliquid oracle index of the underlying spot asset
Collateral, validator-operated perps USDC; oracle in USDT except PURR-USD and HYPE-USD (USDC)
Initial margin fraction 1 / leverage set by the user
Maintenance margin fraction half of the maximum initial margin fraction
Maximum leverage 3x to 40x on validator-operated perps; 1 to 50 in HIP-3 margin tables
Delivery or expiry none; funding every hour
Position limit none
Account type per-wallet cross or isolated margin
Funding impact notional 20,000 USDC for BTC and ETH; 6,000 USDC for all others
Price precision at most 5 significant figures and at most 6 - szDecimals decimals; integers always valid
Size precision at most szDecimals decimals
Minimum order value $10
Maximum market order value $30,000,000 if max leverage is 25 or more; $5,000,000 for 20 to under 25; $2,000,000 for 10 to under 20; $500,000 otherwise
Maximum limit order value 10 x maximum market order value
  • The tick is coarse at low prices: at 0.05 with szDecimals = 2, the 0.0001 tick is 0.2 per cent of the price, leaving 3 significant figures.
  • Below 10x maximum leverage, one market order is capped at $500,000: split it or use a TWAP.
  • Maximum leverage and margin mode vary widely by asset: check both before sizing.

Read meta (or metaAndAssetCtxs, adding live prices) once and cache it; pass dex for a HIP-3 dex, or use allPerpMetas for all. Asset ids are positions in universe (asset ids). Validate prices on the decimal string, never a float:

// True if px is a valid perp price for an asset with the given szDecimals.
// Rules: at most 5 significant figures, at most (6 - szDecimals) decimals, integers always valid.
function isValidPerpPx(px: string, szDecimals: number): boolean {
if (!/^\d+(\.\d+)?$/.test(px)) return false;
const [intPart, rawFrac = ""] = px.split(".");
const frac = rawFrac.replace(/0+$/, ""); // trailing zeros carry no precision
if (frac === "") return true; // integer prices are always allowed
if (frac.length > 6 - szDecimals) return false; // decimal cap
const sig = (intPart + frac).replace(/^0+/, ""); // leading zeros are not significant
return sig.length <= 5;
}
  • Per the docs, remove trailing zeros from prices and sizes when signing (signing).
  • SDKs round differently; precision has the safe rounding recipes, including why ceil(log10(p)) undercounts digits at exact powers of ten.
  • HyperEVM read precompiles return perp prices as integers scaled by 10^(6 - szDecimals) (precompiles).
  • A HIP-3 deployer fixes szDecimals, marginTableId and marginMode in registerAsset2. Open interest caps in size are a constant 1B per asset, so the docs suggest a szDecimals whose smallest increment is worth $1 to $10 at the initial mark price (deploying a perp dex).
  • szDecimals is not the tick: one production codebase derived the tick from it alone, which breaks when the price crosses a power of ten.
  • Read marginMode, not the deprecated onlyIsolated, to learn whether margin can be removed (margin).
  • A delisted asset stays in universe with isDelisted: true, so indices do not shift (delisting).

For margin tables, tiers and modes, see Margin. For rounding in code, see Precision.