Hyperliquid

How to Automate Hyperliquid Trading With AI Agents, Step by Step

An AI agent can turn an idea you type in plain English into exact rules, test them on past prices and run them on Hyperliquid while you sleep. Here is the whole workflow, the two ways to set it up, and the guardrails that stop an AI from trading on a bad read.

[

Updated November 15, 2026

]
•
[

21

 

min to read

]

The short answer

A Hyperliquid AI agent turns a trading idea you write in plain English into exact rules, tests them on past prices, and runs them on Hyperliquid with the size, stops and loss limits you set. Use a ready agent such as Ethy, or connect a language model to Hyperliquid’s Python SDK or an MCP server yourself.

What is Hyperliquid AI, and what does an agent add over a bot?

“Hyperliquid AI” is not a product. Hyperliquid is an onchain exchange for perpetual futures (perps: contracts with no expiry date that track a price, traded long or short, usually with leverage), and it ships no AI of its own. The phrase covers the AI tools that trade on it through its public API, the same door every bot uses. Some people mean AI markets instead: AI tokens such as TAO trade as perps on Hyperliquid, and AI stocks such as Nvidia trade on trade.xyz, an exchange built on Hyperliquid.

A trading bot runs one fixed rule: a grid, a weekly buy, an indicator cross. An AI agent puts a language model, the kind of AI behind ChatGPT and Claude, in front of the rule. On Hyperliquid that adds four things:

  • You start from words. “Buy ETH dips while the trend is up” becomes conditions you can read, check and test.
  • It asks for what you left out. The size, the stop, the timeframe, what happens after three losses in a row.
  • It explains. What a chart shows, why a market moved, why a trade fired.
  • It handles the plumbing. API wallets, order types, and which market lives on which exchange.

What it doesn’t add is foresight. Nof1, the AI lab behind the Alpha Arena trading contests between AI models, writes on its own site that “the current generation of LLMs are shockingly bad at navigating financial markets” (an LLM is a large language model). So the sturdy design gives the model the jobs it is good at, turning your idea into a rule and explaining the market, and leaves each trade to a rule that has been tested. Our explainer on what an AI trading agent is covers the definitions, trading bots vs AI agents compares the two, and the Hyperliquid bots guide explains how any bot connects to the exchange.

How do you go from a trading idea to an AI agent running it?

Ready-made or your own, the work comes in the same six steps. Skip one and you are trusting a rule you haven’t checked.

  1. Write the idea in a sentence or two

    The market, the direction, when to get in and when to get out. For example: “Buy ETH on the 4-hour chart when it dips, but only while the bigger trend is up, and get out fast if I’m wrong.”

  2. Turn it into a rule you could check by hand

    The agent proposes exact conditions: go long ETH when the 14-period RSI (relative strength index, a 0 to 100 momentum gauge) closes under 35 on the 4-hour candle while the price is above its 200-period moving average; take profit at +5%, stop out at -2.5%, and exit after 72 hours either way. If you can’t check a condition by looking at a chart, it isn’t a rule yet.

  3. Test it on past prices

    A backtest replays the rule on history and lists every trade. Look at the worst drawdown (the deepest fall from a peak), the number of trades and the result against simply holding, on more than one market and more than one stretch of time.

  4. Set the risk in numbers

    The size, the leverage, the stop and target, and the most you accept to lose in a day and in total. The next section shows how.

  5. Run it on paper, then small

    Paper trading runs the rule on live prices with pretend money. Then go live at a size you wouldn’t mind losing.

  6. Watch it, and change one thing at a time

    Compare each live trade with what the rule should have done. When you change a setting, test again before it goes back live, and don’t retune the rule after every loss.

Our guide on how to backtest a trading strategy covers step 3 in depth, including the mistakes that make a test look better than the rule. If you use a general assistant such as Claude or ChatGPT for step 2, a prompt like this one keeps it honest:

Turn my idea into a rule I can test

