5 Steps to Set Up an AI Trading Bot for Crypto Day Trading

Video: AI Trading Strategy: Crypto Day Trading Bot (Setup From Scratch)
Key takeaways
- A working AI trading bot needs three separate credentials: an exchange API key, an exchange secret and a Claude API key.
- Exchange API keys should have trading enabled but withdrawals disabled, and be IP-restricted to the server running the bot.
- Risk per trade is typically capped at 0.5–2% of account equity, with a hard daily loss limit set before going live.
- A bot should run in paper or testnet mode for at least two weeks before any real capital is deployed.
- Every AI decision should be logged with the prompt, model output and resulting order so performance can be audited later.
An AI trading bot for crypto day trading is built in five steps: create restricted exchange API keys, connect a large language model such as Claude through its API, define hard risk limits in code, backtest and paper-trade the strategy, then deploy it with logging and monitoring. The full setup guide and links are available at the official guide page, which accompanies the walkthrough published by Thomas Reed.
The appeal is obvious: instead of hand-coding every rule, you give the model real-time market data and let it return a structured decision — buy, sell or hold — with a size and a reason. The risk is equally obvious: an LLM is not a price predictor, and a bot that trades on its output without guardrails can drain an account quickly. The steps below describe a setup that keeps the model on a short leash.
Step 1: Create exchange API keys with trading only
The first step is to generate API credentials on the exchange where the bot will trade, and to strip them of every permission the bot does not need. On most major exchanges this means two values: an API key and a secret. Enable spot or futures trading as required, disable withdrawals entirely, and restrict the key to a single IP address — the one your bot runs on. If the secret leaks, an attacker can place orders but cannot move funds out.
A practical convention is to create one key per bot instance and label it with the strategy name, so it can be revoked without touching anything else. Store both values in environment variables or a secrets manager, never in the strategy file itself. For a first run, many traders start with a small balance — one viewer of the setup video mentioned trying it with 0.5 ETH — which keeps the cost of mistakes low while the pipeline is proven end to end.
Step 2: Connect the Claude API and shape the prompt
The second step is wiring the model into the loop. You need a Claude API key from Anthropic's console, a small client script, and a prompt that receives a compact snapshot of the market: recent candles on your chosen timeframe, current price, spread, and the state of any open position. The model is asked to reply in a fixed JSON schema — action, confidence, size, stop level — so the execution layer never has to parse free text.
Three details decide whether this works in practice:
- Use a cheap, fast model for routine decisions and reserve a larger model for periodic review of the trade log.
- Set a low temperature and a hard token limit so responses are consistent and cheap; a day-trading loop can fire hundreds of calls per day.
- Cache and batch market data — sending the same candle history on every call multiplies cost for no benefit.
Treat the model as a signal generator inside a deterministic system, not as the system itself. Position sizing, stop placement and the maximum number of open trades stay in ordinary code that the model cannot override.
Step 3: Define risk limits before any order is sent
The third step is the risk layer, and it belongs in code that runs after the model and before the exchange. A common configuration caps risk per trade at 0.5–2% of equity, sets a daily loss limit (for example 3–5% of the account), and blocks new entries after a fixed number of consecutive losses. A cooldown timer prevents the bot from re-entering the same setup seconds after a stop-out.
Additional guards worth adding on day one:
- A maximum position size in quote currency, independent of what the model requests.
- A minimum time between orders to avoid rate-limit bans and fee churn.
- A kill switch that flattens positions and halts trading on a manual command or an API error streak.
Handling failures gracefully matters as much as the strategy. Timeouts, malformed JSON from the model, rejected orders and partial fills all need explicit handling; a bot that crashes mid-position is worse than one that never started.
Step 4: Backtest, then paper trade for at least two weeks
The fourth step is validation, and it has two stages. First, replay historical candles through the same prompt and risk logic to see how often the model's decisions would have been profitable after fees and slippage. Crypto fees on taker orders typically run 0.04–0.10% per side, which is meaningful for a strategy that trades several times a day.
Second, run the bot on a testnet or in paper mode against live data for at least two weeks. This catches the problems a backtest hides: latency between the signal and the fill, API rate limits, model responses that drift when volatility spikes, and the cost per day of running the loop. Only after the paper-trading log shows stable behavior — and a cost per trade you can justify — should real capital be connected.
Step 5: Deploy with logging and review performance weekly
The fifth step is deployment and ongoing review. Run the bot on a small VPS close to the exchange's servers, use a process manager so it restarts after crashes, and log every decision: timestamp, market snapshot, prompt, raw model output, order result and fees. Without that log you cannot tell whether the bot is trading well or simply trading a lot.
Review the log weekly and compare results against a simple benchmark — holding the asset, or a basic moving-average rule. If the AI layer does not beat the benchmark after costs, simplify or stop. Model behavior can also change when providers update their models, so pin the model version you tested and re-run the paper phase after any upgrade.
Typical questions and doubts from traders
Most hesitation around AI trading bots comes down to three things: whether a language model can really time entries, how much capital to risk on a first run, and what happens when something breaks. On timing, the honest answer is that the model adds judgment about context — news tone, unusual volume, conflicting indicators — rather than a statistical edge by itself; the edge still comes from the strategy and the risk rules around it. On capital, starting with a small balance such as 0.5 ETH is a reasonable way to validate the pipeline. On failures, the error-handling paths deserve as much attention as the happy path, since rejected orders and API outages are routine, not exceptional.
Links and resources
- Setup guide and links referenced in the walkthrough: https://tr.ee/XuRMKa
- Claude API console: https://console.anthropic.com
- The original video by Thomas Reed: https://www.youtube.com/watch?v=t42_UZvpLl8
Summary
An AI trading bot is a pipeline, not a single script: restricted exchange keys, a structured Claude API prompt, hard risk limits in code, a paper-trading period of at least two weeks, and logging that makes weekly review possible. The model contributes context and judgment; the deterministic layer contributes safety. Thomas Reed's video breakdown walks through the same setup from scratch, and the accompanying guide with all links is the place to start before connecting any real capital.
Questions & answers
Can a Claude-based bot actually predict crypto prices?
No language model predicts prices reliably. In a trading bot, Claude is used to interpret market context and return a structured decision, while the actual edge comes from the strategy rules, position sizing and risk limits coded around it. Judge the bot on its results after fees against a simple benchmark.
How much money should I start with when testing an AI trading bot?
Start with an amount you are fully prepared to lose, and keep it small — some traders begin with around 0.5 ETH. The first goal is to validate that orders, logs and error handling work, not to earn. Scale up only after the paper-trading and small-live results are consistent.
What API permissions does a trading bot need?
It needs trading permission on the exchange and nothing else. Withdrawals must be disabled, the key should be restricted to the bot's IP address, and each bot instance should have its own key so it can be revoked independently. The Claude API key is separate and should also be stored outside the code.
What happens if the AI returns an invalid response or the exchange rejects an order?
The bot should treat that as a normal case: validate the JSON, skip the trade if the response is malformed, retry with backoff on timeouts, and halt or flatten positions after a streak of errors. Log every failure with the raw model output so you can diagnose it later.
Source: AI Trading Strategy: Crypto Day Trading Bot (Setup From Scratch) · Markdown version