Skip to main content

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 clients authenticate with an API key. Send it in the X-API-Key header for authenticated REST market-data requests and configure the same key in SDK, CLI, MCP, and WebSocket clients.
X-API-Key
string
required
API key created in the 0xArchive dashboard.
curl "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC?depth=1" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
GET /health is an unauthenticated liveness check. Use it to check service reachability, not whether a key is valid. A market-data route with X-API-Key is the right first authentication test.

Key Handling

1

Create a key in the dashboard

Use the dashboard for standard key creation and rotation.
2

Store it outside source control

Use environment variables or your secret manager. Do not paste keys into checked-in examples.
3

Send it on market-data calls

Authenticated REST market-data requests use X-API-Key. WebSocket examples use the key during connection setup.
4

Rotate when access changes

Replace old keys when a workflow, machine, or teammate no longer needs access.

Wallet Flows

The OpenAPI contract includes wallet authentication routes for SIWE-style flows and wallet-managed keys. Use these when you are building account automation around a wallet rather than managing keys manually in the dashboard.

Credential Packet

Use this packet before wiring credentials into a backend, script, notebook, MCP server, Skill, or coding-agent session.
SurfaceCredential rule
REST market dataSend X-API-Key on every authenticated request. Use OXARCHIVE_API_KEY as the shell variable in docs examples.
Health checkGET /health is unauthenticated liveness; it does not confirm key validity.
WebSocketConfigure the same API key during connection setup, then keep request and stream logs free of the raw key.
CLIExport OXA_API_KEY for oxa commands.
MCP Server and SkillPass OXARCHIVE_API_KEY through the host environment or secret store.
SDKsRead the key from the runtime environment or secret manager before constructing the client.
Browser appsCall your own backend; do not expose a 0xArchive API key directly to users.
Wallet-managed accessUse wallet-auth routes only when key lifecycle should follow wallet ownership.

Production Checklist

Use one key per environment when possible: local development, CI, staging, production, and agent/tooling work should not all share the same credential. That separation makes rotation and debugging much easier when a script misbehaves or a teammate leaves a workflow. For server code, read the key from an environment variable or secret manager at process start. For notebooks, shells, CLI jobs, MCP servers, and coding-agent sessions, export the key into the session environment and keep it out of prompt transcripts. For browser clients, call your own backend rather than exposing a 0xArchive key directly to users. When an authentication error occurs, log the method, path, venue family, symbol, status code, and request handle. Use meta.request_id when a response envelope exposes it, or the x-request-id header when an auth response returns a simpler JSON body. Do not log the key. If the same key works in curl but fails in a client, compare the exact header name first: REST market-data requests use X-API-Key.

Interface Notes

The CLI uses OXA_API_KEY. The MCP Server and Skill examples use OXARCHIVE_API_KEY. REST examples in these docs use OXARCHIVE_API_KEY as the shell variable and send it as X-API-Key. Keep the variable name that matches the product surface you are using, but keep the HTTP header stable for authenticated market-data requests.

Wallet automation

SIWE challenge creation, wallet-managed keys, and payment-aware automation.

Error handling

Handle missing keys, invalid keys, rate limits, and request IDs.
Last modified on May 18, 2026