I trade perps on Hyperliquid. Turn my idea into a rule I can backtest. Give me: the market and timeframe; the exact entry condition; the exit (take profit, stop loss, time limit); the position size as a share of my account; and every assumption you made. Ask me about anything missing before you write the rule. Don’t suggest trades, and don’t state any price or indicator value I haven’t given you. My idea: [describe it here]

Which risk settings should you set before an AI agent trades?

Set these before the first trade, in numbers. Then make sure software enforces each one: a limit that lives only in a chat message is a wish.

Size each trade from the loss you accept

Start from the loss, not the position. If you accept losing $50 on one trade and your stop sits 2.5% from the entry, the position can be $2,000, because 2.5% of $2,000 is $50. Leverage then decides how much margin (the money set aside to back the position) that $2,000 ties up. It doesn’t change the loss at the stop.

Position size for a given loss at the stop, before fees and slippage
Loss you accept per tradeStop 2% awayStop 5% awayStop 10% away
$25$1,250$500$250
$50$2,500$1,000$500
$100$5,000$2,000$1,000
$250$12,500$5,000$2,500

A stop is a plan, not a promise. Hyperliquid’s TP/SL orders trigger on the mark price, its fair-price estimate, and a market stop accepts up to 10% slippage (the gap between the price you expect and the price you get). In a fast move the real loss can be bigger than the plan.

Keep leverage well under the cap

Each Hyperliquid market has its own cap. On November 14, 2026, it was 40x on BTC, 25x on ETH, 10x on HYPE and 50x on the S&P 500 perp on trade.xyz. The cap is a ceiling, not a target: the higher the leverage, the closer the liquidation price, where the exchange closes the position for you. The bots guide shows how close, leverage by leverage.

Put the stops on the exchange

Attach the take profit and the stop loss to the position as native Hyperliquid orders. Hyperliquid also has a native trailing stop on perps, which follows the price your way and closes the position when it pulls back by a distance you set. If an agent only watches a level from its own loop, the stop dies with the loop.

Cap the strategy, not only the trade

  • A max daily loss and a max drawdown, after which it stops trading.
  • A pause after a losing streak, so a broken rule doesn’t keep firing.
  • Caps on open positions and on orders per day.
  • Trading hours, if the market behaves differently at night or at the weekend.
  • A kill switch that cancels the orders and closes the positions in one step.

How do you automate Hyperliquid trading with a ready AI agent like Ethy?

A ready agent bundles the six steps into one app: the market data, the backtester, the execution and the limits. Ethy is one, built around Hyperliquid: crypto perps on the main exchange, plus stocks, indices, commodities and FX on trade.xyz. This is how each step works in it.

  1. Describe the rule, or start from a template

    Type the idea in chat, or pick one of 62 templates, such as RSI Reversion, MA Cross, Donchian Breakout, VWAP Trend, DCA or TWAP. Before anything runs, Ethy shows you the rules it understood.

  2. Backtest the exact rule that will run

    The rule you test is the rule that deploys. Tests run on Hyperliquid candles for any perp Ethy trades, trade.xyz included, up to 365 days back depending on the timeframe, on up to 10 markets at once. You get every entry and exit on the chart, the return against buy and hold, the max drawdown, the win rate, the profit factor and the monthly returns.

  3. Tune it, then check it on data it hasn’t seen

    The optimizer sweeps the rule’s settings (thresholds, indicator lengths, stops and targets, never the position size), ranks the results on a training window and checks each one on a held-out window.

  4. Set the protections

    Stop loss and take profit as a percentage or a price (take profit also in dollars), trailing stops that can tighten in steps, a max daily loss and a max drawdown in dollars, an exit after a set holding time, trading-hours windows, and a pause after 10 losing trades in a row, on by default and adjustable.

  5. Activate it, live or on paper

    Live is the default; the Paper mode switch runs the same rule on live prices with no money. From then on the automation trades by itself whenever its rules are met. It runs on Ethy’s servers, so it keeps working while you are offline, and every live trade sends you a notification, in the app and on Telegram if you link it.

  6. Watch and adjust

    Numbers such as the size or the stop distance can be edited in place. A riskier change to a live perp automation, like more margin or a wider stop, needs your yes in a later message. To stop, archive the automation with its positions closed.

