My FULL architecture for building an AI trading bot with Claude Code:
(three simple steps)
1. Tool stack
You need three things to build a bot with Claude:
a) Claude Code on desktop installed and running
b) An account with any exchange that has a public MCP
c) Your account API key (generate a new one)
Tell Claude Code to connect these three things in a new project.
Once connected, Claude can read market data, place orders, check positions, and manage risk from plain English.
Step 2. Write your strategy
Tell Claude to create a new CLAUDE.md file and describe your market strategy:
• Entry/exit rules
• Risk caps and position sizing
• Allowed pairs
• Execution protocol
Pro tip: I recommend voice prompting here to really extract all the necessary data
Step 3. Add a risk gate
Before going live, ask Claude Code to set these up:
• Kill switch - halts all trading instantly if triggered
• Daily loss cap
• Notional cap - no single order above [x]% NAV
• Leverage cap -no single order above [x] leverage
Full visual below: