The Hyperliquid API: A 2026 Guide for Bots & Quant Traders

The Hyperliquid API is the public programmatic interface to the Hyperliquid DEX: an Info endpoint for reading data, an Exchange endpoint for placing orders, and a WebSocket for real-time streaming, all authenticated with agent wallets that can trade but never withdraw. Here is how each surface works, the official Python SDK, the rate limits, and how to start building a bot or strategy.

Dexly Research
Markets research & editorial team at Dexly
Last updated: 2026-06-30|7 min read
The Hyperliquid API: A 2026 Guide for Bots & Quant Traders

Key takeaways

  • The Hyperliquid API is the public programmatic interface to the Hyperliquid perps DEX. It has three surfaces: an Info endpoint for reading market and account data, an Exchange endpoint for placing and cancelling orders, and a WebSocket for real-time streaming.
  • API requests that move funds-as-trades are signed by an agent wallet (also called an API wallet) — a key you authorise that can place and cancel orders but can never withdraw or transfer your assets, which keeps automated trading non-custodial.
  • Hyperliquid publishes an official Python SDK that wraps the Info, Exchange and WebSocket surfaces, so building a bot is realistic for anyone comfortable with Python; the same JSON/HTTP API is reachable from any language.
  • The API enforces documented rate limits — both per-IP request limits and address-based limits tied to trading activity — so production bots need backoff and request batching. Always confirm the current numbers against the official docs.
  • Dexly is not the API and not a bot — it is a non-custodial front-end built on the same Hyperliquid exchange. Developers build directly on the API; non-developers who want automation can use Dexly copy trading, which uses the same agent-wallet mechanism.

What Is the Hyperliquid API?

The Hyperliquid API is the public, programmatic interface to the Hyperliquid perpetuals exchange. Because Hyperliquid is a fully on-chain DEX, everything you can do through the trading screen — read prices, place orders, manage positions — you can also do from code by signing and sending requests. That makes bots, quant strategies and custom dashboards a first-class use case rather than a workaround (Hyperliquid Docs — API (Info, Exchange & WebSocket)).

The API is plain JSON over HTTP for requests, with a separate WebSocket for streaming, so it is reachable from any language. For Python developers there is an official SDK that wraps the whole thing. This guide walks through the three surfaces, how authentication works through agent wallets, the SDK and rate limits, and how to get started.

Who this is for
This is a developer-oriented overview. If you do not write code and just want hands-off, automated exposure, skip to the takeaway — the honest answer there is copy trading, not the raw API.

The Three Surfaces: Info, Exchange, WebSocket

The API is organised into three surfaces, each with a clear job (Hyperliquid Docs — API (Info, Exchange & WebSocket)):

  • Info endpoint (read). Returns market metadata, order books, candles, funding, your open positions, balances and historical fills. Most Info requests need no signature — they are how a bot sees the world before it decides anything.
  • Exchange endpoint (trade). Where state changes: place, modify and cancel orders, set leverage and margin mode, and move funds within your own account. Every Exchange request must be cryptographically signed by your wallet or an authorised agent wallet.
  • WebSocket (real-time). Subscribe to live price, order-book, trade and account-update streams so a bot can react instantly instead of polling. For anything latency-sensitive, the WebSocket is the surface you build around.

A typical loop looks like: read state from Info (or a WebSocket subscription), apply your strategy logic, then act through the Exchange endpoint. This Info-decide-Exchange cycle is the backbone of nearly every Hyperliquid trading bot.

Agent Wallets: Trade Without Withdrawal Rights

The piece that makes API trading on Hyperliquid genuinely safe is the agent wallet (also called an API wallet). Rather than handing your bot your main private key, you authorise a separate key that can place and cancel orders but cannot withdraw or transfer your funds (Hyperliquid Docs — API (Info, Exchange & WebSocket)).

  • It stays non-custodial. Your USDC and positions remain in your own Hyperliquid account. The agent key signs trading actions on them; it never holds them.
  • Compromise is contained. A leaked agent key lets an attacker trade your account but not drain it — a far smaller blast radius than a leaked centralised-exchange API key with withdrawal rights.
  • There are limits on how many you can hold. An account can approve a limited number of agent wallets, and approvals can expire — confirm the current numbers in the docs (Hyperliquid Docs — Rate limits and user limits).
