AI Agents On Hyperliquid
Hyperliquid's architecture is built for programmatic trading — zero gas fees, sub-second execution, self-custody, and a rich API. Here's how agents and bots trade on-chain.
Why Hyperliquid Is Built For Agents
Hyperliquid is one of the most agent-friendly trading venues in crypto, and the architecture explains why. The fully on-chain central limit order book means every order matches in price-time priority with full transparency — no hidden matching engines, no off-chain execution. Sub-second block times (roughly 0.2 seconds median) give agents fast feedback loops. And critically, there are zero gas fees for placing, canceling, or modifying orders — a market-making bot that sends thousands of orders per day pays nothing in gas.
Self-custody is another key advantage. Funds never leave the user's control. The agent wallet delegation model means a bot can trade on behalf of an account without ever having withdrawal access. If the bot is compromised, the worst case is unauthorized trades — not stolen funds. No KYC is required, so agents can be deployed instantly by connecting a wallet.
The platform supports rich native order types that bots can leverage directly: limit, market, stop-loss, take-profit, scaled orders (multiple limits across a price range), and TWAP (splits large orders into 30-second sub-orders to minimize market impact). All of these execute natively on-chain, not through a frontend abstraction.
The API And SDKs
Hyperliquid exposes three API surfaces. The REST Info API handles read-only queries: market data, order book snapshots, account state, funding rates, and historical candles. The REST Exchange API handles writes: placing and canceling orders, adjusting leverage, and transferring funds. The WebSocket API provides real-time streams for order book updates, trades, account fills, and candle data — essential for any latency-sensitive strategy.
The official Python SDK (hyperliquid-python-sdk on GitHub) wraps the full API and handles ECDSA signing automatically. There's also an official Rust SDK for performance-critical applications, plus community-maintained TypeScript SDKs. CCXT, the popular multi-exchange trading library, has full Hyperliquid support in Python, TypeScript, PHP, C#, and Go — so if you already run strategies across multiple exchanges, you can add Hyperliquid with minimal code changes.
Rate limits are volume-based rather than purely request-count-based: you get 1 request per 1 USDC traded cumulatively, plus an initial buffer of 10,000 requests for new accounts. Batching is efficient — up to 39 orders in a single request count as weight 1. For production bots, the public RPC rate limit of 100 requests per minute is a constraint; serious deployments should use private RPC infrastructure from providers like Chainstack, Dwellir, or QuickNode.
Agent Wallets And Security
The security model for bots on Hyperliquid centers on agent wallets. From the Hyperliquid UI, you generate an API wallet (agent wallet) that can place and cancel orders on behalf of your main account but cannot withdraw funds. This is the key security primitive — your bot never touches the withdrawal key.
All Exchange API requests are signed with ECDSA using the agent wallet's private key. The SDKs handle this automatically. When placing orders, you specify your main wallet's public address as the account, so the exchange knows which account the agent is acting on. Best practice: create separate agent wallets per strategy or bot instance to isolate nonce management and make auditing easier. You can rotate agent keys without moving funds.
Builder Codes — Monetize Your Agent
If you build a trading bot, frontend, or agent that routes orders for users, Hyperliquid's builder code system lets you earn fees on every order. Builder codes are an on-chain, per-order attribution mechanism — you attach your code to each order your agent places, and you earn up to 0.1% (10 basis points) on perps and up to 1% (100 basis points) on spot per fill.
The requirement is minimal: 100 USDC in your Hyperliquid perps account. Builder fees accumulate in your account and can be claimed through the referral reward system. Over 176 builders are currently using builder codes, generating over $40 million in total builder code revenue. Roughly 40% of Hyperliquid's daily active users now trade through third-party frontends and agents.
For agents that onboard new users, the referral system complements builder codes. A referral code gives the referred user a 4% fee discount on their first $25 million in volume, and the referrer earns 10% of that user's trading fees for their first $1 billion in volume. This creates a direct incentive for agents to help users save on fees while earning revenue from the flow they generate.
Vaults — Let Agents Manage Capital
Hyperliquid's vault system lets agents manage pooled capital on-chain. A vault leader creates a vault, and depositors share proportionally in the P&L. The vault leader (or their authorized agent wallets) executes the trading strategy. Depositors get transparent, on-chain accounting of every trade.
Vault leaders earn 10% of total profits as a management fee. Multiple agent wallets can be delegated to trade on behalf of a single vault, enabling sophisticated multi-strategy setups. The system is fully composable with HyperEVM — smart contracts can interact with vaults via CoreWriter, enabling automated deposit/withdrawal logic, rebalancing, and risk management.
The protocol's own vault, HLP (Hyperliquidity Provider), demonstrates the model at scale: it manages hundreds of millions in TVL, runs automated market-making strategies across all major perp pairs, handles liquidations, and has generated roughly $122 million in lifetime P&L.
Notable Agent Projects
The agent ecosystem on Hyperliquid is growing rapidly. Hummingbot, the open-source algorithmic trading framework, has dedicated Hyperliquid connectors for both spot and perps and is sponsored by the Hummingbot Foundation. Katoshi AI offers a no-code platform where users create and deploy AI trading agents using natural language descriptions. Hyperbot provides AI-powered whale tracking and copy-trading via web and Telegram.
For developers building from scratch, Chainstacklabs maintains an open-source reference trading bot on GitHub, and there are ML-based implementations (LSTM models for Bitcoin trading) available as starting points. The barrier to building and deploying a trading agent on Hyperliquid is as low as it gets — connect a wallet, generate an agent key, and start sending orders.
Related Explainers
Adjacent guides that deepen the same Hyperliquid topic cluster for crawlers, agents, and human readers.
Hyperliquid Developer Resources: Building Bots, Agents & Tools
Everything you need to build on Hyperliquid — SDKs in Python, Rust, TypeScript, and more. API endpoints, block explorers, analytics dashboards, and a curated list of community tools and resources.
Hyperliquid Referral Codes: How to Save on Fees
Use a Hyperliquid referral code to get a 4% discount on trading fees. Learn how the referral system works, how to create your own code, and how discounts stack with staking tiers.
Getting Started On Hyperliquid
From zero to your first trade in under 5 minutes. Connect a wallet, bridge USDC, and start trading perpetual futures with no KYC, no brokerage account, and the lowest fees in DeFi.
Frequently Asked Questions
Ready to apply this knowledge?
Join the fastest decentralized trading venue and start trading with precision.