Claude trading bot

How to build a trading bot with Claude

Connect Claude to Keel and it can build a crypto trading bot from your description and backtest it on real Hyperliquid data. Keel is a strategy builder for Hyperliquid perpetuals: Claude picks the building blocks and runs the tests, and the strategy you approve runs on a schedule from your own account. Claude never places a trade itself.

By Keel Research Team
Updated October 18, 2026
Or set it up directly
Claude
Add to Claude
  1. 1Open Keel in the Claude directory, or search for Keel under Customize → Connectors
  2. 2Choose Connect
  3. 3Sign in or sign up on the Keel page that opens (no account needed beforehand)

Sign in in the browser when asked. No API keys. Connect → sign in to Keel → Allow

Or add it by URL
  1. 1Customize → Connectors → Add custom connector
  2. 2Paste https://mcp.usekeel.io/mcp and choose Connect
  3. 3Sign in or sign up on the Keel page that opens (no account needed beforehand)
Keel MCP endpoint
https://mcp.usekeel.io/mcp
Check it worked

Two ways to tell, and either one settles it. A connection that is already live is not improved by signing in again.

In Claude Keel shows as connected once the sign-in has finished (Customize → Connectors, then search for Keel).

Ask the agent keel_account_status answers with the Keel account the session is signed in as, which nothing but a live connection can return. If the agent says it has no Keel tools, the sign-in did not finish.

Prompt
Use keel_account_status and tell me which Keel account this session is signed in as.

Not yet verified against a Claude version. These steps follow Anthropic's own documentation, read on 2026-09-16.

Ask AI about Keel
Other ways to connect
Every client, step by step
Example conversation
Claude + Keel
  1. YouI want a simple trend bot on the big coins. Hold a coin while its 20-day moving average is above its 50-day one, otherwise stay out. Check once a day. Can you build it and backtest it?
  2. ClaudeKeel's library already has this one, so I'll start from it instead of building from scratch: MA Crossover (Golden Cross) Strategy. It holds a fixed basket of large Hyperliquid coins at equal weight, long only, and checks once a day using 20- and 50-day exponential moving averages. Its published backtest, Aug 2024 to Sep 2026, after fees, slippage and funding: Sharpe 1.05, +130.9% total return, a worst drawdown of 30.4% and 54 trades. That is not many trades, so I wouldn't lean on the Sharpe ratio alone.
Before you start

What Claude is good at, and what it needs help with

Claude is good at turning a loose idea into precise rules. Tell it you want to follow trends in the big coins without getting chopped up when the market goes sideways, and it asks the questions a careful trader would: which coins, what counts as a trend, how often to check, how much to put in each position, when to get out.

What Claude can't do on its own is find out whether those rules would have made money. In a plain chat it has no price history and nowhere to run anything. Ask it for a backtest and you get Python to run yourself, or a description of results nobody computed. The code still needs data, a fee model and funding payments before it means anything, and a made-up backtest is worse than none because it looks like evidence.

Connecting Claude to Keel closes that gap. Keel gives Claude a set of tools over MCP, the standard way assistants use outside software. With them Claude can search Keel's building blocks, save a strategy to your account, start a backtest on Keel's engine and read the result back. The numbers in the chat come from the engine, and you can open every run in the Keel app.

Claude for trading

Trading with Claude

Some people paste in charts and ask Claude for a market read, or ask it to write a Python bot. What holds up is having Claude design a strategy as rules and testing those rules on real history before any of them trade.

Claude is careful with reasoning and good at asking what you mean, which suits the design step. It is no better than anyone else at guessing tomorrow's price, so treat any market call it makes as an opinion. Through Keel it does the part it is good at: it builds the strategy, runs the backtest and explains what the numbers say.

You may also see Claude bots for prediction markets. Keel doesn't trade prediction markets. It builds and runs strategies on Hyperliquid's crypto perpetual futures, so a Claude bot built here trades perps.

Step by step

Build your first bot with Claude

Six steps. The first takes a couple of minutes once. After that, an idea goes from a sentence to a tested strategy in one conversation.

  1. 01

    Connect Claude to Keel

    Keel is in Claude's connector directory. Open Keel in the Claude directory, or search for Keel under Customize → Connectors, then choose Connect. A Keel page opens: sign in, or create a free account right there. This works in Claude on the web, the desktop app and your phone, and the Claude guide walks through each screen.

  2. 02

    Describe the idea in your own words

    Say what to buy or short, when to get in and out, how big each position should be and how often to check. Plain sentences are fine. If you don't have an idea yet, ask Claude to show you Keel's strategy library and start from one of those.

  3. 03

    Let Claude build it

    Claude searches Keel's 262 building blocks, reads the settings of the ones it needs and writes the strategy. Keel checks every connection when the strategy is saved. If a block doesn't fit, the save is refused and Claude fixes it, so what you get is a strategy that can actually run.

  4. 04

    Backtest it on real data

    Ask Claude to run it. Keel's engine replays the strategy over Hyperliquid price and funding history and charges fees and slippage on every trade. Claude reads back the return, Sharpe ratio, worst drawdown and number of trades, and can list the positions behind a good or bad month.

  5. 05

    Change one thing at a time

    Ask for a version with one setting changed and a side-by-side comparison. Every version is saved, and each backtest stays tied to the version it ran on, so you can always go back. Changing several things at once makes it hard to know which change did the work.

  6. 06

    Review it, then run it

    Claude gives you a link to the strategy in the Keel app. Read the blocks there and paper trade it on live prices first. When you're ready, connect your Hyperliquid account and start it. Claude can't start it for you, and Keel can place trades in your account but can never withdraw.

An example

What the conversation looks like

A shortened conversation built on a strategy from Keel's public library. Every figure Claude quotes is the library's published result, which is what Keel's tools hand back when Claude reads a library entry.

