I Built a Polymarket Bot with Claude Code and Hermes. It Made 2.1x in 18 days.
I used Claude Code to build a Polymarket bot that trades BTC 5-minute markets. It runs on a Hermes agent, paper money only, and reports to Telegram.
Last week, I sat in a one-hour meeting with one of the largest companies in Africa.
My turn came after fifty-seven minutes.
I said three sentences, and that was the entire reason I was there.
I am a practical man, and meetings are not where I am useful.
From the day AI entered my life, I wanted one thing out of it, something that pays.
The shortest path to that is money, and that path is not short at all.
That is why I have made many attempts.
I built a crypto trading bot once using Claude Code and OpenClaw. It reached a 77.8% win rate.
Two weeks ago, I built a copy-trading bot. It was reporting to me via Slack.
It ran fine on GitHub, but GitHub wore me down, so I rebuilt it on the Hermes agent on my Mac Mini.
Paper money, of course, because I am only testing.
Funny thing, this copytrade bot is up about 50%, and only 10 days have passed.
I seriously considered selling my XRP and using the money to build this for real with the Binance API.
My attempts did not stop there. I kept hearing one name. Polymarket.

And people (apparently) make a lot of money.
So, like always, I wanted to test it myself first, with paper money.
I had Claude Code write the script and sent it to the Hermes agent running on my Mac Mini.
The bot is alive right now and reporting to me, working on paper money, but it made 2.1x in 18 days.
Let me show you how this bot (developed by Claude Code) is working first, and I’ll hand out to you the script and the agent instructions so you can build your own without doing a lot of research and building like me.
Also, let me share the logs with you so you can see what the bot is doing. Like always, I’m saving detailed logs so I can continuously analyze and improve its performance.
Here are the logs of this trading bot as csv, to see the actual trades.
You can check when this bot did what.
But first, let’s start with the fundamentals.
What Polymarket Actually Is?

Polymarket is a prediction market.
People bet on outcomes.
Will this candidate win? Will this team take the cup? Will Bitcoin close above a number by Friday?
The price of a share is the crowd’s odds.
For instance, for the World Cup winner, currently, if you bet on Spain $1 and if Spain wins, you’ll get $6.02

Most people land there for the elections or the celebrity bets.
I don’t care about the topic; I care about the outcome.
The Polymarket Bot I've Built with Claude Code and Hermes
The bot watches one thing. The BTC 5-minute window on Polymarket.

Every minute, it reads the live Up and Down prices on Polymarket and decides.
Up, Down, or sit this one out.
When one side is a clear enough favorite, the bot places a paper bet. No real money yet.
The wallet is virtual. The market data is real. These are the same prices a human sees on the screen. The bot buys, holds to settlement, and logs what happened.
Claude Code wrote the script. The Hermes agent on my Mac Mini runs it on schedule and reports to Telegram.
Same setup as my other bots. Only the market changed.
How the Polymarket Trading Bot Works?
Claude Code wrote the logic as a single loop. Every minute, the bot wakes up, looks at the open window, and runs three checks.
First, the odds.
The bot reads the live Up and Down prices on Polymarket. If one side sits far enough from 50 cents, there is a clear favorite. If both sit near 50, the crowd is split, and the bot waits.
Second, the price.
A favorite is not enough. If that side already costs 96 cents, there is no room left to win, so it skips.
Third, the timing.
One bet per window, never in the first or last seconds, held to settlement. When all three pass, the bot buys the favorite, the pricier side, for one dollar a share. A dollar back if it wins, nothing if it loses. The result lands in Telegram, and the loop starts over.
Here Are the Files
Three files. SOUL.md is the agent instructions Hermes reads. paper_engine.py is the paper-trading bot. polymarket_check_collect.sh is the wrapper that pulls market data and calls the engine every minute.
The engine does not run alone.
The wrapper feeds it the data.
Together, they are the bot.
Paper only. It never sends a real order unless you turn it on.
Download them, hand them to your agent, feed them your API key (polymarket API key is free).
Here are the files:









