How I Built a Crypto Trading Bot Using AI Tools
I built a cryptocurrency trading bot that runs 24/7, executes trades based on technical signals, and sends me daily performance reports. It took about three weeks from first commit to live trades — built from my apartment in Cape Town, almost entirely with AI tools.
As a chartered accountant turned developer, I approach projects like this with both a builder's instinct and an auditor's paranoia. This isn't a tutorial — it's an honest build log. What worked, what didn't, and what it taught me about building production software with AI assistance.
The problem I was solving
I'd been trading crypto manually for years — mostly swing trades based on technical analysis. The problem was consistency. I'd miss entries because I was in a meeting. I'd hold too long because of emotion. I'd forget to check a position at 2 AM when the Asian markets moved.
The thesis was simple: if my strategy is rules-based, a bot should execute it better than I can. Not because AI is smarter — because it doesn't sleep, doesn't panic, and doesn't get distracted.
The stack
- —Python — the natural choice for anything data-heavy
- —ccxt — unified API library for crypto exchanges
- —pandas and numpy — for technical indicator calculations
- —Claude — my primary coding assistant throughout
- —SQLite — lightweight storage for trade history and signals
- —Telegram API — for alerts and daily reports to my phone
What AI actually did
Let me be specific about where AI was useful and where it wasn't.
Claude wrote most of the boilerplate. Exchange API integration, database schemas, Telegram message formatting, error handling patterns — all the structural code that's well-documented and predictable. I'd describe what I needed, review the output, and iterate. This probably saved 60% of development time on those components.
Claude helped debug edge cases. Crypto exchanges have quirky APIs. Rate limits, decimal precision requirements, order minimum sizes that vary by pair. When I hit unexpected errors, I'd paste the traceback and the relevant code, and Claude would usually identify the issue faster than I could by reading docs.
Claude didn't write my trading strategy. The actual signal logic — which indicators to use, what thresholds to set, how to size positions — that came from years of trading experience. AI can help you implement a strategy, but it can't give you one that works. Anyone who tells you otherwise is selling something.
Claude didn't handle production deployment. Setting up the VPS, configuring systemd services, managing API keys securely, monitoring uptime — that was all manual. AI tools are getting better at this, but for anything touching real money, I wanted full control.
The build timeline
Week 1: Core engine. Exchange connection, market data fetching, basic signal generation, paper trading mode. Claude helped me scaffold the project structure and wrote the initial exchange integration. I spent most of my time on the signal logic.
Week 2: Risk management and execution. Position sizing, stop losses, order execution with retry logic, trade logging. This was the most critical code and I reviewed every line carefully. AI-generated code that handles money needs extra scrutiny — off-by-one errors in decimal handling can be expensive.
Week 3: Monitoring and go-live. Telegram notifications, daily P&L reports, deployment to a VPS, a week of parallel running (paper trades alongside live monitoring) before switching to real execution.
What I'd do differently
More testing earlier. I was excited to see trades execute and skipped writing proper unit tests for the signal engine. That bit me when I changed an indicator parameter and unknowingly broke a boundary condition. AI tools are great at generating test cases — I should have used Claude to write them from day one.
Simpler strategy first. My initial version had too many indicators and conditions. The simpler version I eventually settled on performed better. In trading and in software, complexity is not your friend.
Better logging from the start. When something goes wrong at 3 AM, your logs are all you have. I retrofitted detailed logging after a few incidents where I couldn't figure out why a trade was or wasn't taken.
The business lesson
This project matters to me beyond personal trading because it's a proof of concept for a pattern I see in every business: rules-based processes executed by software outperform rules-based processes executed by humans.
Not because people are bad at their jobs. Because people get tired, forget steps, get distracted, and have emotional responses to data. Software doesn't.
If your business has a process that follows clear rules — and most operational processes do — there's probably an automation opportunity. You don't need a trading bot. But you might need a customer triage bot, an invoice processing pipeline, or an automated reporting system.
The tools to build these are the same ones I used. Python (or Node.js), a clear set of rules, the right APIs, and AI-assisted development to move fast.
What this means for your business
I'm not suggesting every business owner should learn to code. But I am suggesting that the gap between "business idea" and "working software" has collapsed. What used to take a team of developers three months can now be built by one technical person in weeks.
Frequently Asked Questions
Can you build a trading bot with AI?
Yes — AI tools like Claude can write the structural code (API integrations, database schemas, error handling) and help debug edge cases. But the trading strategy itself has to come from real trading experience. AI can implement your rules; it can't give you profitable ones.
How long does it take to build an AI trading bot?
About three weeks from first commit to live trades, working as a solo developer with AI-assisted coding. Week one covers the core engine and paper trading. Week two covers risk management and execution logic. Week three covers monitoring, deployment, and parallel running before going live.
What programming language is best for trading bots?
Python is the natural choice. It has the strongest ecosystem for data analysis (pandas, numpy), the best exchange API libraries (ccxt), and the widest AI tool integration. It's also the language that AI coding assistants are most fluent in, which accelerates development significantly.
Is AI-assisted coding reliable for production software?
For structural code — API integration, data handling, message formatting — AI-assisted coding is highly reliable and saves significant development time. For critical logic that handles money, every line needs careful human review. The sweet spot is using AI for the 60% that's well-documented boilerplate and reviewing the 40% that matters most.
That's the shift Auto Alpha is built on. If you have a process worth automating, let's talk about what that looks like for your specific business.
Chartered accountant turned AI builder. I help mid-market businesses implement AI that delivers measurable ROI — from strategy through to deployed, working software.
More about MattWorking on something similar? I help mid-market businesses turn AI ideas into deployed, working software.
Let's talk