Example conversation
Claude + Keel
  1. YouI want a simple trend bot on the big coins. Hold a coin while its 20-day moving average is above its 50-day one, otherwise stay out. Check once a day. Can you build it and backtest it?
  2. ClaudeKeel's library already has this one, so I'll start from it instead of building from scratch: MA Crossover (Golden Cross) Strategy. It holds a fixed basket of large Hyperliquid coins at equal weight, long only, and checks once a day using 20- and 50-day exponential moving averages. Its published backtest, Aug 2024 to Sep 2026, after fees, slippage and funding: Sharpe 1.05, +130.9% total return, a worst drawdown of 30.4% and 54 trades. That is not many trades, so I wouldn't lean on the Sharpe ratio alone.
  3. YouHow does a faster pair do, 10 and 30 days?
  4. ClaudeThe library tested that setting on the same coins and dates: Sharpe 1.02, +121.1% total return, a worst drawdown of 40.9% and 99 trades. So the faster pair makes more trades, with a deeper worst drawdown and a lower Sharpe (1.02 against 1.05). Which one suits you depends on how much drawdown you can sit through. Want me to copy both into your account?
  5. YouYes, copy both.
  6. ClaudeDone. The strategy is in your Keel account with both settings saved as versions, and I've started a fresh backtest of each so the results are your own runs. Here is the link to open them in the Keel app.
The result Claude quoted first
Aug 2024 to Sep 2026
MA Crossover (Golden Cross) Strategy
EquityDrawdown
Sharpe
1.05
Total return
+130.9%
Worst drawdown
−30.4%
Trades
54

Notice where the numbers come from. Claude didn't estimate the first result. It read it from the library entry. It didn't guess how the faster pair would do either. The library had tested that setting, and Claude said so. When you ask for something nobody has tested yet, Claude starts a backtest and waits for the engine.

Notice what Claude did not do. It didn't place an order or start anything on your account. It saved strategies and ran tests. Starting one is a step you take in the Keel app after reading it.

See this strategy, its monthly returns and every setting tested
What to ask

Requests that get good results from Claude

Claude does best with a specific request and one change at a time. These map straight onto Keel's tools.

Start from the library

"Show me Keel's library strategies that trade BTC and ETH, with their backtests, and explain each in two sentences."

Build from a sentence

"Build a strategy that buys the strongest coins over the last month, rebalances weekly and caps any coin at 20 percent. Backtest it."

Ask why

"Show me the positions from my strategy's worst month and tell me what went wrong."

Compare versions

"What changed between the last two versions of my strategy, and how do their backtests compare?"

Keep notes

"Add a note to this strategy saying why I chose the slower setting." Claude reads the note back in a later chat, so you don't have to explain the strategy again.

Check your usage

"How many backtests do I have left?" Claude reads it from your Keel account.

Claude or Claude Code

Which Claude to use

Claude in the browser, the desktop app or on your phone is the easiest place to start. You add Keel once from its listing in Claude's connector directory and talk through ideas the way you would with another trader. Most people building their first bot should start here.

Claude Code runs in your terminal. It connects to the same Keel server with one command and has the same 33 tools. It suits you if you already work in a terminal and want Claude working through a list of strategy changes while you do something else.

Claude Code on Hyperliquid
What you end up with

A bot that follows rules you can read

The bot you build this way is a strategy: a fixed set of blocks that decides which coins to hold and how much, on a schedule. Claude helped you write it, but Claude isn't watching the chart afterwards. That matters because a strategy behaves the same way every time, so the backtest describes the thing that will run.

Once it is live, the strategy rebalances on its schedule from your Hyperliquid account. You can pause it from the Keel app at any time, and you can ask Claude how it is doing. If you want to change it, Claude builds and tests a new version, and you decide whether to switch.

More on running a Hyperliquid trading bot
FAQ

Questions about building a trading bot with Claude

Can Claude trade crypto for me?

Not directly. Claude builds and tests the strategy, and the strategy is what trades once you start it in the Keel app. Claude never sends an order. That keeps a model's bad day from turning into a bad position.

How do I connect Claude to Keel?

Keel is in Claude's connector directory. Open Keel in the Claude directory, or search for Keel under Customize → Connectors, then choose Connect, then sign in or sign up on the Keel page that opens. No API key and nothing to install. Pasting https://mcp.usekeel.io/mcp under Customize → Connectors → Add custom connector works too.

Can Claude backtest a trading strategy?

On its own it can only write code for you to run. Connected to Keel, it runs the backtest on Keel's engine over Hyperliquid price and funding history, with fees and slippage, and reads you the result.

Do I need to know how to code?

No. You describe the strategy in words and Claude builds it from Keel's blocks. You can read the result as blocks on a canvas in the Keel app, and there is a code view if you want it.

Which markets can the bot trade?

Hyperliquid's crypto perpetual futures, such as BTC, ETH, SOL and HYPE. Stock and index perps are HIP-3 markets, and Keel doesn't support them yet. Support is coming soon.

Is a Claude trading bot safe to run?

The risk is in the strategy, not the connection. Claude can't place trades or move money. Your funds stay in your own Hyperliquid account, where Keel can trade but never withdraw. Backtest first, paper trade second, and start small.

Can Claude trade prediction markets?

Not through Keel. Keel doesn't trade prediction markets; it backtests and runs strategies on Hyperliquid's crypto perpetual futures. Claude can still help you think through a prediction market idea, but there is nothing on Keel to test or run it on.

What does it cost?

Keel's free plan includes 25 backtests every 30 days, plus 50 in your first week, and a 5 basis point fee on live trades. Paid plans start at $49 a month with more backtests and a lower fee. Your Claude plan is separate.