Build Bots with AI

Use AI tools like Claude Code, Cursor, and ChatGPT to generate trading bot code for Binance, Bybit, OKX, and more.

This track is about turning an idea into a working bot using AI coding tools. You’ll learn how to prompt, generate, and refine code — then validate it with basic safety checks before you ever run it live.

The focus is on practical systems: exchange connectivity, order handling, risk controls, logging, and “boring” reliability — not just fancy backtests.

Exchanges covered

Exchange Type Tutorial
Binance Spot / Futures API setup & momentum bot
Bybit Spot / Derivatives Bybit MCP bot
OKX Spot / Derivatives OKX agent trading
Bitget Spot / Futures Bitget MCP bot
Hyperliquid Perps (on-chain) Copy trading bot
Alpaca US stocks (paper + live) Alpaca MCP bot
Start Here

AI Trading 101: How to Use AI Tools to Trade Smarter

A comprehensive guide to using AI coding tools like Claude Code, Cursor, and ChatGPT to build trading bots, indicators, and market analysis workflows.

beginner 15 min claude-code cursor

Bitget MCP Trading Bot with Claude Code: Setup Guide (2026)

Bitget's official Agent Hub exposes 58 trading tools across 9 modules — including Copy Trading — as an MCP server Claude Code, Cursor, and ChatGPT can call directly. This guide covers API key setup, npm install, demo trading, and your first agent-executed order on Bitget.

intermediate 25 min claude-code

Connect Claude Code to Kraken via MCP: AI Trading Bot Setup Guide

Kraken CLI ships a built-in MCP server that lets Claude Code, Cursor, and other AI agents trade spot, futures, xStocks, and forex on Kraken without writing a custom API wrapper. This guide covers install, paper trading setup, and your first agent-executed order.

intermediate 25 min claude-code

Revolut X AI Agent Trading with Claude (Setup Guide)

Revolut opened Revolut X to AI assistants on July 10, 2026, letting Claude, Gemini, Cursor, and OpenClaw analyze markets and stage crypto trades over MCP. Here is how to connect Claude, keep approvals on, and place your first agent trade across 300+ tokens.

beginner 20 min claude-code claude

Connect Claude to Coinbase for Agents (Setup Guide)

Coinbase for Agents launched June 11, 2026, letting Claude and ChatGPT trade crypto from your Coinbase account. Here is how to connect Claude over MCP or the CDP CLI, set spend and risk limits, and place your first agent trade safely.

beginner 20 min claude-code

Connect Claude to Robinhood Agentic Trading (MCP Setup Guide)

Robinhood opened its brokerage to AI agents over MCP on May 27, 2026, and added 24/7 crypto trading in early July. Here is how to connect Claude to a sandboxed Agentic account, place your first equity or crypto order, and set permission limits so the agent only trades what you fund it with.

beginner 20 min claude-code

Run a Claude Trading Agent on a Schedule (Managed Agents, Cron + Vault)

Anthropic's June 2026 Managed Agents beta lets a Claude agent run on a cron schedule with credentials stored in a vault. Here is how to wire up a daily market-research or rebalance agent that runs without your laptop on.

intermediate 30 min claude-code

Build a Hyperliquid Copy Trading Bot with Claude Code (Python)

Step-by-step tutorial to build a Hyperliquid copy trading bot with Claude Code. Watch a target wallet's on-chain positions, mirror its trades with hard risk caps, and test on testnet before going live.

intermediate 50 min claude-code

Bybit AI Sub-Account Setup: Connecting Claude Code Safely (May 2026)

Bybit's new AI Sub-Account is mandatory for any external AI agent that wants to trade on the exchange. Step-by-step setup, fund isolation, withdrawal locks, and how to wire it into a Claude Code bot without exposing your main balance.

beginner 20 min claude-code

Gemini Agentic Trading with Claude Code: Hands-On Setup Guide

Gemini's Agentic Trading is the first MCP-enabled regulated US exchange. Walkthrough of connecting Claude Code to Gemini, the trading skills the API exposes, permission scopes, and a first paper-trade order from the AI agent.

intermediate 30 min claude-code chatgpt

Build a Hyperliquid Trading Bot with Claude Code (Python SDK)

Step-by-step tutorial to build a Python perpetuals trading bot on Hyperliquid using Claude Code. Covers wallet setup, the official Python SDK, a simple breakout strategy, and testnet paper trading on the on-chain orderbook.

intermediate 45 min claude-code

Build an AI Forex Trading Bot with Claude Code and OANDA (Python)

Step-by-step tutorial to build a Python forex trading bot using Claude Code and the OANDA API. Covers EUR/USD pair setup, moving average crossover strategy, risk controls, and paper trading on OANDA's practice account.

intermediate 45 min claude-code

How to Backtest an AI Trading Strategy with Claude Code (Python)

Learn how to backtest trading strategies generated by Claude Code using Python and vectorbt. Covers data fetching, strategy testing, performance metrics, and how to avoid common backtesting mistakes.

intermediate 35 min claude-code

Alpaca MCP V2 Stock Trading Bot with Claude Code: SMA Crossover and alpaca-py MultiIndex Fix

Build a US stock trading bot using Alpaca MCP V2 and Claude Code. Covers SMA crossover strategy, full working Python code, trailing stops, and the fix for alpaca-py StockHistoricalDataClient.get_stock_bars() returning a MultiIndex DataFrame.

intermediate 40 min claude-code

Claude Code Trading Skills: How to Install and Use Them (2026)

A practical guide to Claude Code skills for automated trading. Covers what skills are, the best trading skills available in 2026, how to install them, and how to build your own custom trading skill. Updated June 12 for the latest Skills changes: the literal-$ escape, skills running beyond Claude Code, and lazy-loaded MCP tool catalogs.

beginner 20 min claude-code

Build a Bybit Trading Bot with Claude Code and MCP (Python)

Step-by-step tutorial to build a Python crypto trading bot using Bybit's official MCP server and Claude Code. Covers API setup, market data streaming, order execution, and a simple momentum strategy on Bybit futures.

intermediate 45 min claude-code

Connect Claude Code to TradingView with MCP (Step-by-Step Setup)

How to set up the TradingView MCP server so Claude Code can read your charts, analyze indicators, and write Pine Script directly from your terminal. Covers installation, configuration, and practical trading workflows.

intermediate 30 min claude-code

Build a Stock Trading Bot with Claude Code and Interactive Brokers (Python)

Step-by-step tutorial to build a Python stock trading bot using Claude Code and the Interactive Brokers API. Covers TWS setup, paper trading, EMA crossover strategy, and risk controls.

intermediate 50 min claude-code

Vibe-Trading Setup Guide: Open-Source AI Trading Agent (2026)

How to install and configure Vibe-Trading, the open-source multi-agent framework that turns plain English into trading strategies. Docker and local setup, LLM providers, backtesting, and real limitations.

beginner 25 min claude-code chatgpt

Build a News-Reactive Trading Bot with Claude Code (Python + NewsAPI)

Step-by-step tutorial to build a Python bot that monitors news headlines, runs sentiment analysis, and adjusts crypto positions on Binance. Includes full code, Claude Code prompts, and honest limitations.

intermediate 40 min claude-code

Automate DCA into Bitcoin Using Claude Code + Binance API

Step-by-step guide to building a Dollar Cost Averaging bot for Bitcoin using Claude Code and the Binance API. Full Python code, error handling, safety checks, and deployment.

beginner 30 min claude-code

Claude Code Momentum Trading Bot (2026 Guide)

Build a crypto momentum trading bot with Claude Code and Python. Full code, backtesting results, strategy logic, and a step-by-step guide to recovering from an exposed BINANCE_API_SECRET in a .env file.

intermediate 45 min claude-code

Binance Agent Skills for AI Trading: What They Are, How They Work, and How to Use Them with OpenClaw

A deep technical guide to Binance Agent Skills Hub — the open skills marketplace giving AI agents native crypto access. Covers all seven skills, architecture, OpenClaw integration, code examples, custom skill development, and security.

intermediate 35 min openclaw binance

OKX OnchainOS Agent SDK: The Definitive Guide to AI-Powered Onchain Trading

A deep technical walkthrough of OKX OnchainOS — the AI agent toolkit that lets bots trade, swap, bridge, and manage wallets across 60+ chains. How it works, how to integrate it with OpenClaw, and how to build autonomous trading workflows.

