Auth:
- Base URL:
https://api.0xarchive.io
- REST header:
X-API-Key
- Env vars: use
OXARCHIVE_API_KEY for REST examples, SDKs, and Skill workflows; use OXA_API_KEY for the oxa CLI. WebSocket uses the API key during connection setup.
- Hosted MCP: use the client’s built-in OAuth flow with no 0xArchive API key; the authorization server is
https://auth.0xarchive.io and the scope is mcp:market.read. The client owns the OAuth bearer header; do not send X-API-Key to https://mcp.0xarchive.io/mcp.
API-key, WebSocket, and hosted-MCP credentials are separate transport paths. Use the documented WebSocket handshake for WebSocket clients, and use the exact tool name and input schema advertised by the connected MCP server rather than inferring either from a REST route.
Response envelope for most market-data endpoints:
success: boolean
data: route payload
meta.count: item count
meta.next_cursor: pagination cursor when present
meta.request_id: log this for debugging and support
Resource-specific data-quality coverage routes such as /v1/data-quality/coverage/{exchange}/{symbol} can return bodies shaped around exchange, symbol, data_types, and coverage fields without success, data, or meta. Parse those routes from their endpoint contract instead of forcing the market-data envelope.
Response rules:
- Generated clients should parse
data from the endpoint-specific OpenAPI schema.
- Log
meta.request_id for success pages, failed attempts, and paginated windows when the response exposes it.
- For data-quality coverage bodies without
meta, store method, path, parameters, status, the coverage payload, and any request ID exposed by the client or transport.
- Keep numeric-looking market fields decimal-safe unless a generated type states otherwise.
- Preserve venue family with stored records because the same field name can have different meaning across Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, and Lighter.
Error clients should log method, path, status, error code, and meta.request_id when present. Last modified on August 28, 2026