0xarchive-mcp
The 0xArchive MCP server provides granular market data for Hyperliquid (core perps, HIP-3 builder perps, HIP-4 outcome markets, and Spot) and Lighter.xyz via 111 typed tools.
Market Data
Fetch instrument metadata, L2/L3/L4 orderbooks, trade/fill history, OHLCV candles, funding rates, open interest, liquidations, and mark/oracle/mid price history across all supported venues.
Order-Level (L4/L3) Data
Reconstruct full orderbooks at specific timestamps, retrieve raw order diffs (new, modified, cancelled, filled), access periodic checkpoints, query order history with user attribution, get aggregated order flow metrics, and retrieve TP/SL order history.
Venue-Specific Coverage
Hyperliquid Perps & Spot (294 pairs): Full market data including TWAP status tracking and spot order lifecycle events.
HIP-3 Builder Perps (125+ markets, 6 builders): Full market data + L4/L2 order-level data and liquidation events.
HIP-4 Outcome Markets: Yes/No side orderbooks, per-side OI, implied probability (mark_price) history, and L4 data.
Lighter.xyz: L3 orderbooks with order IDs and user addresses, combined market summaries.
Data Quality & Monitoring
System health status, data coverage reports (timestamps, completeness, gap detection), incident history (outages/degradations), WebSocket/REST latency metrics, and monthly SLA compliance reports.
Web3 Authentication
Generate SIWE challenge messages, create free-tier API keys via signed SIWE (no browser needed), list/revoke API keys, and subscribe to paid tiers (Build/Pro) via x402 USDC payment on Base.
Queries support cursor-based pagination and smart defaults (last 24 hours, 100 records, 1-hour candle intervals).
Provides tools for Web3 authentication and wallet-based account management, enabling users to generate SIWE challenges, sign up for accounts, manage API keys, and process subscriptions through Ethereum-compatible wallet signatures.
0xArchive MCP Server
Typed 0xArchive market data tools for MCP-capable clients.
Recommended: Use the hosted MCP at https://mcp.0xarchive.io for most setups (zero install, OAuth, always current). This repository is the self-hosted package. Reach for it when you need stdio transport (Claude Desktop, certain IDE plugins), run in an air-gapped environment, or have compliance requirements that prevent a hosted intermediary.
0xArchive is granular market data infrastructure for Hyperliquid and Lighter.xyz. Hyperliquid includes core perps, HIP-3 builder perps, HIP-4 outcome markets, and Hyperliquid Spot; Lighter.xyz is the second top-level venue API. This server exposes 111 typed tools for order books, trades, candles, funding, open interest, liquidations, L4/L3 order-level data, outcome markets, spot pairs, TWAP statuses, data quality, and wallet-managed auth.
Use MCP when you want typed tools or shared client config across any client that supports MCP, including Claude Code, Claude Desktop, Cursor, ChatGPT Codex setups with MCP enabled, and other agent clients. Claude Code and ChatGPT Codex are equal first-class coding-agent paths: use this server wherever MCP is available, and use the same API key with the CLI, SDKs, skills, llms.txt, OpenAPI, and markdown docs wherever shell, repo, or file context is the better route.
First Tool Result
Install the MCP server package in the project or agent workspace where the MCP client will run:
npm install @0xarchive/mcp-server
export OXARCHIVE_API_KEY="0xa_your_api_key"
# Claude Code command mechanics
claude mcp add 0xarchive -s user -t stdio \
-e OXARCHIVE_API_KEY="$OXARCHIVE_API_KEY" \
-- npx -y @0xarchive/mcp-serverThe claude mcp add line is a Claude Code setup mechanic. ChatGPT Codex users with MCP enabled should register the same stdio command in their Codex MCP config: npx -y @0xarchive/mcp-server. Ask one narrow question first:
What's BTC's current funding rate?
Expected result: the client invokes a concrete 0xArchive MCP tool and returns live venue data or a direct auth/configuration error.
Related MCP server: aster-info-mcp
Agent Integration Requirements
Agent surface | Requirement | Setup mechanic |
Claude Code | Claude Code MCP support and Node 18+ |
|
Claude Desktop | Desktop MCP JSON config | Add the stdio server to |
ChatGPT Codex | ChatGPT Codex with MCP enabled | Configure Codex MCP to run the same |
Other MCP clients | Local stdio MCP support | Run |
Choose This Or Another Agent Path
Need | Best first path |
Typed tools or shared MCP config | This MCP server |
Fast local agent setup | |
Claude Code, ChatGPT Codex, or other shell-first coding-agent work | |
Direct SDK integration | |
File-based historical pulls | |
Machine-readable context |
Usage Examples
Prompt | Tool that fires |
"Give me a BTC market summary" |
|
"Show ETH 4h candles for the past week" |
|
"What's the current funding rate for SOL?" |
|
"Compare BTC funding on Hyperliquid vs Lighter" |
|
"Show me SOL liquidations in the last 24 hours" |
|
"Get BTC orderbook with 20 levels" |
|
"Any data incidents this month?" |
|
"What's the km:US500 price on HIP-3?" |
|
"List active HIP-4 outcome markets" |
|
"Show me the SLA report for January 2026" |
|
Setup
1. Install
npm install @0xarchive/mcp-server2. Get an API Key
Create an account at 0xArchive signup, generate an API key, and set OXARCHIVE_API_KEY. Or use the web3_challenge and web3_signup tools to get a free API key with just an Ethereum wallet, no browser needed.
3. Add to an MCP client
Claude Code command mechanics:
claude mcp add 0xarchive -s user -t stdio \
-e OXARCHIVE_API_KEY=0xa_your_api_key \
-- npx -y @0xarchive/mcp-server4. Add to Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"0xarchive": {
"command": "npx",
"args": ["-y", "@0xarchive/mcp-server"],
"env": {
"OXARCHIVE_API_KEY": "0xa_your_api_key"
}
}
}
}For ChatGPT Codex and other agent workflows, use this same stdio server command wherever your client supports local MCP servers. If MCP is not available there, route the same API key through the CLI, SDKs, skills, markdown docs, llms.txt, or OpenAPI. The acquisition path is shared: make one authenticated request, then expand into replay, SDKs, Data Catalog exports, or agent tooling.
Available Tools (111)
Hyperliquid
Tool | Description |
| List all Hyperliquid perp/spot instruments |
| Get a single Hyperliquid instrument by coin |
| Current L2 orderbook snapshot |
| Historical orderbook snapshots |
| Trade/fill history |
| OHLCV candle data |
| Current funding rate |
| Funding rate history |
| Current open interest |
| Open interest history |
| Liquidation history |
| Liquidations for a specific user address |
| Aggregated liquidation volume (USD buckets) |
| Per-coin data freshness and lag |
| Combined market summary (price, funding, OI, volume, liquidations) |
| Mark/oracle/mid price history |
Hyperliquid L4 (Order-Level)
Tool | Description |
| Order history with user attribution |
| Aggregated order placement, cancellation, and fill metrics |
| TP/SL order history with trigger prices and triggered status |
| L4 orderbook reconstruction at a specific timestamp |
| Raw order-level changes (new, modified, cancelled, filled) over a time range |
| Periodic full order-level orderbook checkpoints |
Hyperliquid L2 (Full-Depth)
Tool | Description |
| L2 full-depth orderbook derived from L4 |
| Historical L2 full-depth orderbook snapshots |
| L2 tick-level diffs |
HIP-3 (Builder Perps)
Tool | Description |
| List HIP-3 instruments |
| Get a single HIP-3 instrument by coin |
| Current HIP-3 orderbook |
| Historical HIP-3 orderbook snapshots |
| HIP-3 trade history |
| Most recent HIP-3 trades |
| HIP-3 candle data |
| Current HIP-3 funding rate |
| HIP-3 funding history |
| Current HIP-3 open interest |
| HIP-3 open interest history |
| HIP-3 liquidation events (Feb 2026+) |
| Aggregated HIP-3 liquidation volume (USD buckets, Feb 2026+) |
| Per-coin HIP-3 data freshness and lag |
| Combined HIP-3 market summary |
| HIP-3 mark/oracle/mid price history |
HIP-3 L4 (Order-Level)
Tool | Description |
| HIP-3 order history with user attribution |
| Aggregated HIP-3 order placement, cancellation, and fill metrics |
| HIP-3 TP/SL order history with trigger prices and triggered status |
| HIP-3 L4 orderbook reconstruction at a specific timestamp |
| HIP-3 raw order-level changes over a time range |
| HIP-3 periodic full order-level orderbook checkpoints |
HIP-3 L2 (Full-Depth)
Tool | Description |
| HIP-3 L2 full-depth orderbook derived from L4 |
| HIP-3 L2 full-depth orderbook history |
| HIP-3 L2 tick-level diffs |
HIP-4 (Outcome Markets)
HIP-4 coins use the bare numeric format <10*outcome_id + side> (e.g. 0 for outcome 0 Yes, 1 for outcome 0 No). Legacy #0 / %230 forms are still accepted. mark_price for HIP-4 is an implied probability in [0,1], not a USD price. HIP-4 has no funding, no liquidations, and no candles by design. Listen for the WebSocket outcome_settled event to be notified when an outcome resolves.
Tool | Description |
| List HIP-4 outcome-market instruments (one row per side) |
| Get a single HIP-4 instrument by coin (e.g. |
| List HIP-4 outcomes (filter |
| Single outcome detail including |
| Current HIP-4 L2 orderbook |
| Historical HIP-4 L2 orderbook snapshots |
| HIP-4 trade history |
| Most recent HIP-4 trades |
| HIP-4 per-side open interest history |
| Current HIP-4 per-side open interest |
| Per-coin HIP-4 data freshness and lag |
| Combined HIP-4 24h summary (probability, volume, OI) |
| HIP-4 mid-price (implied probability) history |
| HIP-4 order lifecycle events |
| HIP-4 aggregated order placement/cancel/fill metrics |
| HIP-4 TP/SL order history |
| HIP-4 L4 orderbook reconstruction |
| HIP-4 raw order-level changes over a time range |
| HIP-4 periodic L4 orderbook checkpoints |
Hyperliquid Spot
Spot pairs use dashed canonical symbols (e.g. HYPE-USDC, PURR-USDC); the server resolves to Hyperliquid's wire format (PURR/USDC, @107) internally. 294 pairs covered. Spot has no funding, no open interest, no liquidations, and no candles by design (those are perp-only constructs). Coverage: trades from 2025-03-22 (HL S3 backfill); orderbook, L4, and TWAP statuses live from 2026-05-05.
Tool | Description |
| List all 294 spot pairs with metadata (base/quote, wire symbol, decimals, latest price) |
| Get a single spot pair by dashed symbol (e.g. |
| Current spot L2 orderbook (live from 2026-05-05; full depth on every tier) |
| Historical spot L2 orderbook snapshots (live-only from 2026-05-05) |
| Spot trade history with optional user filter (S3 backfill from 2025-03-22) |
| Most recent spot trades (live from 2026-05-05) |
| Spot order lifecycle events with user attribution |
| Spot L4 orderbook reconstruction at a specific timestamp |
| Spot raw order-level changes over a time range |
| Spot periodic L4 orderbook checkpoints |
| Spot TWAP statuses for a single pair (live from 2026-05-05) |
| Spot TWAP statuses for a single user wallet across all pairs |
| Per-pair spot data freshness and lag |
Lighter.xyz
Tool | Description |
| List Lighter instruments |
| Get a single Lighter instrument by coin |
| Current Lighter orderbook |
| Historical Lighter orderbook snapshots |
| Lighter trade history |
| Most recent Lighter trades |
| Lighter candle data |
| Current Lighter funding rate |
| Lighter funding history |
| Current Lighter open interest |
| Lighter open interest history |
| Per-coin Lighter data freshness and lag |
| Combined Lighter market summary |
| Lighter mark/oracle/mid price history |
Lighter L3 (Order-Level)
Tool | Description |
| Current L3 order-level orderbook with order IDs and user addresses |
| Historical L3 orderbook snapshots with individual orders |
Data Quality
Tool | Description |
| System health across venue APIs |
| Data coverage (earliest/latest, records, completeness) |
| Coverage for a specific exchange |
| Per-symbol coverage with gap detection |
| Outage and degradation history |
| Single incident details by ID |
| WebSocket/REST latency and data freshness |
| Monthly SLA compliance report |
Realtime WebSocket Channels
The MCP server exposes the historical REST endpoints. For realtime, point any WebSocket client at wss://api.0xarchive.io/ws?apiKey=... and subscribe to:
Channel | Notes |
| Realtime + replay fills (one row per side per trade) |
| Realtime + replay liquidations. Each event is a fill row with |
| Realtime + replay L2 orderbook updates (~1.2 sec resolution) |
| Realtime + replay HIP-4 per-side open interest snapshots |
| Order-level events (realtime only, no replay) |
| HIP-4 outcome resolution event. Fired once per outcome when |
WebSocket access (including all L4 channels) is available on every tier, starting with Free (10 subscriptions / 2 connections / 10x replay).
Web3 Authentication
Tool | Description |
| Get a SIWE challenge message for a wallet address |
| Create a free-tier account and API key with a signed SIWE message |
| List all API keys for a wallet |
| Revoke a specific API key |
| Subscribe to a paid tier (build/pro) via x402 USDC payment on Base |
Free-tier flow: web3_challenge (get SIWE message) → sign with personal_sign (EIP-191) → web3_signup (submit signature) → receive API key.
Paid-tier flow (x402): web3_subscribe with tier → returns 402 with pricing → sign USDC transfer (EIP-3009 on Base) → web3_subscribe again with payment_signature → receive API key + subscription.
Pricing Tiers
Every tier gets the full open catalog: all markets (HL perps, HIP-3, HIP-4, Spot, Lighter), all schemas (L2 full depth, L4 diffs/reconstruction/checkpoints, L3, trades, candles, funding, OI, liquidations, order history/flow/TP-SL), all Lighter granularities (including tick), and full history back to April 2023. Nothing is symbol-, depth-, datatype-, or history-gated. Tiers differ only on monthly credits, RPS, concurrent queries, WebSocket scale, replay speed, export credits, and support/SLA.
Tier | Price | Credits/mo | RPS | Concurrency | WebSocket | Replay | Export | Notes |
Free | $0/mo | 50,000 | 15 | 3 | 10 subs (2 conn) | 10x | $0 | All markets, full history |
Build | $49/mo ($39 annual) | 80M | 50 | 10 | 500 subs (3 conn) | 50x | $50 | All markets, full history |
Pro | $199/mo ($159 annual) | 400M | 150 | 20 | 3,000 subs (5 conn) | 100x | $300 | All markets, full history |
Scale | $799/mo ($639 annual) | 2B | 500 | 20 | 20,000 subs (16 conn) | 300x | $1,500 | 200 keys, dedicated support |
Enterprise | Custom | Unlimited | from 1,000 | from 500 | Custom | from 500x | Custom | SLA from 99.5%, dedicated infra |
Upgrade at 0xarchive.io/pricing.
Tool Annotations
All 111 tools carry MCP annotations so clients can reason about safety and retry behavior.
Market data tools (106):
Annotation | Value | Meaning |
|
| Tools never modify data |
|
| No destructive side effects |
|
| Safe to retry on failure |
|
| Queries an external API |
Web3 tools (5): readOnlyHint: false, idempotentHint: false. These create accounts, keys, and subscriptions.
All tools also declare an outputSchema so clients can validate structured responses.
Smart Defaults
Time range: Defaults to last 24 hours if not specified
Limit: Defaults to 100 records
Interval: Defaults to 1h for candles
Pagination: Returns cursor for next page when more data available
Timestamps: Accepts both Unix milliseconds and ISO 8601 strings
Data Catalog
For large-scale data exports (full order books, complete trade history, etc.), use the Data Catalog. It lets you choose markets, datasets, and date ranges, see a live quote, and export zstd-compressed Parquet. MCP tools are best for typed point queries and moderate data pulls; the Data Catalog is the file-export path.
Links
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xArchiveIO/0xarchive-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server