AI Prompts to Design a Crypto Trading Bot (Risk-First)
The hard part of a trading bot is not the strategy code. It is the spec, the risk controls and the honesty about costs. These five prompts help you design a bot that is testable, safe to run in paper mode and easy to shut down.
Start with a written spec, not code
A trading bot is a piece of software that moves money automatically, so it deserves a proper specification. Which market and timeframe? What exactly triggers an entry and an exit? What happens when the exchange API times out, an order only partly fills or the price gaps through your stop? If you cannot write those answers down, an AI coding tool will make them up for you.
The first prompt below forces those decisions into a document. The architecture review then checks that the design separates data, signals, risk and execution, so each part can be tested on its own.
Risk is a module, not an afterthought
A risk manager sits between your strategy and the exchange and can veto any order. It enforces position-size limits, maximum daily loss, maximum open positions and a kill switch. Build it before the strategy so every later change has to pass through it. Default everything to paper trading and make live trading an explicit, deliberate switch.
Be realistic about costs, too. Fees, slippage and latency turn many strategies that look good in a backtest into losers. Backtests and paper results do not predict live results.
Trend rules and exits
If you are exploring trend-following, write the rules in plain language first: the signal, the filter that avoids choppy markets, the position size and, most importantly, the exit. Most of a strategy's behaviour comes from how it exits. The trend rule writer and trailing-stop prompts below help you specify both clearly before any code exists.
The prompts
Bot Strategy Spec Writer (TB-001)
Best tool: Claude or GPT-6 Astra for structured specs.
ROLE: You are a quantitative developer who writes precise, testable specifications for trading bots.
CONTEXT: Bot idea: [BOT_IDEA]. Market: [TRADING_PAIR] on [EXCHANGE]. Timeframe: [TIMEFRAME]. Why I think it could work: [THESIS].
TASK: Turn the idea into a one-page spec: exact entry rules, exit rules, position sizing, order types, data needed, risk limits, conditions that pause the bot, and what "the strategy has stopped working" looks like.
OUTPUT FORMAT: Markdown spec with those headings, a list of ambiguous rules I must clarify, and a "Version 1 scope" list of what to leave out.
RULES: Education and engineering practice only, not financial advice. Never promise or estimate profits. Default to paper trading or testnet, assume API keys have withdrawals disabled, and include position limits and a kill switch.
Bot Architecture Review (TB-008)
Best tool: Claude Code or Grok Build in plan or read-only mode, or Claude with the code pasted.
ROLE: You are a principal engineer reviewing a trading bot before it touches real money.
CONTEXT: Repository or code: [PASTE_CODE_OR_REPO_DESCRIPTION].
TASK: Review for order-safety bugs (duplicate orders, unit and precision errors, missing limits), secret handling, error handling, state recovery after a crash, logging, and test coverage. Do not edit code.
OUTPUT FORMAT: Findings table (Severity | File | Issue | Fix), the 3 fixes to make before any live run, and missing tests.
RULES: Education and engineering practice only, not financial advice. Never promise or estimate profits. Default to paper trading or testnet, assume API keys have withdrawals disabled, and include position limits and a kill switch.
Trend Strategy Rule Writer (TB-019)
Best tool: Claude or GPT-6 Astra.
ROLE: You are a systematic-trading educator.
CONTEXT: Idea: [TREND_IDEA] (for example: moving-average crossover, breakout, momentum ranking). Pair or universe: [TRADING_PAIRS]. Timeframe: [TIMEFRAME].
TASK: Turn the idea into exact rules: indicator definitions, entry and exit conditions, position sizing, a volatility filter, and a stop. Remove every vague word.
OUTPUT FORMAT: Numbered rules, pseudo-code, and a list of parameters that will need testing.
RULES: Education and engineering practice only, not financial advice. Never promise or estimate profits. Default to paper trading or testnet, assume API keys have withdrawals disabled, and include position limits and a kill switch.
Trailing Stop & Exit Logic (TB-022)
Best tool: Claude or GPT-6 Astra.
ROLE: You are an exit-strategy specialist.
CONTEXT: Strategy: [STRATEGY_SUMMARY]. Typical holding period: [HOLDING_PERIOD].
TASK: Compare exit methods (fixed stop, ATR-based trailing stop, time stop, signal reversal) and write the exact logic for the one that fits best, including how orders are placed on the exchange and what happens if the stop order is rejected.
OUTPUT FORMAT: Comparison table, chosen logic in pseudo-code, and edge cases to test.
RULES: Education and engineering practice only, not financial advice. Never promise or estimate profits. Default to paper trading or testnet, assume API keys have withdrawals disabled, and include position limits and a kill switch.
Build: Risk Manager Module (TB-006)
Best tool: Claude Code or Grok Build. Ask for tests before declaring it done.
ROLE: You are a safety-critical software engineer.
GOAL: Build a risk-manager module that every order must pass through before it reaches the exchange.
REQUIREMENTS:
- Language: [PROGRAMMING_LANGUAGE]. Limits loaded from config: [MAX_POSITION_SIZE], [MAX_DAILY_LOSS], maximum open orders, maximum orders per minute, and a maximum distance from the last price.
- Reject orders that break any limit, log the reason, and alert me. Halt the bot after a daily-loss breach until I reset it manually.
- A kill switch that cancels all open orders and blocks new ones, triggered by a command, a file flag or repeated errors.
PROCESS: Plan first. Write a unit test for every limit, including edge cases at exactly the limit. Run the tests before reporting.
OUTPUT: A summary, the config format, and a table of every rejection reason.
The Crypto Trading Bots Edition continues with build briefs for paper-trading engines, DCA and grid bots, alerts and Telegram control panels, each with stress-test and post-mortem prompts.
Not financial advice. Education only. Not financial advice. Crypto assets and automated trading are risky and you can lose money; no prompt here is designed to predict prices or guarantee profits.
Get all of them: Crypto Trading Bots Edition
The full edition is $20. The complete bundle with all four editions is $39.