Skip to content
← All notes

AI · · 1 min read

I Built an Arbitrage Bot That Never Sleeps, with Claude

It was late autumn in Tokyo. The kids were asleep, my wife was asleep, and I was alone in my study staring at the Polymarket interface at 2…

The Midnight Spark

It was late autumn in Tokyo. The kids were asleep, my wife was asleep, and I was alone in my study staring at the Polymarket interface at 2 a.m. Polymarket is a prediction market where you bet on real-world events with crypto. After weeks of observation, I noticed something: two logically related markets sometimes had contradictory prices. Could that arbitrage window be captured automatically? The idea wouldn’t let me sleep.

Claude as Co-Architect

I’m not a trained engineer. Instead of hunting for existing code, I opened Claude — not as a search engine, but as a genuine collaborator. I dumped my entire idea onto it. Claude didn’t just give me code; it helped me structure the whole system: data layer, price analysis, signal generation, order execution, risk control. Suddenly the fog cleared.

The Pitfalls

First: API rate limits. My polling was too aggressive; I switched to WebSocket for real-time price streams. Second: gas fees on Polygon. During one network congestion event, fees ate most of a small arbitrage gain — I added a minimum profit threshold filter. Third, and most subtle: market depth. Thin order books on small markets meant my order moved the price instantly. I added a liquidity depth check before execution.

Telegram Bot

Once running, I built a Telegram notification bot. My phone gets a few messages daily — mostly “scan complete, no signal.” Occasionally: “opportunity found, executed.” That second message, whether I’m with the kids or out for a jog, delivers a quiet satisfaction: a system I built, running on its own.

What I Actually Got

This bot hasn’t made me rich. It’s a running experiment — profitable, not yet at scale. The real return was the process: a deeper understanding of prediction markets, first-hand experience with automated trading systems, and a completely new appreciation for Claude — not an answer machine, but a partner that turns vague ideas into clear structures.

Posts brought over from the old site, written in March–April 2026 and kept as they were.