AlphaTrade AI
A personal AI trading copilot that keeps the trader disciplined.
Highlights
~8,400automated tests
Tests by area - Backend
- 6,538
- Frontend
- 1,862
21AI eval cases
Agent, knowledge search, guardrails
~1/20Routine tasks go to a light model at ~1/20 of the strong model's list price, with output capped at 1,024 vs 4,096 tokens
List price (relative) - Light model
- 1
- Strong model
- ~20
Output cap (tokens) - Light model
- 1,024
- Strong model
- 4,096
Hard risk limits on every trade
Zeroreal money at risk
Live trading disabled in code
Screen time cut from hours to minutes (my estimate)
Two modes
- I trade manually on a BloFin demo account, and my fills are mirrored automatically into a journal for post-trade review.
- Coded strategies trade autonomously on paper/demo under hard risk limits enforced in code.
Live trading is hard-disabled.
Screenshots
Screenshots coming soon
From market move to lesson learned
Observe
Market data
Detect setup
Strategy rules
Risk check
Automatic, inside my limits
- Risk gate
- Kill switch
Paper/demo trade
Simulated fill
Review & learn
Journal
Architecture
Trader(People)
Browser & phone
- Web app
Web app(My app)
6 workspaces · Next.js, Vercel
- API
API(My app)
FastAPI, Render
- AI agent
- saves to Decision record
- uses Fast cache
- Exchange demo account
AI agent(My app)
25-step graph · LangGraph
- Model router
- searches Knowledge
Model router(My app)
Strong vs light model
Fast cache(Data store)
Limits & market cache · Redis
Knowledge(Data store)
Playbooks & notes · Qdrant
Decision record(Data store)
Plans, trades, journal · PostgreSQL
Exchange demo account(Outside service)
BloFin
Watcher worker(My app)
Render, checks every 60 s
- reads Market data
- records to Decision record
- sends Alerts
Market data(Outside service)
Binance, Bybit
Alerts(Outside service)
Telegram
- People
- My app
- Data store
- Outside service
The AI explains and proposes; plain rule-based code decides risk and execution. The watcher is built to keep monitoring independently of the app.
Model router: A rule-based lookup by request purpose, not AI-decided: deterministic, fails closed, and can only route down to the cheaper model.
Features
Watcher
Checks my strategies on a fixed schedule
AI assistant
Explains setups with evidence
Risk gate
My rules plus a kill switch
Journal
Plans, fills and lessons linked
Telegram alerts
Only when a setup qualifies
Security & risk limits
Live trading hard-disabled; the exchange client only talks to an allowlisted BloFin demo host.
Autonomous trades run only inside hard limits enforced in code:
- Max leverage (hard cap 20x)
- Daily loss limit (hard cap 6%)
- Max open positions
- Max size per trade
- Max trades per day
- Drawdown breaker
With an owner arm switch and a kill switch.
Strategy changes need my approval.
Prompt-injection and moderation checks.
Secrets scrubbed before AI calls.
Tech stack
- Frontend
- Next.js 15
- React 19
- TypeScript
- Tailwind
- Recharts
- Backend
- Python 3.12
- FastAPI
- Pydantic
- Redis
- AI
- LangGraph
- OpenAI-compatible LLMs
- Model routing
- RAG
- Data
- PostgreSQL
- SQLAlchemy
- Alembic
- Qdrant
- Deploy & quality
- Vercel
- Render
- Docker
- GitHub Actions
- pytest
- Vitest
- Playwright