← Back to Blog

crypto-loco: The Self-Improving Crypto Trading Bot

The Pitch

A crypto trading bot that doesn't just follow rules — it learns from every trade, adapts to changing markets, and gets smarter over time. Built with Python, powered by LLM agents, and designed for real-world trading with strict risk management.

The Problem

Most trading bots are either: - Too rigid — fixed rules that work until markets change, then they lose money - Too opaque — black-box AI that "predicts" prices with coin-flip accuracy - Too expensive — complex systems that cost more in API fees than they earn

Our Solution

crypto-loco combines deterministic technical analysis with LLM reasoning and a self-improvement loop:

  1. Read the market — 8 technical indicators, support/resistance, regime classification
  2. Reason about it — Multi-agent LLM system (analyst + risk manager) with chart vision
  3. Execute safely — Deterministic order placement with hard-coded risk limits
  4. Learn from mistakes — Post-trade review generates reflections injected into future decisions

Key Numbers

Metric Value
Backtested P&L (1 year) +12.42% net
Win rate 43.5%
LLM cost ~$0.50/month
Capital €250 (€83/pair)
Max risk per trade 2% (€1.66)
Tests 49 passing

How It Works

Binance Data → 8 Indicators + S/R + Regime → Technical Analyst (LLM)
  → Risk Manager (LLM) → Trade Executor (code) → Dashboard
    ↕
Self-Improvement: Reviews trades + missed opportunities → Generates reflections

What Makes It Different

Feature Traditional Bot crypto-loco
Decision making Fixed rules LLM agents with context
Risk management Hard-coded Dynamic sizing by regime
Learning None Self-improvement loop
Transparency Opaque or rigid Full audit trail
Adaptation Manual tuning Automatic reflection injection
Cost High or low quality $0.50/month, quality reasoning

Tech Stack

  • Python 3.11+ with async/await
  • CCXT for Binance API
  • pandas-ta for technical indicators
  • OpenRouter for multi-model LLM (Gemini + Claude)
  • FastAPI for real-time dashboard
  • SQLite for persistent data storage
  • 49 tests covering all modules

Status

🟢 Phase 6: Go Live & Continuous Improvement — Self-improvement loop complete. Ready for live trading.

Links


Built for real trading, not backtest overfitting. Every decision is logged, every trade is reviewed, every mistake becomes a lesson.