Halloween: Trade & treat! 20% off

AI Trading Bot: How It Works, Types, and How to Build One

AI trading bot guide: ML, LLM and reinforcement learning types, what they can and can't do, how to evaluate one, and running a bot on a prop evaluation.

Vittorio De Angelis••15 min read•Last verified
Share article
AI Trading Bot: How It Works, Types, and How to Build One

Run your algo on funded capital

Explore

An AI trading bot is software that places trades automatically using a model trained on data, rather than only fixed rules a person wrote. The label is applied to everything from a simple moving average script to a deep reinforcement learning agent, and to a growing number of products that promise returns no model can deliver. This guide separates the types, sets out what an AI trading bot can and cannot do, explains how to evaluate one, compares building with buying, and covers how to run one on a prop evaluation within the rules.

Quick answer: An AI trading bot is a program that analyses market data with a machine-learning model, decides when to buy or sell, and sends orders through an API without manual input. The main types are supervised ML models, LLM-assisted bots and reinforcement learning agents. None can predict markets reliably, so judge any bot on verified, out-of-sample results.

Highlights of this article

  • An AI trading bot uses a trained model, not just hand-written rules, to make trading decisions, then executes them through an API
  • The 3 main types are supervised machine-learning models, LLM-assisted bots and reinforcement learning agents
  • AI can process more data and execute with more discipline than a person. It cannot see the future, and overfitting is the most common failure
  • The CFTC warns that AI is used to sell trading bots with unrealistic or guaranteed returns. Treat those claims as a red flag
  • Building your own bot is now practical with an AI coding assistant; buying one means trusting a record you usually cannot audit
  • Velotrade permits EAs and bots on evaluation and funded accounts, with REST and WebSocket API access included, under the same loss limits as manual trading

AI trading bot: key facts

Item Detail
Definition Software that uses a trained model to make trading decisions and sends orders automatically through an API
Main types Supervised ML models, LLM-assisted bots, reinforcement learning agents
What it does well Processes many inputs, executes consistently, enforces risk rules without emotion
What it cannot do Predict the future, adapt reliably to regimes it has never seen, guarantee profit
Biggest technical risk Overfitting: a model that memorised historical noise
Biggest consumer risk Products advertising guaranteed or extreme returns (CFTC advisory)
How to judge one Out-of-sample and forward-test results, maximum drawdown, costs included
Prop firm use Permitted at Velotrade under the same rules as manual trading (/faq)

What is an AI trading bot?

A trading bot is any program that reads market data and places orders without you clicking a button. Most bots are rule-based: the developer writes explicit conditions such as "buy when the 50-period moving average crosses above the 200". That is algorithmic trading, and it involves no artificial intelligence.

An AI trading bot replaces some or all of those hand-written rules with a model that learned its behaviour from data. Instead of being told when to buy, the model is trained on historical examples and produces an output, such as a probability that price rises over the next hour, a classification of the current market regime, or a recommended position size. The bot then turns that output into orders.

Every AI trading bot has the same 4 layers:

  1. Data: price history, order book snapshots, funding rates, news text or on-chain data.
  2. Model: the trained component that turns data into a decision or a score.
  3. Risk layer: hard limits on position size, daily loss and total exposure. This should be ordinary code, not part of the model.
  4. Execution: the connection to a trading venue through a REST and WebSocket API.

The model gets the attention, but the risk layer and execution are where most live bots succeed or fail.

Types of AI trading bots

Code on a screen, the kind of strategy logic an AI trading bot is built from
Most AI trading bots are a model wrapped in ordinary code for data handling, risk limits and order execution.

Supervised machine-learning models

The most common type. A model such as gradient-boosted trees, a random forest or a neural network is trained on labelled historical data: features (recent returns, volatility, indicator values) paired with an outcome (did price rise over the next N bars?). Once trained, it scores new data and the bot trades when the score crosses a threshold.

These models are well understood and testable, but they assume the patterns in the training period persist. Markets change, so a model that fitted 2021 crypto volatility may say nothing useful about a quiet 2026 range. Google's machine learning course describes overfitting as a model that matches the training set so closely that it fails to make correct predictions on new data, and trading data is especially prone to it.