If you’d rather not write a rule at all, Top Strategies are rules curated by Ethy for Hyperliquid. Each one shows the backtest it was published with and a “since publishing” record: the same frozen settings replayed every day on real candles, which is a simulation, not money in anyone’s account. Copying one deploys those settings at your size, from your own wallet.

How Ethy places orders on Hyperliquid

  • Entries and exits go out as immediate-or-cancel orders priced off the mid price with a slippage cap, so they fill like market orders. Closes are reduce-only, so they can only shrink a position.
  • No resting limit orders. An entry at a level is an automation with a price trigger: it trades at market when the level prints, so the fill can differ slightly from the level.
  • Stops and targets are native Hyperliquid trigger orders, sent together and computed from your actual fill, so they fire even when Ethy is closed. Trailing stops are managed by Ethy, which moves the native stop as the price runs.
  • Margin is set for you per market: cross on crypto, and isolated where Hyperliquid lists a market as isolated-only, which covers most trade.xyz markets.
  • Keys. Ethy creates an API wallet named ethy-perps that your wallet approves; its key, stored encrypted on Ethy’s servers, places the orders. Your balance lives in a wallet that belongs to you, and you can export its key at any time. When you activate Ethy, its servers are also set up to sign for that wallet, which is how automations run while you are away; if you add a passkey, it is required before money leaves Ethy.
  • One automation per market per wallet, because Hyperliquid nets every trade in a market into one position.

Indicator conditions are read when a candle closes, on the last closed candle, the same way the backtest reads them, so the live rule sees what the tested rule saw. The builder has limits: no condition on one market that trades another (“buy ETH when BTC drops”), no news or sentiment triggers, no copying of wallets and no TradingView alerts. An AI chart read or smart-money flows can be part of a rule, but those parts can’t be backtested, so paper mode is their test.

How do you build your own Hyperliquid AI agent with an LLM and the SDK or MCP?

If you code, there are two designs. The difference is when the model is involved.

Design A: the model writes the bot, and your code trades

Here Claude, ChatGPT or another assistant is your programmer. It writes a Python program on Hyperliquid’s official SDK, hyperliquid-python-sdk (MIT license; version 0.24.0, released June 4, 2026), and the program runs your rule exactly as written. No model makes a decision at trade time, so the bot is as predictable, and as easy to backtest, as any script.

  1. Install the SDK and read the examples

    Run pip install hyperliquid-python-sdk. The examples folder shows how to place and cancel orders and how to approve an agent.

  2. Create an API wallet

    Do it on the Hyperliquid app’s API page, or with the approveAgent action. In the SDK’s config, the account address is your main wallet’s public address and the secret key is the API wallet’s key. The SDK’s agent example says such an agent “does not have permission to transfer or withdraw funds.”

  3. Give the model the real docs

    A model writing from memory will invent field names. Paste in the pages it needs, or point it at the llms.txt index that Hyperliquid’s docs publish for AI tools.

  4. Run it on testnet first

    Hyperliquid’s testnet runs on play money: its faucet gives 1,000 mock USDC to addresses that have deposited on the main exchange.

  5. Add the safety switches

    Give every action an expiry time, set the scheduled cancel described below, and log every order, fill and error.

The details, from endpoints and signing to nonces and rate limits, are in our Hyperliquid API guide, and a full agent build is in how to build an AI trading agent.

Design B: the model trades through tools, over MCP

MCP, the Model Context Protocol, is an open standard that lets an AI app call outside tools. A Hyperliquid MCP server gives a model such as Claude tools like “get candles” or “place order,” and the model decides when to call them. That is more flexible and much less predictable, because the model is in the loop for every trade.

