> ## 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.

# OpenAPI

> Use the 0xArchive OpenAPI contract for REST reference pages, public machine consumers, generated clients, and coding-agent route maps.

OpenAPI is the route and schema contract behind the generated REST reference, production client generation, tests, and coding-agent route selection.

The Mintlify REST reference is generated from the pinned `openapi.json` bundled with these docs. Public machine consumers should fetch the stable JSON contract from `https://docs.0xarchive.io/openapi.json`; the docs-host `/openapi.json` route serves that JSON directly.

## Contract Selection

| Surface                       | Use                                                                                          | Source                                                  |
| ----------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Generated REST reference      | Route discovery inside this portal, generated endpoint pages, examples, and reference checks | Pinned `openapi.json` used by reference generation      |
| Public JSON contract          | Production codegen, external machine consumers, and durable agent context                    | `https://docs.0xarchive.io/openapi.json`                |
| Reference-generation snapshot | Local previews and reference checks inside this portal                                       | Pinned `openapi.json` used by the docs build            |
| Integration smoke             | Final confirmation before shipping application code                                          | Public JSON contract plus one authenticated route probe |

## Use OpenAPI For

| Job               | Use                                                                     |
| ----------------- | ----------------------------------------------------------------------- |
| REST reference    | Generated endpoint pages, parameters, schemas, examples, and auth state |
| Generated client  | Codegen for TypeScript, Python, Go, or internal clients                 |
| Coding agent      | Route selection before the agent writes or runs integration code        |
| Regression checks | Route-family parity, examples, and docs links                           |
| Playground review | Confirm the route path and auth header before browser execution         |

## Source

```bash theme={"theme":"github-dark"}
curl https://docs.0xarchive.io/openapi.json
```

This portal keeps a pinned copy so reference generation, link checks, and local previews are deterministic. The docs-host JSON endpoint is the canonical public source for external codegen, and parity with `https://www.0xarchive.io/openapi.json` is checked when reachable. If a newly documented route family is visible in the generated reference but absent from the public JSON endpoint, confirm current account and route availability before using it in production code.

## Review Packet

Before you generate a client, ask a coding agent to write a script, or wire a route into a backend, capture the fields that make the route unambiguous.

| Field             | Why it matters                                                                                  |
| ----------------- | ----------------------------------------------------------------------------------------------- |
| Method and path   | Prevents clients from guessing between similar route families                                   |
| Venue family      | Keeps Hyperliquid core, Spot, HIP-3, HIP-4, and Lighter behavior separate                       |
| Symbol format     | Avoids treating pairs, builder-prefixed symbols, and outcome markets as interchangeable         |
| Query parameters  | Defines pagination, time windows, limits, and optional filters before loops widen               |
| Response schema   | Lets typed clients parse the route body instead of copying a nearby example                     |
| Error responses   | Connects auth, validation, rate-limit, access, and upstream failures to the right client action |
| Auth state        | Confirms whether the route needs `X-API-Key` or belongs to a wallet-auth flow                   |
| Pagination fields | Identifies `meta.next_cursor`, page size, and request-ID logging requirements                   |

If the venue family, symbol style, or data family is still undecided, choose those first in [Venue Coverage](/venue-coverage) and [Data Availability](/core-concepts/data-availability). OpenAPI should then answer the exact route shape, not replace the product decision.

## Generated Reference

<CardGroup cols={2}>
  <Card title="REST API" icon="square-terminal" href="/rest-api">
    Start with the route-family atlas and generated reference entry point.
  </Card>

  <Card title="Hyperliquid Spot" icon="circle-dot" href="/rest-api/spot">
    Spot pairs, order books, trades, L4 reconstruction surfaces, TWAP, and freshness routes.
  </Card>

  <Card title="Schemas" icon="braces" href="/schemas">
    Response envelope, pagination, error bodies, and hand-written schema notes.
  </Card>

  <Card title="Playground" icon="play" href="/playground">
    Use generated route shapes, then copy the exact curl request when you want terminal execution.
  </Card>
</CardGroup>

## Why 0xArchive Fits

0xArchive’s OpenAPI contract lets teams keep human docs, generated clients, coding-agent route selection, and reference QA pointed at the same source. That matters for market-data systems where venue family, symbol format, response envelope, and freshness checks need to stay consistent across REST, SDKs, CLI, MCP Server, and Skills.

## Next Step

Open [REST API](/rest-api) for the generated reference path, [Choose An Interface](/tooling) for execution choices, or [Coding Agents](/coding-agents) for agent-safe route-selection rules.
