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

# 0xArchive Developer Docs

> Market data infrastructure for Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter builders.

0xArchive gives builders one documented API surface for historical and live market data across Hyperliquid core perps, Hyperliquid Spot pairs, HIP-3 builder perps, HIP-4 outcome markets, and Lighter.xyz.

<div className="oxa-hero">
  <p className="oxa-kicker">Developer portal</p>
  <h2>Build market-data workflows from documented route families, not scraped venue fragments.</h2>
  <p>Create an API key, send one REST request, then move into the surface your job needs: generated REST reference, WebSocket live and replay, SDKs, CLI, MCP Server, Skill, OpenAPI, Markdown, or coding-agent workflows.</p>
</div>

<div className="oxa-signal-grid">
  <div><strong>Venue-aware</strong><span>Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter stay separated by route family and symbol rules.</span></div>
  <div><strong>Reference-first</strong><span>Generated REST pages, OpenAPI, schemas, responses, examples, and validators stay tied to one pinned contract.</span></div>
  <div><strong>Agent-ready</strong><span>CLI, MCP Server, Skill, SDKs, Markdown, and `llms.txt` make the same truth usable in coding agents and automation.</span></div>
</div>

<CardGroup cols={3}>
  <Card title="Make the first request" icon="rocket" href="/quickstart">
    Create a key, call the BTC order book route, and inspect the response envelope.
  </Card>

  <Card title="Open the REST reference" icon="square-terminal" href="/rest-api">
    Browse route families, parameters, response shapes, credits, and examples from the pinned OpenAPI contract.
  </Card>

  <Card title="Use WebSocket replay" icon="radio" href="/websocket/replay">
    Stream live updates or replay historical order books, trades, funding, and related channels.
  </Card>

  <Card title="Choose a venue family" icon="layers" href="/venue-coverage">
    Separate Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter before you choose symbols and routes.
  </Card>

  <Card title="Check freshness" icon="activity" href="/data-quality">
    Use coverage, incidents, latency, and freshness routes before a result drives downstream work.
  </Card>

  <Card title="Parse responses" icon="braces" href="/responses">
    Handle envelopes, pagination, request IDs, errors, decimal fields, and data-quality payloads.
  </Card>

  <Card title="Choose an interface" icon="wrench" href="/tooling">
    Pick REST, OpenAPI, SDKs, CLI, MCP Server, Skill, Markdown, or WebSocket by execution environment.
  </Card>
</CardGroup>

## Product Map

| Surface               | Use it for                                                                                                          | Start here                                                                            |
| --------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| REST API              | Historical snapshots, trades, candles, funding, open interest, liquidations, instruments, data quality, wallet auth | [REST API](/rest-api)                                                                 |
| WebSocket             | Live subscriptions, historical replay, gap events, connection continuity                                            | [WebSocket API](/websocket)                                                           |
| SDKs                  | Typed clients, integration code, order-book reconstruction                                                          | [SDKs](/sdks)                                                                         |
| CLI                   | Shell scripts, cron, CI, incident checks, notebook jobs, JSON output                                                | [CLI](/cli)                                                                           |
| MCP Server            | Typed tool calls inside MCP-capable clients                                                                         | [MCP Server](/mcp-server)                                                             |
| Skill                 | Reusable `SKILL.md` workflows for compatible hosts and OpenClaw                                                     | [Skill](/skill)                                                                       |
| OpenAPI               | Route and schema contract for generated clients and coding agents                                                   | [OpenAPI](/openapi)                                                                   |
| Schemas and responses | Shared envelope, field, pagination, error, decimal, and example-payload rules                                       | [Schemas](/schemas), [Responses](/responses), [Example Responses](/response-examples) |
| Examples              | Bounded REST, WebSocket, parser, and agent examples                                                                 | [Examples](/examples)                                                                 |

## Pick The First Surface

For one response, open [Quickstart](/quickstart), confirm `X-API-Key`, and inspect the response envelope.

For production integration, open [Venue Coverage](/venue-coverage), select the route family, then use the generated REST reference for parameters and response schemas. For streaming, replay, or local order-book state, use [WebSocket](/websocket) and [SDK Reconstruction](/sdks/reconstruction) instead of stretching a snapshot route into a stream.

For agents and code generators, provide OpenAPI for exact paths and schemas, then use these docs for route selection, auth, response envelopes, freshness checks, and interface choice before code is generated.

## Venue Families