LLM-assisted bots

Large language models such as ChatGPT or Claude are used in two different ways, and the difference matters:

  • As a coding assistant. The LLM helps you write, debug and document the bot. The trading logic is still yours and still deterministic. This is the most useful and least risky use of LLMs in trading today.
  • As a decision input. The LLM reads news, filings or social posts and produces a sentiment score or summary the bot trades on. This can add information, but LLM outputs can vary between runs and are hard to backtest honestly, because the model may have been trained on text written after the period you are testing.

An LLM asked directly "should I buy BTC now?" is not a trading strategy. It has no access to live prices unless you give it them and no tested edge.

Reinforcement learning agents

Reinforcement learning trains an agent by trial and error to maximise a reward, as described in Sutton and Barto's standard textbook on the field. In trading, the agent observes the market, takes actions (buy, sell, hold, size) and is rewarded on profit or risk-adjusted return in a simulated environment.

This is the most ambitious approach and the hardest to get right. The agent learns whatever maximises reward in the simulator, including exploiting unrealistic fills or ignoring costs the simulator left out. Results that look excellent in simulation often fail with real spreads and slippage.

Type How it decides Main strength Main weakness
Supervised ML Scores new data using patterns learned from labelled history Well understood, testable Overfits; assumes the past repeats
LLM-assisted Writes the bot's code, or adds a text-based signal Fast development; reads unstructured data Non-deterministic; hard to backtest honestly
Reinforcement learning Learns a policy by maximising reward in a simulator Can learn sizing and timing together Exploits simulator flaws; unstable
Rule-based (for comparison) Follows explicit conditions Transparent, easy to test Only as good as the rules

If you trade forex specifically, the AI forex trading guide covers currency-specific data and sessions, and the forex trading bot guide covers rule-based automation on currency pairs. For the strategy logic itself, see AI trading strategies.

What can an AI trading bot do, and what can't it?

What it can do:

  • Monitor many instruments and data sources at once, around the clock
  • Execute the same logic every time, without fear, boredom or revenge trading
  • Combine more inputs than a person can weigh by eye
  • Enforce position limits and stop trading at a loss threshold, every time

What it cannot do:

  • Predict the future. The CFTC's advisory on AI trading bots says it plainly: AI technology cannot predict the future or sudden market changes
  • Create an edge that is not in the data. A model trained on noise learns noise
  • Adapt safely to conditions it has never seen, such as an exchange outage or a flash crash
  • Guarantee profit. Any product that promises it is making a claim regulators flag as a warning sign

The honest framing: AI is a tool for building, testing and running a strategy faster and more consistently. The strategy still has to have a reason to work.

How to evaluate an AI trading bot

Whether you are judging a commercial product or your own model, the same tests apply.

  1. Ask what the model actually does. "Proprietary AI" is not an answer. You should be able to state the inputs, the output and the market it trades.
  2. Demand out-of-sample results. Performance on data the model was trained or tuned on proves nothing. Look for results on a held-out period and, better, a live forward test. The backtesting trading strategies guide explains walk-forward and out-of-sample testing.
  3. Check maximum drawdown and losing streaks. A bot with a high return and a 40% drawdown will end most evaluations long before the return arrives.
  4. Confirm costs are included. Commission, spread, slippage and funding or overnight charges. High-turnover bots are the most sensitive to them.
  5. Count the parameters. The more settings tuned to history, the higher the chance of overfitting. Research by Bailey, Borwein, Lopez de Prado and Zhu shows how testing many configurations inflates the best backtest.
  6. Watch for marketing red flags. The SEC, NASAA and FINRA joint investor alert lists claims like an AI system that "can't lose" as classic warning signs. Guaranteed monthly returns, 100% win rates and pressure to deposit with the seller are reasons to walk away.

Should you build or buy an AI trading bot?

Build your own Buy a commercial bot
Cost Your time, plus data and hosting Licence or subscription fees
Transparency Full: you know every rule and input Usually low: logic is hidden
Track record You produce and audit it yourself Seller-provided, often unverifiable
Skill needed Basic Python, helped by an AI assistant Configuration only
Control over risk Complete Limited to the settings offered

