I Built 11 Trading Bots, Killed 9, and All I Got Was This $13 Loss
A brutally honest post-mortem on algorithmic trading with $96 and big dreams
Nikita Groshin11 min read·Just now--
Let me save you some time: this is not a story about how I turned $100 into $10,000 with a secret algorithm. This is a story about how I built eleven automated trading bots, watched nine of them die in increasingly creative ways, mistook my own forgotten Docker containers for a security breach, and ended up down 14.2% after a month of work.
But I learned things. Expensive things. And if you’ve ever thought about building your own trading bot, this might save you the tuition.
The Setup: Delusions of Grandeur
It started, as these things do, with a plan that looked great on paper.
I had $95.64 in a Hyperliquid account — a decentralized perpetual futures DEX where you can trade with leverage, pay relatively low fees, and most importantly, access everything through an API without KYC hoops. The dream stack came together fast:
- Python with asyncio for the bots themselves
- Binance WebSocket for real-time price feeds (faster than Hyperliquid’s own)
- Prometheus + Grafana for monitoring (because if you’re going to lose money, you should at least have pretty dashboards)
- Telegram for alerts (so your phone can buzz at 3 AM to tell you about losses you can’t stop)
- A VPS running Ubuntu, with everything managed through screen sessions
The architecture was, frankly, overkill for $96. I had more infrastructure than capital. But that didn’t stop me from building not one, not two, but eleven bots. Each with a different strategy. Each with its own personality and its own special way of losing money.
Here’s the roster, in order of ambition:
- Grid Bot — place buy and sell orders at fixed intervals, profit from the bounce
- Confluence Bot — combine multiple technical indicators, only trade on agreement
- Lag Arb Bot — exploit the price delay between Binance and Hyperliquid
- Funding Bot — harvest funding rate payments on perpetual contracts
- Spread Scanner — find cross-coin price discrepancies
- Scalper Bot — ride EMA 9/21 crossovers for quick profits
- Breakout Bot — detect Bollinger Band squeezes and trade the expansion
- Whale Fader — detect large Binance trades and fade them
- DCA Bot — buy dips during extreme fear
- Market Intel — aggregate 5 APIs and TA indicators into signals
- Macro Events — monitor FRED economic calendar for circuit-breaker events
Eleven bots. On $96. I want you to sit with that ratio for a moment.
Day One: The Bleeding Begins
March 21st, 2026. All bots go live at 8 AM. Equity: $95.91.
By 7:38 PM, the breakout bot has taken seven trades. It has won zero of them.
Equity: $94.60. Down $1.31. Not catastrophic. But it was a sign of things to come.
The Overnight Massacre
I went to bed on March 21st thinking “well, at least the other bots are still running.” This was a mistake.
The lag arb bot was my pride and joy from a technical standpoint. The idea was elegant: Binance processes trades faster than Hyperliquid. When a big move happens on Binance, there’s a brief window — maybe 100–300 milliseconds — where Hyperliquid’s price hasn’t caught up. Buy on Hyperliquid before it adjusts, sell after. Free money.
In theory.
In practice, the bot ran all night. It executed forty trades. Every single one was a loser.
The bot was essentially a fee-donation machine. It also had a beautiful race condition: each Binance WebSocket tick spawned an asyncio.create_task() to fire a trade. Since asyncio is cooperative, all tasks checked if self.position: return before any of them awaited. They all passed. The log showed 200+ "LAG LONG" lines per second. The actual order that went through was a SHORT from an earlier signal. Chef's kiss.
I woke up to a Telegram notification that looked like a crime scene.
Equity after the massacre: $82.30. Down $13.61 from start. In one night, one bot had vaporized 14% of my capital.
The Slow Bleed
Over the next few days, I killed bots one by one as each revealed its own fatal flaw:
The Scalper Bot used EMA 9/21 crossovers — a strategy as old as technical analysis itself. The signals were fine. The problem? Each trade needed the price to move 0.09% just to break even on fees. On SOL perpetual futures with $10 orders, the scalper needed bigger moves than it was designed to capture. It died with -$1.88 in losses and a lesson about the relationship between fees and timeframes.
The Whale Fader had a philosophical problem: what counts as a whale? I set the threshold at $500,000 in a single Binance trade. Turns out, on a market that does billions in daily volume, $500K is not a whale. It’s a dolphin. Maybe a tuna. The bot faded trades that had zero market impact, lost $0.47 in thirty minutes, and got the axe.
The Funding Bot was the most painful kill. Funding rates on perpetual futures are real — longs pay shorts (or vice versa) every eight hours. The strategy was to collect these payments. The payments were real, but they were fractions of a penny per cycle. Meanwhile, the positions the bot opened (BERA, FET, W, STX, APT) bled on price faster than funding paid. BERA alone lost $0.94 — more than all funding collected combined. Five positions ate 100% of free margin, starving the grid bot. Killed it. Net damage: -$1.83.
The Spread Scanner looked for price discrepancies between coins across Binance and Hyperliquid. It found them. They were all smaller than the fees required to trade them. -$1.50 and gone.
The Position Leak Crisis
By March 25th, my equity had stabilized around $79. Most of the bleeding bots were dead. But something was wrong.
I checked my account and found thirteen orphan positions sitting open. Tiny positions, 0.1 SOL each, scattered across my account like shrapnel from the bot wars. Each one was eating margin. Together, they were consuming almost all my available capital.
The problem was architectural. When you run eleven bots on one account and a bot crashes or gets killed mid-trade, its open positions don’t disappear. They just… sit there. Accruing funding. Eating margin. Silently bleeding.
I had no position registry. No way for one bot to know what another bot had done. No cleanup process. Just eleven independent agents all sharing one wallet with no communication.
# What I should have built from day one:
class PositionRegistry:
"""Central registry so bots don't orphan positions"""def __init__(self):
self.positions = {} # bot_id -> [positions] async def register(self, bot_id: str, position: dict):
self.positions.setdefault(bot_id, []).append(position) async def cleanup(self, bot_id: str):
"""Close all positions for a killed bot"""
for pos in self.positions.get(bot_id, []):
await close_position(pos)
self.positions[bot_id] = []
I manually closed all thirteen positions on March 25th. The realized loss from cleaning up the mess dropped my equity to $64.74 — my all-time low. Almost a third of my starting capital, gone.
The Ghost in the Machine
By early April, I’d stabilized. The grid bot was running, slowly grinding out small profits. The confluence bot was running too, though it had identified exactly zero high-confidence trade setups in three weeks of scanning (the market was too choppy for its strict criteria — which, in retrospect, means it was working correctly by not trading).
Then I noticed something odd. New positions were appearing in my account. Positions I hadn’t opened. Positions that no running bot should have created.
My first thought: security breach. Someone had my API keys. I went into full incident response mode. Changed passwords. Reviewed access logs. Checked for unauthorized API key usage. Prepared to revoke everything.
Then I ran docker ps.
CONTAINER ID IMAGE STATUS NAMES
990ae891c92a infra-bot Up 12 days infra-bot-1
4786e1229365 infra-bot Up 12 days scalper-botThe ghost in the machine was me. Weeks earlier, I’d deployed a Docker-based trading infrastructure — a funding arbitrage bot doing spot+perp pairs, a momentum scalper, plus Prometheus, Grafana, and Postgres to monitor it all. When I switched to running bots in screen sessions, I never killed the Docker containers. They’d been running silently for twelve days, opening PURR and BERA positions every five minutes, losing money, and generally haunting my account like the trading equivalent of a gas leak.
docker inspect revealed the Hyperliquid private key baked directly into the container environment variables. The .env file was also chmod 644 -- world-readable. No security breach needed. I'd left the keys on the front porch.
There was no sophisticated attacker. There was just a developer who forgot to run docker stop.
Equity recovered to $80.24 after cleaning up the Docker zombies.
What Actually Works: The Grid Bot
Through all of this carnage, one bot kept grinding: the grid bot.
The strategy is almost embarrassingly simple. Pick an asset (SOL). Pick a price range. Place buy orders at regular intervals below the current price and sell orders above it. When price bounces between levels, you collect the spread.
Over the full month, the grid bot has generated over $20 in realized profits across multiple cycles. Not per day — total. That’s about $0.70/day. At this rate, I’ll make back my losses by… May. Maybe.
But here’s the thing: it’s the only strategy that’s mathematically viable at my capital level. And it took building ten other bots to figure that out.
The Math That Should Have Been Obvious
Let me lay out the arithmetic that would have saved me a month of work:
- Grid trading (maker orders, lower fees, no urgency)
- Longer timeframe (fewer trades, bigger moves, fees become negligible)
- Not trading (the highest-Sharpe strategy available to undercapitalized retail)
The Confluence Bot: A Different Kind of Success
The confluence bot deserves its own mention. In four weeks of running, it has taken exactly zero trades. Its PnL is exactly $0.00.
I consider this a success.
The bot monitors multiple technical indicators — RSI, MACD, Bollinger Bands, volume profile, and a few others. It only trades when a supermajority of indicators agree on direction with high confidence. In a choppy, directionless market, that agreement never came.
This is the bot equivalent of a doctor who says “I don’t know, let’s run more tests” instead of prescribing random medication. It’s not exciting. It doesn’t make good content. But it didn’t lose money, which puts it in the top 20% of my bots by performance.
The best trade is often no trade. I wish I’d understood that before building nine bots that couldn’t stop trading.
Seven Lessons That Cost Me $13.55
1. Fees are the real opponent. Not the market. Not other traders. Fees. At small capital with taker orders, you are paying rent to the exchange on every single trade. Your strategy doesn’t need to beat the market — it needs to beat the market plus fees. Most can’t.
2. Frequency is not a feature. My lag arb bot traded 40 times in one night and lost on every single one. The confluence bot traded zero times in four weeks and broke even. More trades means more fee drag, more slippage, and more opportunities to be wrong. The edge, if it exists, needs to be large enough to survive the friction.
3. Backtests lie in specific ways. My funding bot backtest had a sign error that made losses look like gains. My breakout bot backtest didn’t account for the exact fee structure on Hyperliquid. Every backtest worked. Nothing worked live. The gap between backtest and production is where dreams go to die.
4. Multiple bots, one account, no coordination = disaster. Without a position registry, orphan positions from crashed bots will eat your margin silently. Build the registry before you build the second bot.
5. Check your infrastructure before assuming the worst. When mystery positions appeared in my account, I spent hours investigating a security breach that turned out to be my own Docker containers. docker ps should have been step one, not step twenty.
6. Capital requirements aren’t optional. There’s a minimum viable capital for each strategy, and it’s higher than you think. Grid trading works at $80. Almost nothing else does. If I’d done the fee math before building eleven bots, I’d have built two.
7. The market doesn’t care about your architecture. I had Prometheus metrics, Grafana dashboards, Telegram alerts, asyncio concurrency, WebSocket price feeds, and eleven strategies running simultaneously. The market still took my money. Tooling is not edge. Infrastructure is not alpha. The only thing that matters is whether your strategy has positive expected value after costs.
Where It Stands
Am I going to make it back to $95.64? Probably. At $0.70/day from the grid bot, it’ll take about three weeks. That’s roughly the same amount of time it took me to lose it in the first place, which feels cosmically appropriate.
Would I Do It Again?
Yes. But differently.
I’d start with one bot. The grid bot. I’d run it for a month before building anything else. I’d do the fee math before writing a single line of strategy code. I’d build the position registry as part of the core infrastructure, not as a patch after thirteen orphan positions ate my margin.
And I’d run docker ps before panicking about hackers.
The total cost of this education was $13.55 and about 120 hours of development time. That’s roughly $0.11/hour, which makes this the cheapest university course I’ve ever taken. The degree is in humility, and the thesis is simple:
The market is not your enemy. Your assumptions are.
Built with Claude Code. All code and strategies discussed are for educational purposes. This is not financial advice. If you want financial advice, ask someone who didn’t lose 14% of their capital to their own Docker containers.