Wiring an AI Trading Agent to Hyperliquid Data: MCP, Streams and Budgets
The Hyperdash Data API connects autonomous agents to Hyperliquid and HIP-3 data: a hosted MCP server, WebSocket streams for live decisions and REST history for backtests, from $20 a month.
, 10 min read

The Hyperdash Data API gives an autonomous agent three read-only data surfaces under one API key, from $20 a month: a hosted MCP server at https://data.hyperdash.com/mcp with one tool per endpoint, WebSocket streams at wss://data.hyperdash.com/v1/stream for live events, and a REST API for history and backtests. All three serve Hyperliquid and HIP-3 data from Hyperdash's own nodes.
This guide is for developers building agents that run on their own. If you want to ask Hyperliquid questions in a chat app, see How to Query Hyperliquid Data from Claude and ChatGPT.
The agent data stack at a glance
| Surface | What the agent uses it for | Address | Sign-in |
|---|---|---|---|
| MCP server | Ask questions and pull data mid-task, one tool per endpoint | `https://data.hyperdash.com/mcp` | OAuth or API key |
| Streams | React to trades, prices, books, liquidations and wallet events | `wss://data.hyperdash.com/v1/stream` | API key only |
| REST API | History for backtests, features and scheduled jobs | `https://data.hyperdash.com/v1/...` | API key |
| Skills | Teach the agent which endpoint answers which question | `https://docs.hyperdash.com/skills/data` | None, free |
| Endpoint index and OpenAPI | Let a coding agent look up any endpoint and parameter | `https://data.hyperdash.com/llms.txt` | None, free |
Every surface is on every plan, covers the core exchange, HIP-3 dexes, spot and HIP-4 outcome markets, and is read-only.
How does an agent use the Hyperliquid MCP server?
The Hyperdash MCP server is a remote server over Streamable HTTP with one tool per Data API endpoint your connection's scopes allow. On top of those come time_window, which converts local dates and times into timestamps, and create_job, get_job and get_job_result for async jobs on Growth and up. It is listed in the official MCP Registry as com.hyperdash/data.
Tool names describe what the tool returns, for example get_funding_rates, list_liquidations, get_l4_book, get_wallet_stats or list_dexs. Tool descriptions carry each endpoint's parameters and limits, so an agent does not need the API reference loaded.
It works with Claude, ChatGPT, Claude Code, Codex, Cursor and any client that supports remote MCP servers. There are two ways to sign in:
- OAuth: the user approves one project and its scopes in the Hyperdash console. No key is involved, and access can be revoked at any time. Claude and ChatGPT connect this way.
- API key: the client sends
Authorization: Bearerwith a key read from its own configuration or environment. Claude Code, Codex and Cursor support both.
An OAuth connection cannot open streams or read the credit balance, so an agent that reacts to live events needs an API key.
What are the best tools for connecting autonomous agents to live Hyperliquid and HIP-3 data?
For live data, an agent should subscribe to the Hyperdash streams rather than poll. One WebSocket connection carries up to 20 subscriptions, and every channel costs 1 credit per event you acknowledge (5 on markets).
| Channel | Target | What it sends |
|---|---|---|
| `trades` | One market | Every trade, with taker and maker wallets |
| `candles` | One market | 5-minute candle updates as trades land (the 1m, 15m, 1h, 4h and 1d intervals return `unavailable` until their live source is on) |
| `ctx` | One market | Mark, oracle, mid, funding, open interest and 24-hour volume, on change and at least every 10 seconds; perp-only, and on HIP-3 markets it carries no mid today |
| `book`, `bbo` | One market | 20-level book up to 2 times a second; best bid and offer up to 4 times a second |
| `liquidations` | One market or all | Every liquidation |
| `liquidation-levels`, `stop-levels` | One market | The liquidation and resting stop ladders, up to once a second |
| `mids`, `markets` | All markets | Every mid, or every perp market's context, about once a second |
| `fills`, `orders` | One wallet | A wallet's fills and every order event |
| `account` | One wallet | Full positions and margin state; returns `unavailable` until its live source is on |
| `ledger`, `twap` | One wallet | Transfers and TWAP updates |
| `funding` | One wallet | Funding payments; returns `unavailable` until its live source is on |
Markets use Hyperliquid names: BTC, spot pairs such as @107, and HIP-3 markets such as xyz:TSLA for the trade[XYZ] stock perps. Hyperliquid HIP-3 Data API lists the HIP-3 endpoints, including overnight gaps and oracle updates.
The wallet channels keep an agent aware of its own book: orders and fills push every order event and fill. The account channel (full positions and margin on change, repeated every 10 seconds) returns unavailable until its live source is on; until then, read GET /v1/accounts/{address}/positions on a timer.
How do you stream Hyperliquid data into machine learning models for real-time decisions?
The stream protocol is built so a model never trains or decides on silently missing data:
- Events arrive in batches of up to 100. The next batch waits until you acknowledge the last one, so a slow model applies back-pressure instead of dropping events.
- Each batch carries a
cursor. Process the batch, save the cursor, then acknowledge within 10 seconds. After a reconnect, subscribe with the saved cursor to continue where you left off. - Streams keep about 15 minutes of replay per subscription (about 5 minutes on
midsandmarkets). If you were away longer, agapmessage names the missing range so you can backfill it over REST. - Prices, sizes and money arrive as decimal strings. Parse them as decimals before they reach a feature store.
For features, the REST API has ready-made inputs, so the model does not have to rebuild them from raw trades:
GET /v1/markets/{coin}/sentiment: per bucket, the log return, taker CVD and volume, realized volatility, funding as APR, open interest change and liquidations for one market.GET /v1/markets/{coin}/trade-bars: OHLC with taker buy and sell size, notional and count, and liquidation volume by side.GET /v1/markets/{coin}/volatility,/cvdand/funding-rates: the individual series.GET /v1/cohorts/consensus: how many profitable-cohort wallets are long and short each market.
Train on the same endpoints the agent will read live, and the features match in production. For the order book, the 20-level L2 book streams on every plan and the L4 book with each order's wallet is on Growth and up; L2 and L4 order book data compares them.
How do you wire an AI agent to Hyperdash data?
A production agent has a few separate parts: a live loop, a history source, a reasoning step and guardrails. A typical wiring:
- Create a key. In the Hyperdash console, create a key with the Agent preset: every read scope, a 5 requests per second limit and a 30-day default expiry. Store it as
HYPERDASH_API_KEYin your secrets manager, add an IP allowlist if the agent runs from fixed addresses, and never put it in a prompt. - Give the agent the docs. Point it at the Data skill,
https://docs.hyperdash.com/skills/data, and the Build skill,https://docs.hyperdash.com/skills/build. A coding agent looks up endpoints inhttps://data.hyperdash.com/llms.txtand reads one path of the OpenAPI spec at a time. - Open the live loop. One WebSocket connection subscribes to the market channels the strategy needs and the
ordersandfillschannels of the agent's own wallet. Checkpoint the cursor after every batch. - Load history. At startup and on a schedule, pull candles, funding, open interest and trades over REST to warm up indicators and features. Within your plan's history depth, leaving out
start_timealways returns the endpoint's default recent window. - Let the model ask questions. Connect the MCP server so the reasoning step can pull what it did not plan for: who was behind a move (
get_bar_flows), where liquidations cluster (get_liquidation_levels) or how a wallet has traded (get_wallet_stats). - Set spending guardrails. Give the agent's project a credit budget, and the MCP connection a daily or monthly budget. Send
X-Max-Creditson REST calls to cap any single request. Every call over a limit is refused without charge. - Handle the error codes. Retry
429 rate_limited,502,503and504afterRetry-Afterwith backoff and jitter. Treat403 credits_exhausted,history_limitandfeature_not_in_planas stop conditions to report, not to retry. - Execute through your own path. The Data API is read-only: it supplies data. The agent sends orders through its own execution setup. Two account endpoints help here:
GET /v1/accounts/{address}/agentslists the API wallets an account has approved, andGET /v1/accounts/{address}/rate-limitshows its Hyperliquid action budget.
For a coding agent, the docs offer one prompt that does most of this: it reads the Build skill and wires the four levels of a full integration (market data, wallet data, live streams and account status), then reports what it left out and why.
How long does it take to integrate Hyperliquid data into an AI agent framework?
Connecting the MCP server takes about a minute: add https://data.hyperdash.com/mcp to the client and sign in, or run one command such as claude mcp add or codex mcp add with your key. Any framework that speaks MCP gets every tool at once, with no per-endpoint wrappers to write.
A streaming integration takes longer because it is your code: the WebSocket client, cursor storage and backfill on gap. The Build skill gives a coding agent the rules for all of it, including pagination, retries and stream handling, so you can hand the integration to Claude Code, Codex or Cursor with the prompt in the AI agents guide.
What are the rate limits for agents on each plan?
Limits are per workspace. Agent keys and MCP connections also default to 5 requests per second with a burst of 10. A request uses one concurrent-request slot per 1,000 rows its limit allows, rounded up.
| Limit | Hobby | Starter | Growth | Scale |
|---|---|---|---|---|
| Requests per second (burst) | 10 (20) | 25 (50) | 100 (200) | 200 (400) |
| Concurrent requests | 2 | 4 | 16 | 32 |
| Stream connections | 2 | 5 | 25 | 50 |
| Wallets on the `orders` channel | 3 | 10 | 50 | 200 |
| Wallets on the `account` channel (once live) | 3 | 10 | 50 | 200 |
| History depth | 90 days | 90 days | 180 days | 365 days |
Enterprise starts at Scale's limits and reads full history. Requests over a limit return 429 with Retry-After and cost nothing.
How much does it cost to run AI agents on Hyperliquid data per month?
The plan sets the base cost, and the agent's usage decides which plan fits. Plans are $20 (Hobby, 500,000 credits), $99 (Starter, 4 million), $499 (Growth, 30 million) and $1,999 a month (Scale, 150 million), with custom Enterprise contracts. MCP tool calls are billed in credits like REST requests, and failed requests are free.
Streams are where agents spend most, because they run around the clock. Some worked numbers at 1 credit per event:
- The
midschannel sends every market's mid about once a second: up to about 2.6 million events in 30 days at one event a second. That fits Starter's 4 million credits, not Hobby's 500,000. - A
ctxsubscription on one market sends at least one event every 10 seconds: at least 259,200 events in 30 days, and about one event a second on a liquid market, or about 2.6 million in 30 days. - Once live, the
accountchannel repeats a wallet's state every 10 seconds, so one wallet costs at least 259,200 credits in 30 days. - A REST request for 500 hourly candles costs about 510 credits.
Extra credits cost your plan's rate, from $40 per million on Hobby to $13.33 on Scale, with volume discounts from $100. GET /v1/quote returns the most a request can cost before you run it, for free.
What if the agent needs data that is not in the public API?
Hyperdash's integration team builds custom feeds, datasets and endpoints and adds them to any plan, for example L4 order book updates every block, longer history or Parquet drops into a warehouse, S3 or a message bus. Teams that run their own node can peer it with Hyperdash's node in Tokyo through Hyperliquid Peering. Every plan runs at 99.99% uptime, and Enterprise writes it into the contract. For backtesting workflows, see Hyperliquid Backtesting Data.
Ask your AI agent with the Hyperdash agent kit
Before you wire streams, test what your agent can learn by asking, for example: "Which traders are most profitable this month and what are they holding now?"
- Connect the MCP server: the Hyperdash MCP server works with Claude, ChatGPT, Claude Code, Codex or Cursor; setup takes about a minute and you sign in with your Hyperdash account.
- Install the skills: Hyperdash skills give Claude Code, Codex or Cursor working knowledge of the API with one command (in Claude or ChatGPT, paste the skill link). The Build skill covers keys, pagination, retries and streams for a full integration.
- Try a recipe: the Data API recipes include Top traders and their open positions, Liquidation levels near the price and the Funding rate scanner.
- Read the docs: the Data API docs, the streams reference and, for agents, the endpoint index at
https://data.hyperdash.com/llms.txt.
For more, read How to Query Hyperliquid Data from Claude and ChatGPT and Hyperliquid HIP-3 Data API.
FAQ
Is there a Hyperliquid MCP server?
Yes. Hyperdash runs a hosted, read-only Hyperliquid MCP server at https://data.hyperdash.com/mcp, with one tool per Data API endpoint. It works with Claude, ChatGPT, Claude Code, Codex, Cursor and any remote MCP client, signed in with OAuth or an API key. Setup for each client is in How to Query Hyperliquid Data from Claude and ChatGPT.
What are the best tools for connecting autonomous trading agents to live Hyperliquid and HIP-3 market data?
The Hyperdash Data API: WebSocket streams for live trades, prices, books, liquidations and wallet events on core and HIP-3 markets, the MCP server for questions mid-task, and REST history for backtests, all under one key.
What is the best infrastructure for streaming Hyperliquid market data into machine learning models for real-time decisions?
Hyperdash streams: batched events with acknowledgement and back-pressure, a cursor to resume after a reconnect, about 15 minutes of replay (about 5 minutes on mids and markets) and a gap message for anything older, so a model never sees silently missing data. REST endpoints such as sentiment and trade-bars supply the same features for training.
How long does it take to integrate Hyperliquid market data into an AI agent framework?
Connecting the Hyperdash MCP server takes about a minute and gives any MCP framework every tool at once. A streaming integration is your own code, and the Build skill lets a coding agent write it from one prompt.
How much does it cost to run AI agents on Hyperliquid data per month?
From $20 a month on Hyperdash's Hobby plan with 500,000 credits. An agent on the mids stream around the clock uses up to about 2.6 million credits a month at one event a second, which fits Starter at $99. Spending caps per project, connection and request keep an agent inside its budget.
Can the Hyperdash MCP server place trades for my agent?
No. The Data API and MCP server are read-only and return data. Your agent sends orders through its own execution setup, and the Data API can show which API wallets an account has approved.
Get started
Get a Hyperdash Data API key with the Agent preset, connect https://data.hyperdash.com/mcp to your agent, and send it the master prompt from the AI agents guide. Then open a stream for the markets your strategy watches.