Hyperliquid lets you enter a perpetual trade and close it with reduce-only orders

A first perpetual trade on Hyperliquid starts with an order and creates a position as that order fills. Before submitting, confirm the selected contract, available collateral, direction, and size. Choose execution conditions that match your intended price boundary, then inspect the actual fills. A filled entry leaves exposure that needs management; a partial fill can leave an active remainder. To finish, close the actual position and confirm that unwanted orders no longer remain.

Updated -

A partial fill changes the next action

Position management begins as soon as an entry fills, even partially; a partially filled entry also requires a decision about its unfinished quantity. Consider an entry that started with no position in the selected contract. Continuing with the resulting position and canceling an unwanted remainder are different actions. Both require agreement between the executed quantity, the order status, and the position that the account displays.

Cancellation ends the remaining instruction once confirmed. It does not reverse earlier trades. After canceling a partial entry, the filled position still needs an exit decision. Confirm both the cancellation result and the final executed quantity, including any fill that occurred before cancellation took effect.


Set the exposure boundary before order entry

The selected contract and account determine what an entry changes and which collateral supports it. Confirm that the ticket names the intended perpetual market. A similarly named spot market changes token holdings and does not create the same position.

Account and collateral

Check the active trading account and its available collateral before relying on a wallet balance. Account mode determines how spot and perpetual balances interact. Unified accounts share a collateral asset across eligible cross margin positions, while standard accounts keep separate balances. A transfer or balance visible elsewhere therefore does not automatically establish trading capacity in the selected account.

Position size and margin

Read the size field together with its unit and the displayed position value. Margin is the collateral requirement supporting that exposure. For a perpetual entry, the initial margin calculation uses position size multiplied by mark price, divided by selected leverage. Maximum leverage depends on the asset. Cross margin shares collateral within the applicable account scope; isolated margin confines collateral to the position.

Enter the order with explicit execution limits

An order specifies the market, side, size, and execution conditions. Review those fields together before authorizing submission. Buying opens long exposure from a flat position; selling opens short exposure. Existing exposure changes what the same instruction does, so inspect the position before treating either side as a fresh entry.

Immediate execution

A market order seeks execution against available liquidity. The displayed market price does not promise one execution price for the entire quantity. Available orders can change, and insufficient liquidity can prevent execution. Read any slippage setting that the interface presents before submitting, since it affects the acceptable execution range.

A specified price boundary

A limit order permits execution at its price or better. For a buy, that price is the maximum; for a sell, it is the minimum. It can execute immediately when matching liquidity satisfies that boundary. Otherwise, its time-in-force setting determines whether an unfilled quantity remains available for later matching.

Read the execution record beside the position

A fill records an executed trade. An open order records an instruction that still has work remaining.

Fill records include the execution price, size, direction, and associated order identifier. Use those fields to distinguish separate executions from separate orders. One instruction can match several resting orders, producing multiple fills. Match the executions to the selected market and account before interpreting the position. A notification alone does not establish the full executed quantity.

The position's entry price can average multiple opening trades, weighted by size. A partial closing trade leaves that entry price unchanged.

Keep the fee entries alongside the execution prices when reviewing the completed action. Unrealized profit or loss changes with the mark price while exposure remains open. It does not substitute for the trade record. For a first entry from a flat position, the resulting signed position should correspond to the executed opening quantity unless another trade or liquidation also changed it.

Read the execution record beside the position: Keep the fee entries alongside the execution prices when reviewing the completed action. Unrealized profit or loss changes with the mark price while exposure remains open. It does not substitute for the trade record.; For a first entry from a flat position, the resulting signed position should correspond to the executed opening quantity unless another trade or liquidation also changed it.

Open full-size image


Keep margin and conditional exits under review

A completed entry continues to require sufficient margin while the position remains open. Funding and changing unrealized profit or loss can alter the account's condition. Perpetual liquidations use the mark price. The displayed liquidation estimate can move as account conditions change, including changes in other positions that share cross margin. A stop order does not remove the maintenance margin requirement.

