A ChatGPT crypto trading bot is not ChatGPT placing orders. ChatGPT writes the strategy code, and a platform tests that code and runs it at every bar close. This guide does that with OptAlgo: connect ChatGPT, describe a strategy, validate it for free, backtest it, read the honesty grade first, run a walk-forward and start a paper bot. Every step works on the Free plan, with no card.
What you need
- A ChatGPT account that can add custom connectors.
- A free OptAlgo account: sign up here.
- A strategy idea you can say in one sentence, with an entry, an exit and a stop.
You do not need an exchange account, an API key or any Python. If you want to know what a chat model can and cannot do before you start, read Can ChatGPT or Claude trade crypto for me? first.
Step 1: Connect ChatGPT to OptAlgo
In ChatGPT, add OptAlgo as a custom connector with this URL, then sign in to OptAlgo and approve:
https://mcp.optalgo.com/mcp
The connection uses OAuth, so you never paste an API key into the chat. The connector docs walk through the setup for ChatGPT step by step. You can disconnect at any time under AI agents in the OptAlgo app, and access stops immediately.
The connector is paper-only by design. ChatGPT can backtest and run paper bots through it. It cannot place a live order, switch a bot to live or touch a live bot. The connector is free on every plan; only running a backtest uses quota.
Step 2: Describe the strategy
Tell ChatGPT the idea in plain words. Name the coin, the timeframe, the entry, the exit and the stop. ChatGPT reads the OptAlgo strategy SDK through the connector and writes a strategy.py: vectorised Python with numpy that you can read, download and keep.
Strategy code may import only numpy, math and the OptAlgo SDK, and it runs in a sandbox. If you are not sure what kind of idea to start with, the pages on trend following and mean reversion describe the two most common families.
Step 3: Validate for free
Ask ChatGPT to validate before it runs anything. Validation queues nothing, loads no market data and costs no units. It runs the code once on synthetic bars and lists every problem at once: code, symbols, data for the window, plan limits and quota, plus lookahead and non-deterministic code.
Each finding comes with its fix, so ChatGPT can apply them all in one edit and validate again until it passes. Lookahead bias, where a decision on one bar uses data from a later bar, is caught here before it can cost you a unit.
Step 4: Backtest, and read the grade first
A backtest is charged by run time: one unit is up to 10 seconds. The Free plan has 50 units a month, 3 coins per run and one run at a time. Every result comes back with three things, and the order matters:
- An honesty grade from A to D. A means every fill settled on real data with fees, funding and exchange rules. D means not realistic: fix it and rerun.
- A search verdict: ok, caution, likely overfit, or no edge when the run lost money. It counts how many variants of the strategy you ran on overlapping data in the last 30 days.
- Then the numbers: return after fees and funding, max drawdown, trades, and the equity chart.
Tell ChatGPT to report the grade and the verdict before any return figure. A single backtest is in-sample. It is a screen, never proof.
Step 5: Know a result you should not tune
Here is a real run made on OptAlgo on 2026-11-22, on Binance data. The idea sounds sensible: buy an oversold dip inside an uptrend. Go long when RSI(14) is below 30 while price is above the 200-bar EMA, exit when RSI rises above 55, with a 4% stop. This is the core of the code, where c is the close series:
rsi = indicators.rsi(c, 14) trend = indicators.ema(c, 200) go = (rsi < 30) & (c > trend) # oversold inside an uptrend out = rsi > 55 # exit when it recovers
It ran on the ETHUSDT perpetual, on 1h bars, from 2023-01-01 to 2026-01-01. The result of that one backtest:
- Honesty grade: A.
- Return after fees and funding: -5.2%.
- Max drawdown: -19.3%. Sharpe: -0.19.
- 25 trades, win rate 64%, profit factor 0.84.
- Verdict: no edge.
Two lessons sit in those numbers. First, a 64% win rate still lost money: the losing trades were larger than the winning ones, which is what a profit factor below 1 means. Win rate alone tells you very little.
Second, the grade is A, so the loss is real. The fills were honest and the strategy lost anyway. The tempting next prompt is “try RSI 25, then 35, then a 3% stop”. Do not send it. With 25 trades in three years, some setting will look better by luck, and you will have fitted noise. A verdict of no edge means change the idea, not its parameters.
Step 6: Run a walk-forward instead of tuning
When a run does make money, the next risk is tuning it by hand. Every extra single run on the same data is another try, and the best of many tries wins partly by luck. That is backtest overfitting.
Ask ChatGPT for one research run instead: a walk-forward. It optimises on a training window, judges the result on the next window the optimiser never saw, steps forward and repeats. The verdict is robust, inconclusive or likely overfit. Inconclusive is not a pass.
Step 7: Start a paper bot
Deploy a backtest graded A to C and OptAlgo runs the code at every bar close in a sandbox, on paper, as a bot in My Bots. The deploy gate always refuses a losing backtest, so it would refuse the RSI example above. It also refuses a run judged likely overfit unless an out-of-sample research run of the same code passed.
The Free plan includes one hosted strategy on paper. While it runs, ask ChatGPT to use Compare with backtest: a backtest of the same code over the period the bot ran, matched against its real paper trades, trade by trade. Paper trading is where you find out whether the backtest and reality agree, without paying for the answer.
Going live is your decision
ChatGPT cannot take the bot live, and that is on purpose. When the paper record holds up, you switch the strategy live yourself in the OptAlgo app, on Plus or Pro, on Binance, Bybit or OKX. Plans are listed on the pricing page. Trading is risky and you can lose money; a paper record lowers the number of surprises, it does not remove the risk.
Prompts that work
- “Read the OptAlgo SDK, then write a strategy: long BTC on a new 20-bar high on 4h, 2 ATR stop, trail it. Validate it before running anything.”
- “Backtest it from 2022 to 2026. Tell me the honesty grade and the search verdict before any return.”
- “Show the equity chart against buy and hold, and the max drawdown.”
- “Do not try more parameter values by hand. Run one walk-forward and tell me the verdict.”
- “Test the same rules on BTC, ETH and SOL together in one run.”
- “Deploy it as a paper bot, and next week compare its paper trades with a backtest of the same period.”
Good prompts share one thing: they ask for evidence in a fixed order, and they say what not to do.
Common mistakes
- Asking ChatGPT for a backtest without a connector. With no engine behind it, the numbers it writes were never computed.
- Reading the return first. The grade and the verdict decide whether the return means anything.
- Tuning a loser. No edge means a new idea, not a new RSI level.
- Asking for “a few more variations” again and again. Every run is a try, and the verdict counts them.
- Trusting win rate. The RSI example won 64% of its trades and still lost money.
- Ignoring fees. A strategy that trades several times a day pays the fee on every entry and exit, so judge every result net of fees and funding.
- Pasting an exchange API key into the chat. The connector never needs one.
Prefer a terminal?
The same loop runs from a coding agent. The Claude Code trading bot guide covers that path, with one command to connect. The product side of this guide is on the AI trading strategy page.
Frequently asked questions
Can ChatGPT build a crypto trading bot?
ChatGPT can write the strategy code and, through the OptAlgo connector, validate it, backtest it and start it as a paper bot. OptAlgo runs the code at every bar close. ChatGPT itself does not place orders.
Is a ChatGPT crypto trading bot free?
The OptAlgo connector is free on every plan. The Free plan includes 50 backtest units a month and one hosted strategy on paper, with no card. Live trading needs a Plus or Pro plan.
Can a ChatGPT trading bot trade with real money?
Not through the chat. The connector is paper-only and cannot place a live order or change a live bot. A strategy goes live only when you confirm it in the OptAlgo app, on Plus or Pro.
Do I need to know Python to build a trading bot with ChatGPT?
No. You describe the strategy in plain words and ChatGPT writes the Python with the OptAlgo SDK. You can still read and download the strategy.py it ran.
Are ChatGPT trading bots profitable?
No bot wins by construction, and trading is risky. One backtest is in-sample and never proof. The honesty grade, the overfit verdict, a walk-forward and a paper record show whether one specific strategy held up.