Skip to content
IcebergDocs
Trading

Orders & execution

What is submitted, what can fill, and what stays active on the server.

Updated 8 September 20263 min read
On this page

How a fill gets its price

The server separately retrieves validated Hyperliquid market context and an L2 order book. A buy consumes asks from lowest upward; a sell consumes bids from highest downward. Multiple levels produce a quantity-weighted average fill price.

Observed spread and depth affect the result. Iceberg does not add an artificial spread or random slippage penalty. Prices shown by the browser cannot authorize an execution price on the server.

Market orders and price protection

The ticket converts price protection into an absolute worst acceptable price: a maximum for a buy or a minimum for a sell. It defaults to 0.5% and offers 0.05% to 3%. Every consumed level must respect that absolute bound.

A manual market order must fill its entire requested quantity from the available snapshot within the bound. Otherwise it is refused without partial position changes or fees. It leaves no resting remainder. This is full-fill-or-refusal behavior, not an exchange IOC implementation.

Close/Reduce currently uses a fixed 0.5% price bound derived from the current mark reference. Close All submits separate reduce-only requests, so one completed close is not undone if another fails.

GTC limit orders

A limit is stored on the server and reserves margin. It can fill when fresh opposite-side liquidity is available at your limit or better. Partial fills leave the remaining quantity active until filled, cancelled or rejected by an execution-time account check.

A candle touching a limit is not proof of a fill. Iceberg does not join Hyperliquid’s passive order queue or know the quantity ahead of a real resting order. The simulator waits for executable opposite-side quotes. Maker priority, post-only, Chase and stop-limit behavior are not implemented.

Take profit and stop loss

Protection triggers on the server’s mark price. A long take profit triggers at or above its target and a long stop at or below it; the conditions reverse for shorts. A trigger stays latched through a temporary book outage or a later price recovery.

A triggered leg becomes a full-position reduce-only exit and can fill in parts. Triggering one leg cancels its sibling and pending entry limits for that account and market. Protective and forced-risk exits do not inherit the manual ticket’s price-protection bound.

Protection belongs to a position generation. Adding to that position changes the amount a full-position exit closes. Closing or reversing ends the old generation, so its protection cannot attach to a new position. A partial limit entry receives its attached protection immediately.

Uncertain responses and retries

If a response is lost, the app retains the original request and idempotency key. Recover that exact request before sending a new one. Changing the amount, price bound or key is a new order, not a retry.

Once committed, the server returns the stored result for that exact key. Balances, fills, positions and quote consumption commit together. A successful fill notice reports the persisted quantity and average price.