Hyperliquid: Trade Execution, Orders, and Account Balances
Hyperliquid combines onchain order books for spot and perpetual trading with a blockchain for smart contracts. Spot fills exchange token balances, while perpetual fills change derivatives positions backed by collateral. An accepted order can remain unfilled, execute partly, or finish across several trades. Understanding the outcome means connecting the order’s status with its execution records and the resulting balances or positions. The distinction matters when canceling orders, closing exposure, or deciding whether funds remain available.
To check whether an accepted order achieved the intended purchase or sale, compare its recorded fills and resulting balances or positions with the requested quantity and execution conditions.
Spot ownership and perpetual exposure
Spot trading changes the tokens an account holds; perpetual trading changes a contract position whose value follows an underlying market. Buying spot increases the acquired token balance and spends the quoted asset, subject to fees. A perpetual can create long or short exposure without delivering the underlying token. Perpetual contracts don’t expire, and funding payments help keep their prices connected to the underlying market.
The account’s balance arrangement also matters. Standard mode separates spot, perpetual, and individual derivatives exchange balances. Unified accounts combine balances by asset, with cross positions sharing the applicable collateral asset. Portfolio margin brings eligible assets into a shared portfolio, subject to account eligibility requirements and supply and borrowing caps. It can automatically borrow against eligible collateral when the spending balance is insufficient, with interest accruing on the debt. When borrowing caps are reached, additional margin must come from the settlement asset. Consequently, a visible token holding doesn’t establish how much collateral a particular order can use. The account mode and the selected market’s collateral requirements determine that relationship.
Execution price and unfinished quantity
A limit order sets an execution price boundary, while a market order seeks immediate execution against available liquidity. A buy limit permits its stated price or lower; a sell limit permits its price or higher. Neither boundary guarantees enough matching quantity. Market execution can consume liquidity at several prices, so the displayed price and average fill price may differ.
Time-in-force instructions determine what happens to unmatched quantity. Good-til-canceled orders can leave a remainder resting on the book. Immediate-or-cancel orders cancel any remainder after their immediate matching attempt. Post-only orders cancel if they would match immediately, preserving their intended role as resting liquidity. A limit order without that restriction can execute immediately when its price crosses available opposing orders.
A resting remainder remains available for future matching until it fills or cancellation takes effect. Submitting a cancellation doesn’t reverse an existing fill. Once execution changes a balance or position, another trade is needed to change that exposure again.
Price-time matching on HyperCore
HyperCore matches eligible orders by price first, then by their priority at the same price. Valid prices and sizes must also follow the market’s tick and lot increments. For perpetuals, the system checks margin when an order opens and checks the resting side again during matching. An order accepted earlier can therefore lose eligibility when its available margin changes.
When is an order actually complete?
An order completes its intended purchase or sale when the recorded fills satisfy the requested quantity and execution conditions. An open status establishes successful placement. A triggered status establishes activation of a conditional order. Neither status alone establishes a finished trade. Historical status, individual fills, and the resulting position or balance answer different parts of the question.
A missing open order doesn’t establish that it filled.
Filled and canceled orders leave the open-order view; orders rejected at placement never become open orders. A cancellation may also follow partial execution. The fill record identifies the executed quantity, price, fee, and associated order. Those details explain how much actually traded even when the final status simply says canceled. For a perpetual, position direction also matters: an opposite-side fill may reduce existing exposure rather than establish a new position.
Interfaces and automated clients use the same underlying trading system, but their delivery acknowledgments don’t replace execution records. API responses distinguish resting orders, immediate fills, and errors. A successful request can contain an order-specific error, so the response for the individual action matters.
Account reconciliation then connects those executions to the account’s actual holdings or margin. Entry price and displayed profit figures are useful summaries; the underlying accounting follows trades and balances. Transfers and other account activity also need to be separated from the order under review.
A partial spot purchase with a canceled remainder
Completing the full requested quantity is stricter than obtaining an acceptable price on a partial fill. Consider a hypothetical spot purchase with no existing holding of the acquired token. Assume sufficient spending balance, a valid order size of 12.4 token units, and a chosen buy limit represented by L. These inputs illustrate the calculation; they aren’t market settings or suggested trade sizes.
The purchase requires all 12.4 units to execute at L or below. A good-til-canceled limit order matches 7.4 units within that boundary and leaves 5 units resting: 12.4 minus 7.4 equals 5. Assume the remaining quantity is then successfully canceled before any further fill.
The order has finished processing, but the intended purchase remains incomplete. Its fills establish a gross acquisition of 7.4 units. Any fee charged in the acquired token reduces the net balance increase; fees charged elsewhere affect that other balance. The spending balance reflects executed consideration and applicable fees, rather than the value of the original full request.
All 7.4 purchased units executed at L or below, but 5 of the requested units remained unbought. A canceled status alone couldn’t establish either conclusion. If another fill occurred before cancellation took effect, the recorded quantity would change and the account reconciliation would need to include it.
Fees, funding, and collateral after a fill
A perpetual fill changes exposure immediately, while fees and subsequent funding affect the account’s economics on different schedules. Trading fees depend on factors including the product, maker or taker execution, the account’s fee tier, and applicable discounts. Certain markets also have deployer-specific fee settings. A limit order isn’t automatically a maker trade: its actual interaction with resting liquidity determines that classification.
Cross margin shares collateral across the positions covered by the account’s configuration. Isolated margin allocates collateral to an individual position. That separation changes which funds absorb losses and which balances support another order. Available collateral can therefore differ from the displayed total account value, and removing funds must leave the applicable margin requirements satisfied.
Perpetual liquidations use the mark price. This reference price can differ from the latest execution price. Equity falling below maintenance requirements can trigger liquidation even though the original entry order completed correctly. Funding rates and payments can also change the collateral supporting an open position. A completed entry therefore establishes the position; it doesn’t settle the eventual profit, loss, or exit price.
HyperCore trading and HyperEVM applications
HyperCore runs the native trading books, while HyperEVM supports general-purpose smart contracts on the same blockchain. HYPE is the native gas token on HyperEVM. Smart-contract transactions have their own execution records and gas costs. A successful application transaction doesn’t, by itself, establish a particular order-book fill. Where an application interacts with trading, its resulting account activity still needs to match the intended operation.
Closing exposure versus canceling an order
Canceling an outstanding order removes its unfilled instruction; closing a perpetual position requires an execution that reduces existing exposure. Reduce-only instructions constrain an order to reducing a position rather than opening exposure in the opposite direction. Partial execution can still leave a position open, so the remaining position size determines whether the exit finished.
Trigger orders add another distinction. Take-profit and stop-loss orders activate using the mark price, and a triggered limit order may remain unfilled when executable prices lie outside its limit. Triggered market exits execute against available liquidity within their slippage limits; they don’t guarantee execution at the trigger price. Choosing between them means weighing a strict execution-price boundary against the chance of leaving exposure open.
Quick answers about Hyperliquid
Why does my API wallet show no trading balance?
An API wallet signs actions for an account, so querying the signer address can return an empty balance. Account queries need the actual master-account or subaccount address whose funds and positions you want to inspect. The signing address and the trading account serve different purposes, even when the same software manages both.
Does canceling a partially filled entry keep its attached stop loss?
Manually canceling a partially filled parent order also cancels its attached take-profit and stop-loss children. To attach a stop loss to the resulting position, place a separate position-associated stop order. Cancellation caused by insufficient margin has different behavior: after a partial fill, the system places the children as though the parent had fully filled.
Can a TWAP finish running without filling its full quantity?
A time-weighted average price order can reach the end of its running period with part of its quantity unfilled. Its smaller orders face liquidity and slippage constraints. Later orders can attempt to catch up within their limits, but elapsed running time doesn’t establish that the entire requested quantity executed.
Are Hyperliquid trading records private?
HyperCore orders, cancellations, trades, and liquidations occur onchain, so their records are publicly observable. A wallet address doesn’t automatically reveal its owner’s identity, but linking that address to a person can connect the person with visible trading activity. Using a different interface doesn’t make the underlying execution records private.
Which restrictions can reject an order despite a sufficient balance?
A sufficient balance doesn’t override price increments, minimum order value, liquidity requirements, or position restrictions. Post-only orders can fail because they would immediately match; reduce-only orders can fail because they would increase exposure. Perpetual orders can also encounter open-interest or margin-tier limits. The returned rejection reason identifies which condition prevented acceptance.