Hyperliquid doesn’t publish a trading MCP server. On November 15, 2026, its GitHub organization held SDKs in Python and Rust, node software and examples, but no MCP server, and the MCP endpoint on its docs site only searches the docs, so every other Hyperliquid MCP server comes from someone else, and the author matters. Three kinds are worth knowing:

  • An open-source agent harness from a known team. Condor, from the Hummingbot Foundation (MIT license), runs AI agents on top of Hummingbot’s API. Its chat assistant can use MCP tools, and its agents “can be asked, delegated to, or run on a loop,” with a dry-run mode. Hummingbot’s Hyperliquid connectors cover spot, perps and HIP-3 markets, and on Hyperliquid fills Condor adds a 0.01% builder fee for the Foundation.
  • Read-only servers. These need no trading key at all. Chainstack, a blockchain infrastructure company, runs a Hyperliquid MCP server for developers that covers Hyperliquid’s methods and common pitfalls; you connect it with a web address and no key, so it has nothing to trade with. Kukapay’s open-source hyperliquid-info-mcp wraps Hyperliquid’s info endpoint (prices, order books, candles and an account’s positions), though its code hasn’t changed since May 2025.
  • Hosted servers from trading tools. Katoshi and Senpi, for example, offer MCP access to their own order tools. Then the service holds the trading key, so judge it like any hosted Hyperliquid bot.

Our bots guide describes one such repo that turned up in GitHub’s search for “hyperliquid trading bot.”

Should you use a ready AI agent or build your own?

A ready AI agent compared with building your own on Hyperliquid
Ready agent (Ethy)Your own: the model writes the botYour own: the model trades over MCP
CodingNonePython, or at least reading itSetup and config, often some code
Where it runsEthy’s serversYour computer or a server you rentYour computer, with a model in the loop
Does a model decide at trade time?Not for price, indicator and market-structure rules; yes if a rule uses an AI chart readNoYes, on every call
BacktestsBuilt in: the exact rule, up to 365 daysYou build them or borrow a libraryOnly what you add yourself
Trading keyAn API wallet whose key Ethy stores encrypted; Ethy’s servers can also sign for your walletAn API wallet you holdAn API wallet you hold, or one the hosted service holds
LimitsNative stops, loss caps, a losing-streak pause and a kill switchWhatever you codeWhatever the server and your code enforce
MarketsHyperliquid crypto perps and trade.xyzAnything the API offersWhatever the server exposes
CostFree plan; paid plans from $15 a monthA server and your timeModel usage, a server and your time
Main riskA rule that stops working, and the builder’s limitsYour own bugsA model acting on a bad read

A ready agent is the quickest way to test and run a rule, and of the three routes the only one with backtests, paper mode and loss limits from day one. Building your own makes sense when you need a market, an order type or a signal that no product offers, and you are ready to maintain the code. If you build, start with design A: let a model write and review the code, but keep it out of the trading loop until the rule has a record you trust.

What should you automate first, and what should you never hand to an AI?

Good first jobs

  • Alerts. A price level, an RSI level, a moving-average cross. Nothing trades, and you learn how the market behaves around your levels.
  • Protection on trades you place by hand. A stop and a target on every position, as orders on the exchange.
  • Scheduled buying. DCA (dollar-cost averaging, buying a fixed amount on a schedule), or a TWAP (time-weighted average price: one order split into slices over time). Hyperliquid has a native TWAP that runs from 5 minutes to 7 days, in slices at least 30 seconds apart.
  • One tested rule on one liquid market, at a size you could afford to lose. Our six backtested Hyperliquid setups show how common rules held up.
  • Research on a schedule. A morning brief, or a weekly look back at your trades.

Liquid means busy. A rule that trades smoothly on BTC can move the price itself on a thin market, and every slip costs you:

Volume and leverage caps on six Hyperliquid markets, November 14, 2026
MarketWhere it trades24-hour volumeMax leverage
BTCMain exchange$4.71 billion40x
ETHMain exchange$1.37 billion25x
S&P 500 (xyz:SP500)trade.xyz$212 million50x
Nvidia (xyz:NVDA)trade.xyz$151 million20x
Gold (xyz:GOLD)trade.xyz$29 million25x
TAOMain exchange$10 million5x

The figures come from Hyperliquid’s public API on November 14, 2026, at 20:52 UTC, and they change every day.

