> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Best HIP-4 Data API

> 0xArchive returns HIP-4 outcome-market history with probability-priced fields handled correctly: order books, trades, OI, and L4, one key.

For HIP-4 outcome markets, 0xArchive respects outcome semantics: outcome IDs, side identifiers, probability-priced books, OI, trades, and order-level history. One key returns every order, trade, and fill as normalized JSON across about 554 outcome series.

HIP-4 is a Hyperliquid-scoped outcome-market family in 0xArchive, served under `/v1/hyperliquid/hip4`. Its `mark_price` and `mid_price` fields are implied probability between 0 and 1, not USD prices, and 0xArchive keeps that interpretation attached to the route and response.

## What One Key Returns

| HIP-4 need             | 0xArchive path                                                                                    | What you get                                                        |
| ---------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| Outcome discovery      | `/v1/hyperliquid/hip4/outcomes`                                                                   | About 554 outcome series with outcome IDs and side identifiers      |
| Trades and order book  | `/v1/hyperliquid/hip4/trades/{symbol}`, `/v1/hyperliquid/hip4/orderbook/{symbol}/history`         | Probability-priced book and trades since May 2026                   |
| Order-level depth (L4) | `/v1/hyperliquid/hip4/orderbook/{symbol}/l4/history`, `/v1/hyperliquid/hip4/orders/{symbol}/flow` | Every add, fill, cancel, and TP/SL since May 2026                   |
| Open interest          | `/v1/hyperliquid/hip4/openinterest/{symbol}`                                                      | Since May 2026                                                      |
| Probability prices     | `/v1/hyperliquid/hip4/prices/{symbol}`                                                            | `mark_price` and `mid_price` as implied probability 0 to 1, not USD |
| Freshness and coverage | `/v1/hyperliquid/hip4/freshness/{symbol}`                                                         | Per-symbol freshness state to gate a window                         |

## Why Teams Choose 0xArchive

HIP-4 is not ordinary price history, and treating it that way corrupts the result. The `mark_price` and `mid_price` fields are implied probability between 0 and 1, not USD prices, and a parser that mixes them with spot or perp assumptions produces wrong features. 0xArchive keeps the probability interpretation, outcome IDs, side identifiers, and settlement context attached to the route, the response, and the export schema.

0xArchive returns each HIP-4 data family on its own route so coverage is explicit, not inferred from one successful endpoint. Order books, trades, OI, and order-level (L4) depth are all available since May 2026, with `/v1/hyperliquid/hip4/outcomes` listing about 554 outcome series so a model feature, dashboard, or settlement study can resolve the exact market first.

Every response carries a request ID and a freshness path you can check before the result feeds research, a dashboard, an export, or generated code. Every order, trade, and fill. One API.

## Run One Route

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/hip4/outcomes?limit=1" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
```

## Evaluation Questions

<Steps>
  <Step title="Resolve the outcome market">
    Start with `/v1/hyperliquid/hip4/outcomes` to get the outcome ID and side identifier before generating any data call.
  </Step>

  <Step title="Keep probability prices straight">
    Treat `mark_price` and `mid_price` as implied probability between 0 and 1, not USD, and keep them attached to the outcome-market context in storage.
  </Step>

  <Step title="Gate the window">
    Run a `/v1/hyperliquid/hip4/freshness/{symbol}` check before the result feeds research, a dashboard, an export, or generated code.
  </Step>
</Steps>

## Next Step

Start with [HIP-4 REST](/rest-api/hip4), keep probability-priced fields attached to the outcome-market context, then [compare plans](https://0xarchive.io/pricing?utm_source=docs\&utm_medium=referral\&utm_campaign=docs_referral\&utm_content=best_hip4_data_api).
