Hyperliquid IOC and FOK orders guide for perpetual DEX traders

Why Time-in-Force Matters on Hyperliquid

On a fast perpetual order book, a plain limit order can rest for minutes, get partially filled, or sit as stale liquidity while price runs away. Time-in-force (TIF) flags tell the matching engine what to do with the unfilled remainder. Two of the most useful flags for active traders are IOC (Immediate or Cancel) and FOK (Fill or Kill).

Hyperliquid’s deep book and low latency make these flags practical for scalpers, arb bots, and anyone who wants aggressive entry without leaving accidental resting size. If you are new to the platform, join with referral code HOLYGRAIL and practice TIF behavior on small size first.

IOC: Immediate or Cancel

IOC means: take whatever liquidity is available right now at your limit (or better), then cancel any unfilled quantity immediately. You may get a partial fill. You will not leave a resting order that can fill later at a worse moment.

Best uses for IOC

  • Aggressive clip entries — you want size now up to a max price, but refuse leftover rest.
  • Scale-in bursts — fire multiple small IOC limits as the book refreshes.
  • Reduce-only exits with urgency — flatten what you can at your price cap without leaving a hanging close order.
  • Bot logic — avoid open-order state machines when your strategy only cares about instant liquidity.

Pair IOC with a realistic limit. An IOC market-style cross will fill like a taker; an IOC limit far from the mid may fill nothing and cancel cleanly — that is still useful information about book depth.

FOK: Fill or Kill

FOK is stricter: the entire order size must fill immediately at your limit or better, or the whole order is canceled. No partials. No resting remainder.

Best uses for FOK

  • All-or-nothing size — your thesis only works at a minimum clip (for example, a hedge that must fully offset another leg).
  • Atomic arb legs — partial fill on one venue breaks the hedge; FOK rejects incomplete execution.
  • Large discretionary tickets — you would rather miss than hold a half-filled awkward size into news.

FOK fails more often in thin books. On major Hyperliquid pairs during liquid hours it can work well; on long-tail alts, IOC is usually more practical.

IOC vs FOK vs Post-Only vs GTC

  • GTC (Good Til Cancel) — rests until filled or canceled; default for patient maker entries.
  • Post-only — rejects if it would take; protects maker fee intent (see also post-only maker strategy).
  • IOC — takes now, allows partial, never rests.
  • FOK — takes now, requires full size, never rests.

Professionals stack flags by intent. Maker ladder: post-only GTC. Aggressive probe: IOC. Hedge must-complete: FOK. Emergency flatten: market or aggressive IOC with reduce-only on.

Scalping Workflow With IOC on Hyperliquid

1) Define max adverse price (your limit). 2) Size for the liquidity you actually see in the top of book — not your ego size. 3) Send IOC. 4) If partial, decide instantly: second IOC, wait, or abort. 5) Place reduce-only protective exits only on filled size. 6) Journal fill ratio; if you constantly get 20% fills, your size or limit is wrong for that pair’s depth.

This workflow beats “market everything” because you keep a price ceiling, and it beats resting limits when you cannot babysit the book. For fee context, review Hyperliquid taker vs maker fees — IOC and FOK are usually taker when they cross the spread.

Common Mistakes

  • FOK with oversized clips — constant zero fills; you miss moves and overtrade retries.
  • IOC without reduce-only on exits — partial close plus later confusion about residual risk.
  • Using FOK in illiquid alts — strategy dies from rejects, not from edge decay.
  • Ignoring mark vs last — execution price can differ from the mark used for liquidation math; know both (pair with order-type basics in Hyperliquid order types).
  • Bot spam — firing FOK every 50ms can burn rate limits and fees without improving average price.

Practical Checklist Before You Click

  • Is partial fill acceptable? → IOC. Must be full size? → FOK.
  • Do I want to rest as maker? → post-only / GTC, not IOC/FOK.
  • Is this a close? → enable reduce-only.
  • Is the pair liquid enough for my clip at this second?
  • What is my abort rule if fill ratio is under 50%?

Mastering TIF is less glamorous than leverage, but it is how you stop accidental resting risk and incomplete hedges. Combine it with solid position sizing from our position sizing strategy guide.

Practice IOC and FOK on Hyperliquid

Open an account with code HOLYGRAIL, start with small IOC clips on major pairs, then graduate to FOK only when full-size certainty matters.

Join Hyperliquid with HOLYGRAIL

Related Reading