Check whether a conditional exit covers the intended position size. Position-based take-profit and stop-loss orders can follow the entire position, while an explicitly configured size remains fixed. These take-profit and stop-loss orders trigger on the mark price. Market exits then seek execution; limit exits retain a price boundary and can remain unfilled. Exits attached to an entry have a fixed size equal to that entry order. They are placed when the entry fills completely, or when it partially fills and the remaining quantity is canceled for insufficient margin. Manually canceling a partially filled entry also cancels its attached exits. If you want conditional exits for the remaining position, place them separately and check their size and status.

Keep margin and conditional exits under review: A completed entry continues to require sufficient margin while the position remains open. Funding and changing unrealized profit or loss can alter the account's condition. Perpetual liquidations use the mark price. The displayed liquidation estimate can move as account conditions change, including changes in other positions that share cross margin. A stop order does not remove the maintenance margin requirement.

Open full-size image

Time-in-force controls the unfilled remainder

Similar limit prices can produce different outcomes because time-in-force controls how an order interacts with the book.

Resting orders

Good Til Cancel permits an unfilled order to remain on the book. Post Only requires the order to rest instead of executing immediately. An order that would immediately match does not satisfy that requirement. Neither setting establishes a deadline by which a resting order must fill. Matching prioritizes better prices, then earlier orders at the same price.

Resting orders: Good Til Cancel permits an unfilled order to remain on the book. Post Only requires the order to rest instead of executing immediately. An order that would immediately match does not satisfy that requirement.; Neither setting establishes a deadline by which a resting order must fill. Matching prioritizes better prices, then earlier orders at the same price.

Open full-size image

Immediate or cancel

Immediate or Cancel executes the quantity that can match immediately and cancels the remainder. It can therefore produce a partial position without leaving an active entry order. This differs from canceling an ordinary resting remainder later: the instruction itself prevents that remainder from waiting on the book.


Close the actual position and clear remaining orders

The exit quantity should reflect the position that exists now, including partial fills and previous reductions. A reduce-only order cannot open exposure in the opposite direction. Closing a long requires a sell; closing a short requires a buy. Reduce-only constrains position changes, but it does not guarantee a fill. A complete stopping point requires zero remaining position in the selected contract and no unwanted entry orders that could reopen exposure.

Review outstanding conditional orders as part of that stopping point, and retain the closing execution record. A partial exit leaves a smaller position with continuing margin obligations. A market exit prioritizes immediate execution within its execution constraints; a limit exit preserves the chosen price boundary while accepting that exposure may remain open. Choose between those outcomes before submitting the closing instruction.

Questions and answers about Hyperliquid

Can an accepted entry order later fail a margin check?

A resting order can fail a later margin check when matching becomes possible. HyperCore checks margin when an order opens and again when a resting order matches. Changes in account conditions can therefore prevent an accepted order from filling. An earlier acceptance does not reserve an unconditional right to execute.

Why is my chosen limit price rejected?

A limit price must comply with the market's permitted price increments. The order book accepts prices in valid tick increments and quantities in valid lot increments. Extra decimal places or an incompatible increment can invalidate an otherwise intentional price. Read the rejection reason before changing the order, because a price error differs from insufficient margin or unavailable liquidity.

What does an open interest cap rejection mean for my first entry?

An open interest cap can prevent an order from increasing exposure in the affected market. Available collateral alone does not overcome that market constraint. The rejection may concern increased open interest or a price that is too aggressive relative to the oracle price while the cap applies. Increasing the submitted size does not resolve either constraint. Confirm the rejection status before assuming that the account holds a new position.

Does closing the browser cancel an ordinary resting limit order?

Closing the browser does not itself cancel an ordinary Good Til Cancel order that already rests on the book. That order remains subject to execution or cancellation under the exchange's rules. Use an explicit cancellation when the instruction is no longer wanted, and inspect its status afterward. Chase orders, by contrast, run in the browser tab where they were created.

Which account address should I use when retrieving missing fills through the API?

Use the actual trading account address when requesting its fill history. An agent wallet can sign trading actions without being the account whose positions and fills you want to retrieve. Querying that agent address can return an empty result. When trading through a subaccount, inspect that subaccount's records rather than treating an empty main-account history as proof that nothing executed.