Hyperliquid Wiki Protocol & Ecosystem Knowledge Base
🔍

Order Types, Algorithmic TWAP & Smart Execution

Hyperliquid's high-speed Layer-1 supports a native suite of professional order types and on-chain algorithmic slicing tools, giving algorithmic institutions and retail traders institutional-grade execution capabilities without centralized intermediaries.

1. Supported Order Execution Types

Unlike basic decentralized swaps, Hyperliquid provides a full suite of algorithmic order types executed directly in the HyperCore matching engine (official orders documentation):

Order Type Execution Behavior Time-in-Force (TIF) Use Case
Limit (GTC) Places resting liquidity on the order book at a specified price. Remains active until filled or canceled. Good 'Til Canceled Passive liquidity provision, earning maker rebates.
Immediate-or-Cancel (IOC) Fills whatever quantity is immediately available at the limit price; cancels any remaining unfilled amount. IOC Aggressive market taking without leaving resting orders.
Post-Only (ALO) Guarantees the order will only enter the order book as maker. If it would cross the spread, it is immediately canceled. Post-Only High-frequency market makers avoiding accidental taker fees.
Reduce-Only Only allows the order to decrease or close an existing open position; will never increase exposure. GTC / IOC Risk management, stop losses, and take-profit targets.
Stop-Market / Stop-Limit Dormant until the Mark or Index price hits the designated trigger price, then fires into the book. Conditional Automated downside protection and breakout entries.

2. On-Chain Time-Weighted Average Price (TWAP) Engine

Large orders in illiquid pairs risk moving the market (price impact and slippage). Hyperliquid's native TWAP Engine slices large orders into deterministic micro-chunks executed over an adjustable duration (from 5 minutes up to 24 hours):

📈 TWAP Algorithmic Order Slicing Mechanics
[Total Order: 100 BTC, Duration: 60 min]
                   │
                   ▼ (Split into 60 uniform 1-minute intervals)
┌────────────────────────────────────────────────────────┐
│ Minute 1:  1.66 BTC ➔ Sub-second CLOB Match            │
│ Minute 2:  1.66 BTC ➔ Sub-second CLOB Match            │
│ ...                                                    │
│ Minute 60: 1.66 BTC ➔ Execution Complete               │
└────────────────────────────────────────────────────────┘
                   │
                   ▼ Result: Minimized Slippage & Market Footprint
💡
Zero Custody Risk: Unlike centralized exchange TWAPs that require depositing funds into a third-party bot wallet, Hyperliquid's TWAP orders are cryptographically authorized via EIP-712 and executed natively by consensus validators (test in live trading app).

3. Scale In / Scale Out Matrix

Traders can set up automated stepped ladder orders (Scale In/Out) to build positions during pullbacks or distribute profits into rallies. The protocol accepts parameter arrays defining start price, end price, total size, and number of orders, distributing the volume linearly or exponentially across the order book.

🔗 Official External References & Primary Sources

To verify facts, technical formulas, and architectural parameters presented in this chapter, consult the following primary sources: