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

# Choose An Interface

> Choose REST, OpenAPI, SDKs, CLI, MCP Server, Skill, Markdown, or WebSocket for your 0xArchive workflow.

Interface choice should happen before code: the same market-data job can belong in REST, WebSocket, SDKs, CLI, MCP, Skill, OpenAPI, or a browser Data Catalog flow.

0xArchive exposes one market-data product through several interfaces. REST and WebSocket are the product APIs. OpenAPI is the route and schema contract. SDKs, CLI, MCP Server, Skill, Markdown pages, and `llms.txt` make that contract usable in apps, shells, generated clients, and coding agents.

<div className="oxa-hero">
  <p className="oxa-kicker">Developer interface map</p>
  <h2>Pick the interface by execution environment, not by brand name.</h2>
  <p>Claude Code, Codex, Cursor, Windsurf, Copilot, Gemini CLI, Devin, OpenCode, and similar products are coding-agent hosts. OpenClaw is a harness/runtime. MCP Server, CLI, SDKs, Skills, OpenAPI, WebSocket, Markdown, and REST are the surfaces those environments consume.</p>
</div>

## Interface Matrix

| Job                                              | Best interface                                          | Why                                                                                      |
| ------------------------------------------------ | ------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| First API integration                            | [REST API](/rest-api) + [OpenAPI](/openapi)             | Direct HTTP calls with generated route, parameter, and response shape                    |
| Generated client                                 | [OpenAPI](/openapi)                                     | Strongest route/schema source for codegen and review                                     |
| Application code                                 | [SDKs](/sdks)                                           | Typed client usage inside your app runtime                                               |
| Shell, CI, cron, notebook, coding-agent terminal | [CLI](/cli)                                             | `oxa` commands with JSON output and environment-managed keys                             |
| MCP-capable host                                 | [MCP Server](/mcp-server)                               | Typed tools, resources, and prompts through an MCP client                                |
| Skill-capable host or OpenClaw workflow          | [Skill](/skill)                                         | Reusable `SKILL.md` procedures plus lightweight shell-backed request patterns            |
| Web LLM or answer engine                         | Docs Markdown, `llms.txt`, OpenAPI excerpts             | Citation-friendly route selection without local execution                                |
| Live streaming or historical replay              | [WebSocket](/websocket)                                 | Channels, gap handling, and replay workflows                                             |
| Historical file purchase                         | [Data Catalog](/data-catalog)                           | Browser export flow for Parquet files, quotes, credits, checkout, and dashboard delivery |
| OpenClaw harness                                 | [Skill](/skill), then ACP or MCP Server when configured | Use OpenClaw as the runtime, not as a synonym for the tool surface                       |

## Selection Rules

| If the job is...                                          | Use...                                                      | Keep visible                                                                       |
| --------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| One authenticated HTTP call                               | REST API and OpenAPI                                        | `X-API-Key`, route family, response envelope, and `meta.request_id`                |
| A generated client or route review                        | OpenAPI                                                     | Exact path, parameters, schemas, and examples from the spec                        |
| App code in a supported runtime                           | SDKs                                                        | Runtime, package surface, auth handling, and reconstruction behavior               |
| Shell, cron, CI, notebook, or terminal-capable agent work | CLI                                                         | `OXA_API_KEY`, JSON output, exit behavior, and request IDs                         |
| Tool calls inside an MCP-capable host                     | MCP Server                                                  | Local stdio setup and `OXARCHIVE_API_KEY` in host configuration                    |
| Reusable instructions in a skill-capable host             | Skill                                                       | `SKILL.md`, shell prerequisites, bounded requests, and route rules                 |
| A browser file order                                      | Data Catalog                                                | Market, schema, UTC range, quote, credits, checkout, delivery, and rights boundary |
| A no-execution answer engine                              | Markdown, `llms.txt`, `llms-full.txt`, and OpenAPI excerpts | Citation target and the exact route source                                         |

## Product Surfaces

