Hyperliquid exchange

Hyperliquid exchange is a venue for limit entry, status checks and reduce-only closure

Hyperliquid exchange is an onchain order-book venue where a trader enters a perpetual position with a priced limit order, checks whether it rested or filled, adjusts the resulting size and closes it with reduce-only protection. Treat submission, fill verification and position closure as separate actions because an accepted instruction is not necessarily an executed trade.

This handbook follows that lifecycle on HyperCore, including fee classification, exact order-state fields, position resizing and clean closure. It assumes the reader already has a funded trading account and understands perpetual contracts.

In short: A $10 minimum notional and asset-specific decimal rules decide whether an otherwise valid limit entry reaches the order book.

Placing the limit entry from price to confirmation

A Hyperliquid limit entry starts with the contract, direction, size, limit price, margin mode and time-in-force selected before the wallet confirmation.

Build the order ticket

The ticket binds one asset to one side: buy for a long entry or sell for a short entry. Enter size in base-asset units and price in quote-asset units.

On HyperCore, order-book validation combines price and size precision before matching begins. Perpetual prices permit 5 significant figures and no more than 6 minus the asset's szDecimals value after the decimal point, although integer prices remain valid. Size follows the same metadata field: when szDecimals equals 3, 1.001 is accepted while 1.0001 is not. Notional must reach $10. Check the visible best bid and ask, then place the limit where the planned trade belongs rather than rounding blindly. A valid price controls the worst execution level; it never promises an immediate fill.

Confirm the active address before signing. MetaMask, Rabby and WalletConnect submit against the HyperCore account, while USDC transferred through Arbitrum appears in the perps balance. Trading uses a gasless HyperCore action, so EVM gas does not enter execution cost. Review side, size and price.

Choose the time in force

Time in force determines whether a valid limit waits, posts or leaves immediately. Hyperliquid exposes 3 choices: GTC, ALO and IOC.

GTC persistence

GTC rests until it fills or the trader cancels it. A response containing a resting order ID means the instruction is live; it does not mean the position exists yet.

ALO and IOC resolution

ALO posts liquidity only and cancels if it would match immediately. IOC takes the available quantity at the limit or better, then cancels the unfilled remainder. Choose GTC for a patient entry, ALO when maker-only execution matters and IOC when the order must resolve at once.


Fees attach to fills, not submissions

Hyperliquid trading fees attach to executed perpetual notional, while an unfilled or canceled limit order produces no trade fee. The base perpetual tier charges 0.045% for taker fills and 0.015% for maker fills. The tier uses rolling 14-day weighted volume and is assessed at the end of each UTC day. A crossing limit takes liquidity; a resting limit adds it. Partial fills accrue fees only on filled notional.


Hyperliquid logo and finance infrastructure tagline

Reading order state before reading position state

Underneath that, Hyperliquid order status on HyperCore confirms what happened to the instruction, while clearinghouse state confirms whether exposure now exists. Read the submission response first: a resting object contains an order ID, while a filled object reports execution.

The Hyperliquid exchange API separates open-order inspection from position inspection. frontendOpenOrders returns the coin, side, limit price, original size, remaining size, timestamp, reduce-only flag and order ID. orderStatus accepts either a 64-bit exchange order ID or a 128-bit client order ID; the latter occupies 16 bytes and appears as a 34-character hexadecimal string including its prefix. The lifecycle words open, filled, canceled, triggered and rejected answer the first question. More specific values explain cancellation or rejection. Record the identifier at submission because a wallet confirmation alone does not identify the eventual fill.

The clearinghouseState response then shows signed size, entry price, position value, unrealized PnL, leverage, margin used and cumulative funding. Positive signed size records a long; negative signed size records a short. A partial fill creates exposure while the GTC remainder stays open, so compare the position with the original and remaining order sizes.

That comparison decides whether to wait, resize or cancel.

Adjusting a live position without losing state

A Hyperliquid position adjustment changes size, leverage or isolated collateral, and each action leaves a different record in account state.

An order in the same direction increases absolute size and recalculates entry price as a size-weighted average. An opposite-side trade reduces size while entry price stays unchanged for the remainder. Modify an order to replace a resting instruction; submit another when both instructions should coexist.

To reduce a long, submit a sell. To reduce a short, submit a buy. Enable reduce only when the action must shrink exposure rather than cross through zero. After every partial fill, read signed size again before calculating the next quantity.

Leverage accepts an integer from 1 through the asset's published maximum. Cross margin is the default. Isolated positions support margin additions and removals after opening; the API margin amount uses 6 decimals, where 1,000,000 internal units represent 1 USDC. This adjustment changes collateral state rather than trade history, so the order and position records remain distinct.

Decision check before resizing

Use this checklist when a fill or manual change leaves the intended position uncertain:

Once account state, order side and residual instructions agree, the position is ready for a deliberate close using a fresh size from the verified signed position.

How do I close a Hyperliquid position without flipping it?

A reduce-only order closes a Hyperliquid perpetual position by permitting only size reduction and rejecting any action that would increase or reverse exposure.

For a long, the closing side is sell; for a short, it is buy. Set quantity from the latest absolute signed size and enable reduce only. If the position reaches zero first, an oversized remainder cannot create opposite exposure and receives a reduce-only cancellation or rejection. For the underlying detail, read Hyperliquid exchange start with setup 101.

