Bot Development

Building a Hyperliquid Bot with AI, Part 1: Turning Trading Judgment into Code

日本語版を読む

Ink illustration of a trader turning market judgment into an automated mechanism

Could I step away from the markets for a few days, perhaps a week, and let a bot handle some of the trading?

That is the role I want my Hyperliquid trading bot to fill. I want to keep trading discretionarily while also having time to take a break. I am building something to help with that.

I started development in February 2026. By November, when I am writing this, I have gone through prototypes, live operation, revisions, and testing. There have already been periods when I was running several bots. The work toward something I can confidently leave in charge is still continuing.

This three-part series looks back at that process. In this first part, I cover the early prototype and the challenge of putting my own trading judgment into words.

Starting with a small prototype

Looking back at my February notes, the first project was a small prototype that traded on Hyperliquid according to defined conditions. It would read market data, evaluate those conditions, and place orders. It also needed to record its activity and include rules to limit losses.

That sounds brief on paper. Making each step work required decisions. When should it evaluate a setup? What should it do if a position was already open? How should it handle a change in trading direction?

In discretionary trading, these are things I decide while watching the screen. For a bot, I had to specify those decisions in advance.

From the beginning, I also had a way to check its behavior without sending real orders. I worked through those checks before handing over more responsibility.

Can I explain what I do as a trader?

One comment from a February conversation captures the experience well:

“The strategies that have kept me alive as a discretionary trader are the hardest to put into words. Working through them with Claude and turning them into code is interesting.”

A trading idea is not automatically a specification that can be implemented. What feels like one decision in my head can contain several conditions and exceptions when I try to explain it.

For example, saying “step aside when the market changes direction” is easy. Defining what counts as a change, and how long to wait, is harder. Leaving those details vague will not produce a system that makes consistent decisions. That is an illustrative example, but this kind of clarification comes up throughout bot development.

Talking with AI helped bring those vague areas into the open. I explained my intention, read the code and explanations, and clarified anything that did not match what I meant. Seeing an idea take shape was enjoyable.

There was more to learn beyond the code

I began using Claude Code and Codex CLI during development. By March, I was setting up my development environment on my Mac, managing code changes, and working on running the software on a server.

Thinking of a trade and keeping a program running were different jobs. How would I manage local changes? How would I record what had changed? Where would I check the results? There was infrastructure to build around the strategy.

Early conversations also covered how the program should identify its trading target and retrieve balances. Even with the trading rules written, I still had to verify that it was looking at the intended target correctly.

This was less exciting than coming up with a new trading idea. But it was necessary for a system that would handle my own money.

AI expanded what I could try

I could describe an idea, have code written from that description, ask about anything I did not understand, and revise it. AI gave me more ways to move from an idea to a prototype.

It did not decide what I wanted to build. How much responsibility to delegate, which behaviors would be unacceptable, and what to prioritize still required my judgment.

The interesting part was the opportunity to examine trading decisions that normally stayed inside my head. If I found something I could not explain, I had to think it through again. Building the bot also helped me organize my own discretionary approach.

From a prototype to running bots

The project eventually reached the stage of running several bots. By May, my notes already included discussions about the risks of those active bots and how they worked together.

Finishing the first prototype did not finish the project. Running it brought more questions to consider.

In the next part, I will cover operating multiple bots and the revisions and testing that followed. Turning a working system into something I could trust with more responsibility would take longer than I expected.

Continue the series

Next: Part 2

カテゴリー:Bot Development

タグ: 、

1件の返信 »

コメントを残す