Building is far more accessible than it was a few years ago. An AI coding assistant can draft the API connection, data handling and order logic from a clear description, leaving you to review and test it. For crypto markets, the crypto trading bot guide compares the main bot types and their risks. The how to build a trading bot guide walks through the steps: strategy, language, API, backtest, risk controls and deployment.

Velotrade publishes an AI Knowledge Base for this workflow: a downloadable package with the connection reference, worked examples and a safety workflow that you upload into a ChatGPT or Claude project, so the assistant writes code against the real Velotrade API instead of guessing at endpoints.

Buying can make sense if you cannot code and the product is transparent about its logic and record. Most are not. If you buy, paper trade it on your own data first, and size it as if its marketing were wrong.

Can you run an AI trading bot on a prop firm evaluation?

A team working at computers on trading software
A bot on a prop account is held to the same loss limits as a manual trader.

Many prop firms ban or restrict automation. At Velotrade, the official FAQ states: "EAs, trading bots, algo trading systems, and any automated or algorithmic strategy are permitted." API access is included on every evaluation and funded account, with no extra fee and no approval process.

The rules that matter for an AI bot, from the FAQ and the API access page:

  • Which bots are allowed. The FAQ says: "Two categories are permitted: strategies you have built yourself, and commercially available EAs and bots that anyone can purchase off the shelf." Private or bespoke services built for your account are not.
  • Same limits as manual trading. "If your bot breaches the daily loss limit or maximum drawdown, the account is closed on the same basis as a manual breach."
  • Banned strategies stay banned. "High-frequency trading strategies that exploit latency or place excessive orders are prohibited." The API page also lists latency arbitrage and coordinated multi-account bots.
  • Copy trading. Copy trading is permitted only between accounts you personally own.
  • You are responsible. Velotrade may ask you to confirm the strategy is your own work or a commercial product, and that you operate the account.

Design the bot around the limits

Every Velotrade challenge uses a static maximum drawdown, a fixed dollar floor set from the starting balance, plus a daily loss limit of 3% to 5% depending on plan, reset at 00:30 UTC from the higher of balance or equity. Challenges run on accounts from $5K to $200K and start from $40; current figures are on the challenges page. Other firms set different limits and bot policies, so compare the prop firms that permit bots and EAs if you are shopping around.

A static floor is easy to code against. Build the risk layer to:

  • Read live equity through the WebSocket stream and stop opening trades well before the daily limit
  • Flatten positions if equity approaches the static floor
  • Cap total exposure across correlated instruments
  • Halt on errors, stale data or disconnections rather than retrying blindly

There is no consistency rule, so a bot whose returns are uneven from day to day is not penalised for it. For the wider landscape, see the best crypto prop firms for algo traders and the guide to API access on funded accounts.

Is an AI trading bot worth it?

A bot you built, tested out of sample and understand is legitimate automation, and it can enforce discipline a person struggles to keep. A bot sold on promises of guaranteed or extreme returns is, in the CFTC's words, not a money machine. Most retail traders get more from using AI to build and test a simple strategy faster than from searching for a model that predicts prices. For the systematic discipline behind both, the quant trading guide goes deeper.

Velotrade provides education and simulated trading only. It does not provide investment advice. Backtested and simulated results are hypothetical and are not indicative of future performance.

Sources

Frequently Asked Questions

About the author

Vittorio De Angelis

Vittorio De Angelis

Executive Chairman

Former equity-derivatives trader at JP Morgan, Dresdner Kleinwort and Bank of America in London. Later Head of Brokerage at a global broker in Hong Kong.

Velotrade was founded in Hong Kong in 2016 by a team from JP Morgan, Dresdner Kleinwort and Bank of America, has paid out over $2.5 billion to its trade-finance clients, and has been featured in Bloomberg, the Financial Times, the Wall Street Journal and on Nasdaq. Its prop trading evaluations are simulated and educational.

View author page

Ready to trade with
$200,000 capital?

Up to 90% profit split

Keep most of what you earn

No consistency rule

News trading allowed

Payouts within 24 hours

Of your request