<CardGroup cols={3}>
  <Card title="REST API" icon="square-terminal" href="/rest-api">
    Historical market data, snapshots, trades, candles, instruments, auth, and data-quality routes.
  </Card>

  <Card title="Interface Surface Map" icon="bot" href="/agent-surfaces">
    Exact map of OpenAPI, Markdown, llms.txt, CLI, MCP, Skill, SDK, REST, and WebSocket surfaces.
  </Card>

  <Card title="Agentic Gateway" icon="route" href="/agentic-gateway">
    Boundary page for agentic access, payment-adjacent workflows, and market-data execution surfaces.
  </Card>

  <Card title="Facilitator" icon="credit-card" href="/facilitator">
    x402 facilitator boundary and how it differs from market-data API routes.
  </Card>

  <Card title="OpenAPI" icon="file-json" href="/openapi">
    Route and schema truth for humans, code generators, tests, and coding agents.
  </Card>

  <Card title="SDKs" icon="package" href="/sdks">
    Typed application integrations and order-book reconstruction helpers.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli">
    Shell-native `oxa` commands for JSON output, scripts, CI, notebooks, and agent terminals.
  </Card>

  <Card title="MCP Server" icon="plug" href="/mcp-server">
    Local stdio MCP tools for clients that support MCP configuration.
  </Card>

  <Card title="Skill" icon="sparkles" href="/skill">
    Reusable `SKILL.md` workflows for OpenClaw, Claude Code, Codex, and compatible skill folders.
  </Card>
</CardGroup>

## Host, Harness, Surface

| Layer                | 0xArchive framing                                                   | Examples                                                                   |
| -------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| Coding-agent host    | An agent that reads context, edits or runs code, and may call tools | Claude Code, Codex, Cursor, Windsurf, Copilot, Gemini CLI, Devin, OpenCode |
| Harness/runtime      | A system that can run, bind, route, or supervise agent sessions     | OpenClaw, OpenClaw ACP                                                     |
| Tool/context surface | A reusable way to give agents context or execution                  | MCP Server, CLI, SDK, OpenAPI, Markdown docs, `llms.txt`, Skill            |
| Protocol             | Interoperability layer for tool/context exchange                    | MCP, ACP where your harness uses it                                        |
| Product API          | 0xArchive market-data surface                                       | REST, WebSocket, data-quality routes                                       |

## Setup Routing

<Tabs>
  <Tab title="Coding agent">
    Start with OpenAPI and docs Markdown so the agent can choose the right route family. Add CLI when the agent has terminal access, SDKs when it is editing application code, MCP Server when the host supports MCP, and Skill when the host supports `SKILL.md` workflows.
  </Tab>

  <Tab title="OpenClaw">
    Use the 0xArchive Skill for the simplest OpenClaw market-data workflow. Use ACP when your OpenClaw setup runs external coding-agent sessions. Add MCP only when your OpenClaw or agent host is explicitly configured for MCP.
  </Tab>

  <Tab title="Automation">
    Use CLI JSON, REST, or SDKs with keys stored in environment variables or secret stores. Keep OpenAPI in the loop for route review before widening a job.
  </Tab>

  <Tab title="Web LLM">
    Give the model the specific `.md` docs page, the relevant OpenAPI excerpt, and the venue family. Ask it to name the route before generating code.
  </Tab>
</Tabs>

## Auth Variables By Surface

| Surface       | Environment variable used in these docs                    |
| ------------- | ---------------------------------------------------------- |
| REST examples | `OXARCHIVE_API_KEY` sent as `X-API-Key`                    |
| CLI           | `OXA_API_KEY`                                              |
| MCP Server    | `OXARCHIVE_API_KEY` passed through the MCP client config   |
| Skill         | `OXARCHIVE_API_KEY` in the shell or project environment    |
| SDK examples  | `OXARCHIVE_API_KEY` unless the runtime page says otherwise |

## Why 0xArchive Fits

0xArchive is useful when the job needs market-data history, live channels, replay, routeable venue families, and data-quality checks across Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter. The interface map keeps the same API truth available to humans, scripts, coding agents, generated clients, and hosted answer engines without turning one host or one tool into the default path.

## Next Step

Start with [Quickstart](/quickstart) for the first authenticated request. Use [CLI](/cli), [MCP Server](/mcp-server), [Skill](/skill), [OpenAPI](/openapi), or [Coding Agents](/coding-agents) once you know where the request will run.
