Stock Market AI Trading Bot Setup Workflow
From Wikiprompt, the free prompt encyclopedia
Stock Market AI Trading Bot Setup Workflow A comprehensive step-by-step guide to building an AI-powered stock trading bot using Claude, covering broker connection, market data integration, execution setup, and Telegram mobile access.
Prompt ContentSave
π
Step 1: Connect your broker (read-only)
Start here; it's the safest tier. I use Interactive Brokers, but the steps should be similar if your broker allows an AI connection.
In Interactive Brokers (IBKR), go to Trade β AI instructions β connect to Claude.
Now Claude can read your positions, cash, margin, P&L, full history, and risk, but it can't execute anything yet.
Try prompts like: "What's my account value and how much dry powder do I have left?"
Step 2: Supercharge it with market data
Connect the FMP and QuiverQuant MCPs so Claude has live market data 24/7 alongside your portfolio.
Now it can research and analyse against real numbers.
Step 3: Enable execution (optional, advanced)
If you want Claude to actually place orders, run through IBKR's Trader Workstation (TWS) API.
Download TWS, make a new account, and log in.
Then: turn off read-only, restrict connections to your own device, set it to restart daily, and start on a paper account.
Step 4: Connect Claude to TWS
Tell Claude it's running with API access enabled and read-only off, give it your socket port, and have it install Python, set up the environment, and confirm the connection by pulling your account summary.
Now it can place orders on your behalf.
Step 5: Mobile support
This is the part I use most.
You can put your whole bot on Telegram so you can prompt on the go.
You'll need an always-on device (an old laptop or Mac Mini), Telegram with proper 2FA, and Claude.
Step 6: Wire up the Telegram bot
Search BotFather on Telegram, create a new bot, and connect its token to Claude Code.
The flow is: Telegram β listener script β Claude + TWS.
Now you can text your bot for trades, alerts, setups and research from anywhere.
Sign in to see the full prompt
Continue with:
By logging in, you agree to our Terms of Use and Privacy Policy
Usage
This prompt is designed for use with business. Copy the prompt content above and paste it into your preferred AI tool.
For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.
References
- Category: business Prompts
- Source: https://x.com/milesdeutscher/status/2104401459509157955
Talk
0 comments