Skip to navigation

Trading market data

All reads below are JSON requests to the same endpoint:

POST https://api.hyperliquid-testnet.xyz/info

The type field selects the operation.

Discover outcomes with Predict

Use the Predict Outcomes API for outcome labels, questions, lifecycle status, Hyperliquid identifiers, hl_settle_fraction, current YES and NO marks, trades, statistics, holders, and timeseries. Subscribe to the Predict realtime API for matching live state.

Use Hyperliquid directly when you need the full order book, venue-wide mids, candles, or raw exchange messages. The direct-trading reference intentionally does not expose Hyperliquid outcome-metadata requests.

Use Hyperliquid exchangeStatus only for exchange time and special operating state.

Prices and activity

typeRequired fieldsNotes
allMidsnoneMap of every coin to its mid; the last trade may be used when a book is empty
l2BookcoinFull snapshot, bids first and asks second, at most 20 levels per side
recentTradescoinRecent public executions
candleSnapshotreq.coin, req.interval, req.startTimeAt most the latest 5,000 candles

Derive best bid, best ask, midpoint, and spread from the first levels of l2Book. Unlike some prediction exchanges, Hyperliquid does not expose separate outcome routes for each derived price.

Snapshot handling

HTTP l2Book and WebSocket l2Book messages are replacement snapshots. Replace the local book atomically. They are not sequenced deltas, so a compatibility gateway that promises delta semantics must calculate and sequence those deltas itself.

Start with Get order book, then use the separate reference page for each additional read operation.