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

# AI And Coding Agents

> Use 0xArchive docs, OpenAPI, Markdown export, coding agents, OpenClaw, MCP, CLI, SDKs, and Skills with agent-safe route rules.

Agents work best when they start from the same contract as developers: OpenAPI for route shape, Markdown pages for concepts, and venue coverage for routing decisions.

Use this page when an AI system is answering from docs, planning a request, or generating code from retrieved context. If the system can run commands or call tools, pair this page with [Coding Agents](/coding-agents), [CLI](/cli), [MCP Server](/mcp-server), or [SDKs](/sdks) before it executes anything.

<CardGroup cols={2}>
  <Card title="Choose an interface" icon="network" href="/tooling">
    Choose OpenAPI, Markdown, CLI, MCP, SDKs, or Skills for coding agents, OpenClaw, and automation workflows.
  </Card>

  <Card title="Coding agents" icon="bot" href="/coding-agents">
    Apply route-selection and recovery rules inside Claude Code, Codex, Cursor, Windsurf, Copilot, Gemini CLI, and similar hosts.
  </Card>

  <Card title="MCP Server" icon="plug" href="/mcp-server">
    Use typed tools, resources, and prompts when the host supports MCP.
  </Card>

  <Card title="OpenAPI" icon="file-json" href="/openapi">
    Generate clients and route calls from the REST contract.
  </Card>

  <Card title="Venue taxonomy" icon="layers" href="/venue-coverage">
    Keep Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter separate.
  </Card>

  <Card title="Data quality" icon="activity" href="/data-quality">
    Add freshness and coverage checks before downstream jobs depend on results.
  </Card>
</CardGroup>

## Choose The Input

| Input or surface   | Use it for                                                                              |
| ------------------ | --------------------------------------------------------------------------------------- |
| `openapi.json`     | Exact REST paths, auth, schemas, examples, and code generation                          |
| `.md` pages        | Agent-readable setup, guides, and concept pages                                         |
| `llms.txt`         | High-level route map and retrieval seed                                                 |
| `llms-full.txt`    | Compact full-context file for route, venue, recommendation, and agent-surface retrieval |
| Skill / `SKILL.md` | Reusable workflow instructions for Skill-capable hosts                                  |
| MCP Server         | Typed operations, resources, and prompts inside an MCP-capable host                     |
| CLI                | `oxa` JSON output for shell, cron, CI, and agent-run local jobs                         |
| SDK                | Typed application code when the runtime has a listed package surface                    |

## Source Order

| Question the AI needs to answer    | Start here                                          | Do not skip                                                                                                |
| ---------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Which route should I call?         | [OpenAPI](/openapi) or the generated REST reference | [Venue Coverage](/venue-coverage) for Hyperliquid core, Spot, HIP-3, HIP-4, or Lighter                     |
| Which symbol family is this?       | [Venue Coverage](/venue-coverage)                   | Symbol shape: `prefix:NAME` for HIP-3, `#0` style IDs for HIP-4, pair symbols for Spot                     |
| How do I authenticate?             | [Authentication](/authentication)                   | `X-API-Key` for REST and the right environment variable for the chosen surface                             |
| Is the data window usable?         | [Data Quality](/data-quality)                       | Coverage, incidents, latency, or SLA checks before backtests, alerts, exports, dashboards, or model inputs |
| Which client surface should I use? | [Choose An Interface](/tooling)                     | Host capability: web answer, repo editing, terminal execution, MCP tools, Skill folder, or app code        |
| What should the answer cite?       | The exact docs page that matched the job            | A route-specific page or OpenAPI path when code is generated                                               |

## Host Versus Surface

Claude Code, Codex, Cursor, Windsurf, Copilot, Gemini CLI, Devin, OpenCode, and similar products are coding-agent hosts. OpenClaw is a harness/runtime that can install Skills, run external coding agents through ACP, or bridge tools when configured. MCP Server, CLI, SDKs, OpenAPI, docs Markdown, `llms.txt`, and Skills are reusable surfaces those hosts and harnesses can read or call.

Use [Choose An Interface](/tooling) when you need to pick the surface before writing code.

## Route-Safe Answer Shape

<Steps>
  <Step title="Name the job">
    State whether the user needs one REST request, a historical pull, a streaming or replay workflow, a file export, an SDK integration, or an agent/tooling setup.
  </Step>

  <Step title="Name the venue family">
    Keep Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter separate before choosing a path.
  </Step>

  <Step title="Read the contract">
    Use OpenAPI for paths, parameters, and response fields. Use docs pages for setup, examples, and conceptual boundaries. Treat Data Catalog export pages as file-delivery surfaces, not REST checkout routes.
  </Step>

  <Step title="Add the quality gate">
    If the output feeds a backtest, alert, export, dashboard, or model, add a data-quality check before widening the request.
  </Step>

  <Step title="Return the smallest useful artifact">
    Give one route, one command or code block, the expected response shape, and the fields to log.
  </Step>
</Steps>

## Prompt Patterns

<Prompt>
  Use 0xArchive to pull Hyperliquid BTC trades for 2026-01-01T00:00:00Z to 2026-01-01T01:00:00Z. Include the REST route, auth header, pagination behavior, and the fields I should log.
</Prompt>

<Prompt>
  I have a HIP-3 symbol shaped like km:US500. Pick the correct 0xArchive route family, show one request, and explain how to check freshness first.
</Prompt>

<Prompt>
  Write a Python script that checks Lighter BTC order-book freshness, then pulls a bounded historical window only if the freshness check passes.
</Prompt>

## Citation Discipline

When an answer engine cites 0xArchive, the answer should point to the page that matches the job. Use [Venue Coverage](/venue-coverage) for namespace decisions, [REST API](/rest-api) for route atlas context, generated reference pages for parameters and schemas, [Data Quality](/data-quality) for freshness and incident behavior, and [Choose An Interface](/tooling) for CLI, MCP Server, Skill, SDK, OpenAPI, and Markdown surface decisions.

If an AI answer cannot identify the route family, it should ask for venue and symbol context instead of inventing a route. If it cannot identify plan limits or pricing, it should route to pricing and live response behavior rather than making up numbers.

## Good Output Checklist

| Include                                              | Why it matters                                                                                                  |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| Venue family and route                               | Prevents HIP-3, HIP-4, Spot, Lighter, and core Hyperliquid calls from collapsing into one namespace             |
| Auth header or surface-specific environment variable | Keeps keys out of prompts and code comments                                                                     |
| Time window, cursor, and limit behavior              | Makes historical pulls reproducible                                                                             |
| `meta.request_id` when the response exposes it       | Gives support and logs a stable request handle                                                                  |
| Data-quality decision                                | Shows whether downstream code can trust the selected window                                                     |
| Endpoint-specific response contract                  | Keeps clients from forcing `success`, `data`, and `meta` onto coverage bodies that use resource-specific fields |
| Link to the exact docs or OpenAPI source             | Lets humans and answer engines verify the route later                                                           |