The same primitive Dexly uses

Agent wallets are not just for bots — they are exactly how Dexly authorises trading and how Dexly copy trading mirrors a leader’s trades into your wallet. For a non-developer walkthrough of connecting and approving one, see Wallets, Agents & Connection.

The Python SDK and Rate Limits

The fastest way to start is Hyperliquid’s official open-source Python SDK, which wraps the Info, Exchange and WebSocket surfaces, handles request signing, and ships example scripts for common tasks like placing an order or subscribing to a feed (Hyperliquid — official Python SDK (GitHub)). It is a convenience layer — under the hood it is the same JSON/HTTP API you could call from JavaScript, Rust or Go.

Production bots have to respect rate limits. Hyperliquid documents both per-IP request limits and address-based limits that scale with your trading activity, plus weight-based costs that make heavier requests “cost” more (Hyperliquid Docs — Rate limits and user limits). The practical implications:

  • Prefer WebSocket over polling. Subscribing to a stream is far cheaper than hammering the Info endpoint in a loop.
  • Batch and back off. Group requests where the API allows it, and add exponential backoff so a burst does not get you throttled.
  • Verify the exact numbers. Limits change over time, so read them off the official rate-limits page at build time rather than trusting a secondary blog (Hyperliquid Docs — Rate limits and user limits).
Numbers change — cite the source
Exact rate-limit thresholds, agent-wallet counts and SDK requirements are versioned and can move. This guide stays deliberately qualitative on the specifics; treat the Hyperliquid — official documentation as the single source of truth before you commit capital.

How to Start Building a Bot or Strategy

A realistic first path from zero to a live, self-custodial bot:

  1. Fund a Hyperliquid account. You need on-chain USDC in your own wallet on the exchange — this is the account the API will read and trade.
  2. Approve an agent wallet. Generate and authorise an API/agent key so your code can sign Exchange requests without ever holding withdrawal rights.
  3. Read with Info / WebSocket. Start by pulling market data and your positions — no money at risk — until the data flow is solid.
  4. Place test orders via Exchange. Use small sizes (or post-only / far-from-mid limit orders) to confirm signing, fills and cancels work as expected.
  5. Add risk controls before scaling. Position caps, max leverage, kill-switches and drawdown limits belong in the code from day one, not after the first bad day.

From there, the strategy is the hard part — not the plumbing. See algorithmic trading in crypto for the strategy families (market making, arbitrage, grid, trend, mean reversion) and quant trading in crypto for the research-to-live workflow that turns an idea into something worth running. For the bot landscape end-to-end, see crypto trading bots.

The API is a tool, not an edge
A clean API and an official SDK make execution easy. They do not make a strategy profitable — that comes from your logic, configuration and risk discipline, and backtests rarely survive contact with live markets untouched.

The Takeaway

The Hyperliquid API gives builders a complete, non-custodial trading surface: an Info endpoint to read, an Exchange endpoint to trade, a WebSocket for real-time data, agent wallets that trade but never withdraw, an official Python SDK, and documented rate limits. That combination is what makes self-custodial bots and quant strategies practical on Hyperliquid.

Where Dexly fits

To be clear about what it is not: Dexly is not the API and not a trading bot. It is a non-custodial front-end built on the same Hyperliquid exchange. If you write code, build directly on the API with the Python SDK and agent wallets. If you do not, Dexly is the no-code counterpart — trade manually from your own wallet, or use copy trading to mirror a human leader through the same agent-wallet mechanism, with per-follow risk caps and drawdown protection. Either way your funds stay self-custodial, on web or the mobile app.

Educational content only — not investment advice. Automated trading carries risk and bots can lose money; past or backtested performance does not predict future results. API endpoints, rate limits, agent-wallet limits and SDK requirements change — verify everything against the official Hyperliquid documentation before building or trading. Facts verified 2026-06-30.

Risk Warning: Trading perpetual futures involves significant risk of loss. Only trade with capital you can afford to lose. Dexly is a non-custodial interface; you are responsible for your own funds and trading decisions.

Frequently Asked Questions

Ready to trade?

Trade Hyperliquid on Dexly

Perps, spot, copy & prediction markets in one fast, non-custodial app. Get Dexly on iOS & Android and start in seconds.

The Hyperliquid API: A 2026 Guide for Bots & Quant Traders - Learn | Dexly