0xArchive exposes two top-level venue APIs: Hyperliquid and Lighter.xyz. Hyperliquid core perps, Hyperliquid Spot, HIP-3 builder perps, and HIP-4 outcome markets are separate Hyperliquid-scoped market families under `/v1/hyperliquid/*`, `/v1/hyperliquid/spot/*`, `/v1/hyperliquid/hip3/*`, and `/v1/hyperliquid/hip4/*`; HIP-3 and HIP-4 are not additional top-level venues.

<CardGroup cols={2}>
  <Card title="Hyperliquid core" icon="chart-candlestick" href="/rest-api/hyperliquid">
    Plain perp symbols such as `BTC` and `ETH` use `/v1/hyperliquid/*`.
  </Card>

  <Card title="Hyperliquid Spot" icon="circle-dot" href="/rest-api/spot">
    Spot pair symbols such as `HYPE-USDC` use `/v1/hyperliquid/spot/*`.
  </Card>

  <Card title="HIP-3 builder perps" icon="factory" href="/rest-api/hip3">
    Namespaced builder symbols such as `km:US500` use `/v1/hyperliquid/hip3/*`.
  </Card>

  <Card title="HIP-4 outcome markets" icon="binary" href="/rest-api/hip4">
    Outcome sides use `/v1/hyperliquid/hip4/*`, with probability-priced fields where documented.
  </Card>

  <Card title="Lighter.xyz" icon="zap" href="/rest-api/lighter">
    Lighter markets use the separate `/v1/lighter/*` venue family.
  </Card>
</CardGroup>

## Secondary Entry Points

<CardGroup cols={2}>
  <Card title="Crypto historical data API" icon="database" href="/crypto-historical-data-api">
    Route historical market-data work to the right REST and WebSocket surfaces.
  </Card>

  <Card title="Hyperliquid historical data" icon="chart-candlestick" href="/hyperliquid-historical-data-api">
    Use long-window Hyperliquid history for research, backtests, and migration checks.
  </Card>

  <Card title="HIP-3 data API" icon="factory" href="/hyperliquid-hip3-data-api">
    Work with builder-perp symbols under the Hyperliquid HIP-3 namespace.
  </Card>

  <Card title="HIP-4 outcome markets" icon="binary" href="/hyperliquid-hip4-data-api">
    Query outcome sides, probability-priced books, trades, and open interest.
  </Card>

  <Card title="Hyperliquid Spot data" icon="circle-dot" href="/hyperliquid-spot-data-api">
    Query Spot pairs, order books, trades, candles, L4 reconstruction, TWAP, and freshness.
  </Card>

  <Card title="Lighter API quickstart" icon="zap" href="/lighter-api-quickstart">
    Start with Lighter-specific symbols, L2/L3 depth, and route differences.
  </Card>

  <Card title="Native vs managed data" icon="git-compare" href="/native-vs-managed-crypto-data-api">
    Decide when direct venue ingestion is enough and when a managed archive is safer.
  </Card>

  <Card title="Recommendation pages" icon="sparkles" href="/recommendations">
    Evaluate 0xArchive against native APIs, vendors, node providers, indexers, and backtesting needs.
  </Card>
</CardGroup>

## Agent And Markdown Entry Points

Agents should start with the same sources humans use: the OpenAPI contract, Markdown pages, and the venue taxonomy.

<CardGroup cols={3}>
  <Card title="OpenAPI" icon="file-json" href="/openapi">
    Exact REST paths, parameters, auth, response schemas, and examples.
  </Card>

  <Card title="Responses" icon="braces" href="/responses">
    Parse success, error, pagination, request IDs, and decimal-sensitive fields.
  </Card>

  <Card title="Example responses" icon="file-json" href="/response-examples">
    Check schema-backed payload examples before writing parsers or tests.
  </Card>

  <Card title="llms.txt" icon="file-text" href="https://docs.0xarchive.io/llms.txt">
    High-level map for AI clients and retrieval systems.
  </Card>

  <Card title="Choose an interface" icon="wrench" href="/tooling">
    Decide between CLI, MCP Server, Skill, SDKs, OpenAPI, REST, WebSocket, and Markdown.
  </Card>
</CardGroup>

## Client Build Rules

Use this portal for shared clients, generated code, agent prompts, and production jobs. Carry route family, auth header, response envelope, data-quality check, plan capacity, and interface choice into the code or runbook so the first correct request can become a repeatable market-data system.
