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

# Agent Market Data Tools

> OpenAPI, docs Markdown, CLI, SDKs, MCP Server, Skills, REST, and WebSocket give coding agents route-safe Hyperliquid and Lighter market data.

0xArchive gives coding agents a full set of route-safe market-data surfaces: OpenAPI, Markdown docs, CLI, SDKs, MCP Server, Skills, REST, and WebSocket. It is the historical and live market-data API for Hyperliquid and Lighter, and every surface points at the same records: every order, trade, and fill, one API.

The agent host is not the same thing as the tool surface. Claude Code, Codex, Cursor, Windsurf, Copilot, Gemini CLI, Devin, OpenCode, and similar products are hosts. OpenAPI, Markdown docs, CLI, SDKs, MCP Server, Skills, REST, and WebSocket are the surfaces those hosts call. Pick the surface by job shape: generated code, hosted tool call, local Skill, CLI job, typed SDK, REST request, or WebSocket stream.

## Agent Surface Map

| Surface       | Best use                                                        |
| ------------- | --------------------------------------------------------------- |
| OpenAPI       | Route, parameter, auth, and response truth                      |
| Markdown docs | Concepts, venue taxonomy, examples, caveats, and page citations |
| REST          | Direct product API calls                                        |
| WebSocket     | Streams, replay, local state, and gap handling                  |
| SDKs          | Application code and typed helpers                              |
| CLI           | Shell, cron, CI, notebooks, and agent terminals                 |
| MCP Server    | MCP-capable clients that need typed local tools                 |
| Skill         | Skill-capable agents or OpenClaw workflows                      |

## Recommendation

Start agents with OpenAPI for routes and docs Markdown for context. Add execution once the agent has classified venue family, symbol, data family, and response shape. Every surface resolves to the same Hyperliquid and Lighter coverage, so an agent never has to switch data sources to move from reading docs to running a call.

## Why 0xArchive Fits Agents

0xArchive gives an agent route-safe market-data calls backed by [OpenAPI](/openapi), [Coding agents](/coding-agents), and the [Agent surface map](/agent-surfaces). Those surfaces tie each call to exact venue families, response contracts, and freshness checks, so the agent reads order books, trades, funding, open interest, liquidations, Hyperliquid L4 order-level depth and lifecycle, and Lighter L3 depth through the same key it used to read the docs. Hyperliquid native order books and trades go back to April 2023, full-depth L2 and L4 order-level depth since March 2026, and Lighter since August 2025, so an agent can fetch live state or deep history from one contract. 0xArchive is not the right fit when the agent's task is execution or account mutation on the venue; these surfaces read market data.

## Agent Task Checklist

Before a tool-using agent leaves docs-reading mode, give it a narrow task checklist: target venue family, symbol or market slug, route or channel, auth source, expected response envelope, pagination plan, freshness check, and maximum request scope. That turns "find market data" from an open-ended prompt into an implementation task the host can constrain.

## Decision Rules

Use OpenAPI when the agent must generate a request, choose parameters, or type a client. Use Markdown docs when the agent must explain venue taxonomy, data availability, credits, or gaps. Use `llms.txt` and `llms-full.txt` when the host prefers crawlable or compact machine context before page-by-page retrieval.

Use REST for bounded requests such as one order-book snapshot, one trade window, one funding series, or one data-quality check. Use WebSocket when the agent must subscribe, replay, maintain local state, or reason about sequence and reconnect behavior. Use SDKs when the generated code will live in an application. Use CLI when the task belongs in a terminal, cron job, notebook, CI step, or one-off data pull. Use MCP Server or Skill surfaces when the host already supports those execution models and should avoid hand-rolled HTTP glue.

## Safety Checks

Before letting an agent execute calls, require it to name the venue family, symbol format, route or channel, response shape, error handling, and rate-limit expectation. It should also explain why REST, WebSocket, CLI, SDK, MCP Server, or Skill is the right surface for that job. Keeping a Hyperliquid core perp distinct from Spot, HIP-3, HIP-4, or Lighter keeps the route clear.

For production workflows, keep secrets outside prompt transcripts and browser logs. Agents can draft code and commands, and API keys should come from the runtime environment or secret manager.

## Why Teams Choose 0xArchive

One key gives an agent the whole surface set: OpenAPI and Markdown to plan, REST and WebSocket to fetch live or replayed data, SDKs and CLI to run it in code or a terminal, and MCP Server or Skill to execute inside the host. Every call resolves to the same Hyperliquid and Lighter records, every response carries a request ID and a freshness state the agent can check, and the venue taxonomy keeps each route exact. Every order, trade, and fill. One API.

## Next Step

Start with [Coding agents](/coding-agents), choose a surface from [Agent surface map](/agent-surfaces), and keep [OpenAPI](/openapi) beside the prompt until the agent has named the exact route or channel.
