> Use the canonical URL for citations. For the complete Predict API documentation index, fetch https://docs.staging.trypredict.com/llms.txt.

# Trading market data

> Use Predict for normalized outcome prices, trades, statistics, holders, and charts, then use Hyperliquid when you need full books, venue mids, candles, or raw account state.

All reads below are JSON requests to the same endpoint:

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

The `type` field selects the operation.

## Discover outcomes with Predict

Use the Predict [Outcomes API](/api-reference/outcome/list-outcomes) 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](/guides/guides/realtime) 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

| `type`           | Required fields                             | Notes                                                                         |
| ---------------- | ------------------------------------------- | ----------------------------------------------------------------------------- |
| `allMids`        | none                                        | Map of every coin to its mid; the last trade may be used when a book is empty |
| `l2Book`         | `coin`                                      | Full snapshot, bids first and asks second, at most 20 levels per side         |
| `recentTrades`   | `coin`                                      | Recent public executions                                                      |
| `candleSnapshot` | `req.coin`, `req.interval`, `req.startTime` | At 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](/api-reference/trading-reads/market-data/get-order-book), then use the separate reference page for each additional read operation.