<< Home | Money
+2.26% return in 2 weeks
| Area | Money |
| AI used | Claude |
| Source | r/BuildWithClaude |
| Posted | 2026-09-12 |
The move
Build a stock trading bot by prompting Claude to write Python code for Alpaca API integration and dashboarding.Steps
- Define your trading strategy including entry criteria, stop-loss, and profit targets.
- Ask Claude to write Python code for the Alpaca API to execute trades based on your strategy.
- Request a FastAPI dashboard with websockets to monitor the bot's activity in real-time.
- Use Claude to debug the code by pasting error logs or describing unexpected behavior.
- Run the bot in a paper trading environment to verify performance before using real capital.
Prompt for your AI
Write a Python script using the Alpaca API to monitor [list of stocks]. Implement a strategy that buys when a stock is trending up but dips [X] percent. Automatically set a stop-loss at [Y] percent and a profit target at [Z] percent. Ensure no position is held longer than [N] days.
What happened
The user built a stock trading bot using only Claude to write the Python code. The bot monitors 60 stocks for dip-buying opportunities and manages trades with automated stop-losses and profit targets. After two weeks of paper trading, the account grew from $5,000 to $5,113.Watch out
Automated trading bots can execute losing trades rapidly if the logic is flawed. Paper trading results do not guarantee future performance with real money.Give it to your agent
Read https://howtheyuse.ai/p/2-26-return-in-2-weeks.md and help me do this.