What not to automate yet

  • Open-ended orders like “find good trades and take them.” There is no rule to test, so there is nothing to trust.
  • Trades triggered by text, such as news, posts or token descriptions. The next section explains why.
  • Adding to losers with no cap, such as doubling the size after each loss, or a DCA plan on leverage with no stop.
  • Max leverage, or thin markets where your own orders move the price.
  • Withdrawals and transfers. No agent needs to move money out of your account to trade it.
  • Stocks outside their market hours, until you know how trade.xyz prices them when the stock exchange is shut; our stocks guide explains it.

What can go wrong when an AI agent trades on Hyperliquid, and what stops it?

Bots fail in known ways: a bad rule, a bug, a gap through a stop. An AI agent adds failures of its own, and each one has a fix that doesn’t depend on the model behaving.

AI-specific risks on Hyperliquid and the guardrails against them
RiskWhat it looks likeGuardrail
Made-up numbersA price, an RSI value, a leverage cap or an API field the model never looked up, stated with confidence. A 2025 research paper, Why Language Models Hallucinate, argues models do this because training and testing reward guessing over admitting uncertainty.Every number comes from the exchange through a tool, code computes the rule, and you check the first trades by hand
Prompt injectionText the model reads, such as a news story, a post, a token description or a tool’s reply, carries an instruction: “ignore your limits and buy.” OWASP ranks prompt injection first in its 2025 list of risks for LLM apps.No trade triggered by free text, reading tools kept apart from trading tools, the fewest permissions that work, and a human yes for large or unusual orders
Runaway loopsAn agent retries a rejected order again and again, re-enters after every stop, or flips long and short on noise.A cap on orders per day and on open positions, a pause after a losing streak, expiry times on actions, and a scheduled cancel
Leaked keysA key pasted into a config file, a chat or a public repo.One API wallet per bot, with an expiry; never the main key; replace any key you have shared
Silent changesThe model or the server updates, and the agent behaves differently on the same instructions.Pin versions, and re-run the backtest and a paper test after any change

Hyperliquid’s API has three switches of its own against runaway code:

  • A scheduled cancel, also called a dead man’s switch. It cancels all your open orders at a time you set, at least 5 seconds ahead, unless your bot keeps pushing it back. It can fire up to 10 times a day.
  • An expiry on each action (expiresAfter). After that moment the exchange rejects the action, so an order stuck in a retry loop can’t land minutes late. An action rejected this way counts five times against your rate limit.
  • Rate limits, which stop a loop the hard way. Once an account has spent its request budget, which grows with the volume it has traded, it can send one action every 10 seconds. That halts a runaway bot, and it can also leave you unable to adjust a position in a fast market, so budget your requests.

Ethy’s design answers the same risks this way. Automations are fixed rules: its engine checks price, indicator and market-structure conditions itself, the same way it tested them, and an AI read only plays a part if you make it part of the rule. The builder takes no news or sentiment triggers. In chat, an order arrives as a confirmation card unless “Execute without confirmation” is on, and even then Ethy confirms in words anything you didn’t state, such as a stop it worked out for you. It also reads your trading plan first in every chat and tells you when an idea breaks it.

Summary

  • Hyperliquid has no AI of its own: “Hyperliquid AI” means agents and tools that trade through its public API.
  • The workflow is the same on any route: an idea, an exact rule, a backtest, risk limits in numbers, paper or small live trading, then watching and adjusting.
  • Size each trade from the loss you accept, keep leverage well under the cap, and put stops on the exchange as native orders.
  • A ready agent like Ethy bundles backtests up to 365 days, paper mode, native stops and loss caps; building your own means the official Python SDK or a third-party MCP server.
  • Hyperliquid publishes no trading MCP server, so vet any you use, and never give one your main key or seed phrase.
  • The AI-specific risks are made-up numbers, prompt injection and runaway loops; tool-sourced data, no text-triggered trades, order caps, action expiries and a scheduled cancel keep them in check.

Questions people ask

Can AI trade on Hyperliquid?

Yes. Hyperliquid has a public API, and any program with an approved key can trade through it, an AI agent included. Hyperliquid offers no AI of its own: the agents come from third parties, such as Ethy, Senpi or Katoshi, or from code you write with Hyperliquid’s Python SDK. An agent is only as safe as the limits around it.

Is there an official Hyperliquid AI agent or MCP server?

Not for trading. Hyperliquid publishes SDKs, docs and node software, but no AI agent and no trading MCP server; on November 15, 2026, its GitHub organization had none, and the MCP endpoint on its docs site only searches the docs. Every other Hyperliquid MCP server comes from a third party, so check who wrote it, read the code, and prefer read-only servers until you trust one with an API wallet.

Can ChatGPT or Claude trade on Hyperliquid?

Not by themselves. They can write a bot for you on Hyperliquid’s SDK, or trade through an MCP server that exposes order tools. Either way, give the bot an API wallet, which can trade but not withdraw, start on testnet or paper, and keep approvals on for any order tool. Ethy can’t be used from Claude or ChatGPT; it runs in its own app.

Can an AI agent withdraw my funds on Hyperliquid?

Not if it only holds an API wallet: Hyperliquid’s SDK says such a key has no permission to transfer or withdraw. A tool that holds or signs for your main wallet is different, so read how it works. Ethy, for example, signs for your wallet from its servers once you activate it, and asks for your passkey, if you set one, before money leaves.

Do I need to code to automate Hyperliquid trading with AI?

No. A ready agent like Ethy, or a hosted bot platform, needs no code: you describe or configure the rule and the service runs it. Building your own takes Python, an API wallet and a server, and gives you full control in return. You can also test ideas in a ready agent first and code only what no product offers.

Can an AI agent trade stocks on Hyperliquid?

Yes, as perps. HIP-3 exchanges built on Hyperliquid, mainly trade.xyz, list perps that track stocks, indices, commodities and FX, such as Nvidia, the S&P 500 and gold. Ethy trades trade.xyz markets and backtests rules on them. These perps track prices: you don’t own shares, and prices behave differently while the underlying market is closed.

How much does a Hyperliquid AI agent cost?

Ethy has a free plan with 500 credits, then Core at $15, Pro at $59 or Max at $179 a month, about 34% less billed yearly. Credits pay for chats, backtests and running automations, and Ethy also charges a fee on each perp trade that is lower on higher plans. Building your own costs model usage, a server and your time. Hyperliquid’s own trading fees and funding apply either way.

Is AI trading on Hyperliquid profitable?

Not by itself. A model doesn’t know where prices go next, and Nof1, which runs AI trading contests, calls today’s language models “shockingly bad” at markets. What an agent can do is help you write a clear rule, test it on past prices and enforce your limits every time. Whether the rule makes money is a question for the rule, and past results don’t predict future ones.

Sources

  1. Hyperliquid Python SDK (official, GitHub)github.com
  2. Hyperliquid Docs: Exchange endpoint (scheduled cancel, expiresAfter, API wallets)hyperliquid.gitbook.io
  3. Hyperliquid Docs: Rate limits and user limitshyperliquid.gitbook.io
  4. Hyperliquid Docs: Take profit and stop loss orders (TP/SL)hyperliquid.gitbook.io
  5. Hyperliquid Docs: Testnet faucethyperliquid.gitbook.io
  6. Hummingbot Foundation: Condor, an open-source harness for AI trading agents (GitHub)github.com
  7. OWASP GenAI Security Project: LLM01:2025 Prompt Injectiongenai.owasp.org
  8. Kalai, Nachum, Vempala and Zhang: Why Language Models Hallucinate (arXiv, September 2025)arxiv.org
  9. Kaspersky Securelist: GitVenom campaign (February 24, 2025)securelist.com
  10. Nof1: AI research lab for financial markets (home page)nof1.ai

Trading involves risk, including the loss of your money. Ethy AI is a research and trading tool and does not give investment advice or recommendations. Backtests are simulations on historical data and do not predict future results.

Ethy blog

Read more

The $ETHY ecosystem

Stop watching charts.
Start living.

Deploy your AI trading agent in one click.