intermediate 35 min openclaw okx

I Asked Claude Code to Build a Grid Trading Bot. Here's the Code It Wrote.

A real walkthrough of using Claude Code to generate a complete grid trading bot in Python with ccxt. Includes the prompts, the code, what went wrong, and the fixes.

intermediate 45 min claude-code binance

Build a Simple DCA Bot with AI in 20 Minutes (Python)

Use Claude Code to generate a complete Dollar Cost Averaging trading bot in Python. Includes code, backtesting, and deployment tips.

intermediate 20 min claude-code binance

Claude Code + Binance API: Complete Setup Guide

Set up Claude Code with the Binance API for trading bots. Covers API key creation, .env security, what to do if BINANCE_API_SECRET is exposed, and your first working script.

beginner 30 min claude-code binance

Which bot type should you build?

Bot type Works best in Underperforms in Tutorial
DCA bot Any market — reduces entry-price timing risk Sharp one-day drops before the next scheduled buy DCA bot (Python)
Grid bot Sideways / range-bound price action Strong trends — open buy orders accumulate losses Grid trading bot
Momentum bot Clear trending markets with strong volume Choppy / low-volume markets — whipsaw signals Momentum bot
News-reactive bot High-volatility events (CPI, Fed decisions, earnings) Quiet periods — false signals on thin news flow News-reactive bot

AI bot-building FAQ

What does “build bots with AI” actually mean?

It means using AI coding tools (Claude Code, Cursor, ChatGPT) to generate and iterate on trading bot code: strategy logic, exchange API integration, backtesting, and deployment — faster than writing everything manually.

Do I need to be a programmer?

No, but you do need to think like an engineer: define entry/exit rules, understand risk, and verify code before it touches real money.

Which exchange APIs do you cover?

We focus on common crypto exchange workflows. The core patterns — API keys, orders, risk checks, logging — transfer across exchanges even when endpoints differ.

Where should I start?

Start with AI Trading 101, then follow an exchange API setup guide and build a simple bot before attempting more complex systems.

Is it safe to give a trading bot my exchange API keys?

Yes, with the right configuration. Disable withdrawals on every bot key — a leaked key can then only trade, not move funds. Enable IP whitelisting if your server has a static IP address. Store keys in a .env file that is listed in .gitignore and never commit them to source code. Rotate keys if you suspect any exposure. See the Binance API setup guide for a full checklist.

What is the difference between a momentum bot and a grid bot?

A momentum bot buys when price is trending strongly and exits when that momentum fades — it profits in trending markets but struggles when price chops sideways. A grid bot places buy and sell orders at fixed price intervals and profits from oscillation — it works in range-bound markets but underperforms during strong directional moves. They are complementary: grid for sideways, momentum for breakouts.

Which exchange should I start with for my first AI trading bot?

Binance is the most beginner-friendly: the API is well-documented, the ccxt library supports it fully, and there is extensive community knowledge. For US traders, Alpaca offers a paper-trading mode that is excellent for testing bots risk-free. For crypto derivatives, Bybit and OKX both have clean APIs and solid documentation. See the exchange table above for links to each tutorial.

What is an MCP trading bot?

MCP (Model Context Protocol) is an open standard that lets AI models call external tools through a typed interface. An MCP trading bot uses a small local MCP server that exposes exchange API calls — place order, cancel order, fetch balance — as named tools. A Claude Code session can then read prices and manage positions without you writing the exchange integration yourself. The MCP server handles authentication and API details; you describe your strategy in plain language and Claude Code generates the logic. See the Bybit MCP bot and Bitget MCP bot tutorials for concrete examples.

How do I test a trading bot before running it with real money?

Start with paper trading or testnet mode. Binance Testnet (testnet.binance.vision) lets you trade with fake funds against realistic market data. Alpaca has a built-in paper-trading mode. For custom bots, add a DRY_RUN flag that logs intended orders without submitting them. After paper testing, run with a small real allocation for at least two weeks before scaling up. Watch for edge cases: API timeouts, positions already at your size limit, and market moves that happen faster than your loop interval.

Got stuck? Have questions?

Join our Telegram group to ask questions, share your bots, and connect with other AI traders.

Join Telegram