Choose the close behavior

Limit close

A reduce-only limit close sets the worst acceptable price and rests when liquidity does not meet it. GTC suits a patient exit, while IOC resolves the immediately executable amount and cancels the remainder.

Market close

A reduce-only market close seeks immediate execution against available liquidity. It prioritizes completion over a chosen limit, so inspect resulting fills rather than treating the confirmation estimate as final.

After execution, query signed size again. A nonzero remainder means the close filled only in part; submit the remaining quantity from fresh state. Once size reaches zero, cancel fixed-size TP/SL orders and any old entry orders still resting.

Open-order capacity and visible book depth

For a regular user, Hyperliquid account limits govern how many resting instructions remain live and how much book depth an API check returns.

Each user starts with a 1000-order allowance, gains one additional slot per 5 million USDC of cumulative volume and reaches a hard ceiling at 5000 open orders. Once an address already has at least 1000 open orders, new reduce-only and trigger orders are rejected. Subaccounts count as separate users for this boundary.

The l2Book snapshot returns at most 20 price levels per side. It supports aggregation at 2, 3, 4 or 5 significant figures; mantissa choices 1, 2 and 5 apply only when aggregation uses 5 significant figures. That boundary matters when automation estimates whether an IOC close has enough visible size at its limit.

Where partial fills, trigger orders and self-trades change the sequence

In the same way, Hyperliquid edge cases change the position lifecycle when orders fill in parts, wait for a trigger or meet the same address.

Every GTC partial fill changes signed size while the remainder stays live. A full parent fill places attached TP/SL children, while manually canceling a partially filled parent cancels them. A partial parent canceled for insufficient margin is the exception; its children are placed as though the parent filled.

Position TP/SL orders use the entire position by default, while a manually specified size stays fixed. The mark price activates these orders. Market TP/SL execution carries a 10% slippage tolerance; a limit version uses its chosen limit and can remain unfilled after triggering. TradingView chart controls change the trigger, not these execution rules.

HyperCore self-trade prevention cancels the resting order when the same address would cross it. No fee is deducted and no fill enters the trade feed. Re-read open orders after the cancellation before choosing a new limit or direct reduce-only close.

Maintaining a clean position record after the close

A completed Hyperliquid close ends with zero signed size, reconciled fills, canceled residual orders and a position history matching the wallet address.

Finish against account state rather than the ticket. Signed size should be zero or absent from active positions, while frontendOpenOrders should hold no unwanted close, trigger or entry instructions. Fill history supplies executed price, quantity and fee. Entry price, unrealized PnL and closed PnL are interface fields derived from trades and margin, so fills remain the durable execution record.

Automation should perform the same reconciliation through the Hyperliquid Python SDK or CCXT. Fill-history responses return at most 2000 records, so longer-running systems need time-based pagination and stored exchange or client order IDs. The queried address must match the address shown on the closed position.

A clean record makes the next entry start from known exposure instead of leftover intent.

Still wondering about Hyperliquid exchange?

What happens when a Hyperliquid scheduled-cancel time is reached?

Hyperliquid cancels every open order for the account when the scheduled time arrives. The timestamp must sit at least 5 seconds in the future, and each activation increments a counter limited to 10 triggers per day. That counter resets at 00:00 UTC. Sending the schedule action without a time removes the pending schedule, which lets an automated trader disarm it after normal shutdown.

How does HyperCore prioritize limit orders at the same price?

HyperCore matches resting limit orders by price-time priority. Better prices execute first, then earlier orders at the same price take precedence. Inside a block, the protocol groups actions before applying proposer order: actions without GTC or IOC book submissions come first, cancels come next and actions containing GTC or IOC orders follow. Modifying an order places the replacement into the category determined by its new order.

Does a Hyperliquid API wallet own the position it signs for?

A Hyperliquid API wallet signs actions but does not own the resulting position. Position state belongs to the master account, subaccount or vault address named in the action. Account queries therefore use that actual address; querying the agent wallet returns an empty account view. This separation lets one signing key authorize trading while balances, fills and open orders remain attached to the designated trading account.

Can a Hyperliquid limit order be modified by client order ID?

A Hyperliquid limit order can be modified with either its exchange order ID or its client order ID. The modify action carries a complete replacement order containing asset, side, price, size, reduce-only setting and order type. Use the latest identifier returned at submission, then verify the replacement in open orders. A client order ID remains especially useful when an automated system creates its own deterministic order references.

Can one Hyperliquid account hold both long and short positions in the same perpetual?

One HyperCore account records a single signed position size for each perpetual, so opposite trades offset the existing position rather than creating a separate hedge leg. A non-reduce-only order can pass through zero and establish exposure in the other direction. Separate subaccounts maintain independent position state, allowing operational separation when two strategies require opposing exposure without combining their signed sizes.

When does funding start after a Hyperliquid limit entry?

Funding begins only after a limit order fills and creates a perpetual position. An unfilled resting order has no position size and receives no funding payment. Hyperliquid settles funding every hour using position size multiplied by oracle price and the applicable funding rate. A partial fill exposes only the filled size at the interval, while a complete close stops subsequent funding because signed size has returned to zero.