The most advanced open-source AI trading bot in 2025 / 2026. Autonomous AI trading bot for cryptocurrency, forex, and stocks — powered by LLM agents (GPT-4o, Claude, DeepSeek). Works on Binance, Hyperliquid, Bybit, OKX, Coinbase, MT4/MT5, Solana DEX, Uniswap, and 30+ other exchanges. Supports crypto trading bot, forex trading bot, AI stock trading bot, copy trading, arbitrage, DCA, grid, scalping, futures, and DeFi strategies — all in one open-source Python framework.
- What is this?
- Features
- Supported Markets & Exchanges
- AI / LLM Engine
- Trading Strategies
- Copy Trading
- DeFi & On-Chain
- Forex & Stocks
- Signal Sources
- Telegram Interface
- Backtesting
- Installation
- Contributing
This is a universal AI trading bot — a single open-source Python framework that covers every major market: cryptocurrency trading bot, forex trading bot, AI stock trading bot, and DeFi trading bot in one place.
Instead of hardcoded indicators, this framework uses large language models (LLMs) as the reasoning engine. The AI trading agent reads market data, on-chain signals, news, and social sentiment — then decides autonomously when to buy, sell, or hold.
This project is designed for:
- Traders looking for a free crypto trading bot with AI capabilities
- Developers building a custom trading bot Python solution
- Quants who need a backtesting trading bot framework
- DeFi users who want a defi trading bot with on-chain automation
- Forex traders needing a forex trading bot Python compatible with MT4/MT5
- Anyone searching for the best trading bot 2025 or best trading bot 2026
- Multi-model AI support: GPT-4o, GPT-4 Turbo, Claude 3.5 Sonnet, Claude 3 Opus, DeepSeek-V3, DeepSeek-R1, Llama 3.3, Mixtral 8x22B, Gemini 1.5 Pro
- LangChain trading bot architecture with LangGraph stateful agent loops
- Multi-agent trading bot: analyst, risk manager, executor agents running in parallel
- AI hedge fund crypto architecture: capital allocation across multiple strategies
- Reinforcement learning trading bot: PPO, DQN, A3C implementations
- LSTM crypto trading bot: deep learning price prediction module
- Transformer trading bot: attention-based sequence modeling
- AI stock trading bot: LLM-powered equity analysis and execution
- AI forex trading bot: macroeconomic reasoning + technical analysis
- Autonomous trading agent: self-managing position lifecycle
- Full cryptocurrency trading bot with 30+ exchange integrations
- Bitcoin trading bot: BTC/USDT, BTC/USDC, BTC perpetuals
- Ethereum trading bot: ETH spot, futures, DeFi
- Solana trading bot: Jupiter, Raydium, Meteora DEX
- Binance trading bot: spot, futures, margin
- Hyperliquid trading bot: perpetuals with AI signals
- Bybit trading bot: spot and derivatives
- Memecoin trading bot: new token detection and sniping
- Altcoin trading bot: multi-pair portfolio rotation
- Forex trading bot Python compatible with MT4, MT5 via MetaAPI
- Automated forex trading bot: 28 major and minor pairs
- Forex scalping bot: M1/M5 timeframe high-frequency
- Forex grid trading bot: configurable grid on any pair
- Forex arbitrage bot: latency and statistical arbitrage
- Forex copy trading bot: mirror professional signal providers
- EA trading bot (Expert Advisor) generation for MetaTrader
- AI forex trading bot: macro + sentiment + technical fusion
- Pairs: EUR/USD, GBP/USD, USD/JPY, USD/CHF, AUD/USD, NZD/USD, USD/CAD, XAU/USD (Gold)
- AI stock trading bot: LLM-driven equity analysis
- Stock trading bot Python: Alpaca, Interactive Brokers, TD Ameritrade APIs
- Automated stock trading bot: pre-market, regular hours, after-hours
- Stock scalping bot: intraday momentum strategies
- Options trading bot: delta-neutral, covered calls, spreads
- ETF trading bot: sector rotation, momentum
- Penny stock trading bot: small-cap momentum scanner
- Dividend trading bot: ex-dividend capture strategy
- Stock arbitrage bot: pairs trading on correlated equities
- DeFi trading bot: yield optimization, LP management
- Flash loan arbitrage bot: Aave, Balancer flash loans
- MEV bot: sandwich, backrun, frontrun strategies
- Solana MEV bot: Jito bundle submission
- Uniswap bot: v3 and v4 LP automation
- DeFi arbitrage bot: cross-DEX price discrepancy
- Liquidation bot: Aave, Compound, MakerDAO
- Yield farming bot: auto-compound across protocols
- Liquidity provision bot: automated range management
- DeFi sniper bot: new pool detection and entry
- Token sniper bot: Raydium, Meteora new launches
- Polymarket trading bot: prediction market automation
| Exchange | Spot | Futures | Margin | Options |
|---|---|---|---|---|
| Binance | ✅ | ✅ | ✅ | ✅ |
| Hyperliquid | ✅ | ✅ | — | — |
| Bybit | ✅ | ✅ | ✅ | ✅ |
| OKX | ✅ | ✅ | ✅ | ✅ |
| Coinbase Advanced | ✅ | ✅ | — | — |
| KuCoin | ✅ | ✅ | ✅ | — |
| Gate.io | ✅ | ✅ | ✅ | — |
| MEXC | ✅ | ✅ | — | — |
| Bitget | ✅ | ✅ | — | — |
| Deribit | — | ✅ | — | ✅ |
| Phemex | ✅ | ✅ | — | — |
| Kraken | ✅ | ✅ | ✅ | — |
| Chain | DEX Protocols |
|---|---|
| Solana | Jupiter, Raydium, Meteora, Orca, Whirlpool |
| Ethereum | Uniswap v4, Curve, Balancer, 1inch, 0x |
| Arbitrum | Camelot, GMX, Vertex |
| Base | Aerodrome, BaseSwap |
| BNB Chain | PancakeSwap, Venus |
| Optimism | Velodrome, Synthetix |
| Avalanche | Trader Joe, Pangolin |
| TON | DeDust, STON.fi |
| SUI | Cetus, Turbos |
| Market | Provider |
|---|---|
| Forex MT4/MT5 | MetaAPI, MetaTrader bridge |
| US Stocks | Alpaca, Interactive Brokers, Tradier |
| Options | Tastytrade, TD Ameritrade |
| Futures | NinjaTrader, Rithmic |
SUPPORTED_MODELS = {
# OpenAI
"gpt-4o": "Best overall reasoning for trading",
"gpt-4-turbo": "Fast and capable",
"gpt-3.5-turbo": "Budget option",
# Anthropic
"claude-3-5-sonnet": "Excellent for complex analysis",
"claude-3-opus": "Maximum reasoning depth",
# DeepSeek
"deepseek-v3": "Best cost/performance ratio",
"deepseek-r1": "Chain-of-thought reasoning",
# Open Source / Local
"llama-3.3-70b": "Best open source model",
"mixtral-8x22b": "Fast mixture of experts",
"qwen2.5-72b": "Strong multilingual",
# Google
"gemini-1.5-pro": "Long context analysis",
}┌─────────────────────────────────────────────────────────┐
│ ORCHESTRATOR AGENT │
│ Coordinates capital allocation & timing │
└──────┬──────────┬──────────┬──────────┬─────────────────┘
│ │ │ │
┌─────▼───┐ ┌───▼─────┐ ┌──▼──────┐ ┌─▼──────────┐
│ANALYST │ │ RISK │ │SENTIMENT│ │ EXECUTOR │
│ AGENT │ │ AGENT │ │ AGENT │ │ AGENT │
│Technical│ │Position │ │News+ │ │Order route │
│Onchain │ │sizing │ │Social │ │TP/SL mgmt │
└─────────┘ └─────────┘ └─────────┘ └────────────┘
from langgraph.graph import StateGraph
workflow = StateGraph(TradingState)
workflow.add_node("collect_data", collect_market_data)
workflow.add_node("analyze", llm_analyze)
workflow.add_node("risk_check", risk_management)
workflow.add_node("execute", execute_trade)
workflow.add_node("monitor", monitor_positions)
agent = workflow.compile()
agent.invoke({"market": "BTC/USDT", "exchange": "binance"})- AI agent strategy: full LLM reasoning on every trade decision
- Crypto arbitrage bot: triangular, cross-exchange, statistical
- Crypto scalping bot: 1m/3m/5m high-frequency scalping
- Crypto grid trading bot: configurable grid with AI range optimization
- DCA bot crypto: dollar-cost averaging with dynamic intervals
- Crypto futures trading bot: long/short perpetuals with funding awareness
- Mean reversion crypto bot: Bollinger + RSI reversion
- Momentum trading bot crypto: trend-following with AI confirmation
- Crypto market making bot: passive spread capture
- Pairs trading crypto bot: cointegration stat arb
- Crypto options bot: delta-neutral, covered strategies on Deribit
- Forex scalping bot: 5-15 pip targets on M1/M5
- Forex swing trading bot: multi-day position holding
- Forex grid bot: configurable grid on EUR/USD, GBP/USD
- Forex news trading bot: economic calendar event trading
- Forex carry trade bot: interest rate differential automation
- Forex breakout bot: range breakout with volume confirmation
- Stock momentum bot: relative strength rotation
- Stock mean reversion bot: statistical pullback entries
- Options selling bot: credit spreads, iron condors
- Earnings bot: pre/post earnings volatility plays
- Gap trading bot: overnight gap fill strategy
- Sector rotation bot: ETF momentum rotation
- Flash loan arbitrage bot: zero-capital cross-DEX arbitrage
- Liquidity provision bot: concentrated liquidity management
- Yield optimization bot: auto-compound farming
- MEV arbitrage bot: mempool opportunity capture
- Liquidation bot: under-collateralized position liquidation
# Copy a Solana whale wallet
python main.py --strategy copy_trading \
--wallet 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU \
--chain solana --size-ratio 0.1
# Copy a Binance trader
python main.py --strategy copy_trading \
--trader BINANCE_TRADER_ID --exchange binance
# Copy top Hyperliquid traders
python main.py --strategy copy_trading \
--exchange hyperliquid --top-traders 5Features:
- Smart money copy trading bot: filters wallets by PnL, win rate, drawdown
- On-chain copy trading bot: Solana, Ethereum, Arbitrum, Base
- Whale copy trading bot: monitors large wallets and mirrors proportionally
- Solana copy trading bot: Jupiter + Raydium execution
- Ethereum copy trading bot: Uniswap + 1inch routing
- Hyperliquid copy trading: top perpetuals traders mirroring
- Forex copy trading bot: mirror MT4/MT5 signal providers
- Stock copy trading bot: mirror institutional 13F filings
- Whale tracker trading bot: monitors top 1000 wallets per chain
- Smart wallet tracker: identifies consistently profitable addresses
- On-chain copy trading: auto-executes when target wallet trades
- Token launch sniper: detects new pools on Raydium/Uniswap in milliseconds
- Supported protocols: Aave v3, Compound v3, Uniswap v4, Curve v2, GMX v2, Hyperliquid, Yearn v3, Pendle, Polymarket
# Forex — MT5 via MetaAPI
bot = ForexScalpingBot(client=MT5Client(...), pair="EURUSD", timeframe="M5")
bot.run()
# Stocks — Alpaca
bot = AIStockTradingBot(client=AlpacaClient(..., paper=True),
symbols=["AAPL","NVDA","MSFT","TSLA","SPY"])
bot.run()Supported forex pairs: EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CAD, USD/CHF, NZD/USD, EUR/GBP, EUR/JPY, GBP/JPY, XAU/USD, XAG/USD, US30, US500, NAS100
- RSI trading bot Python: divergence, oversold/overbought
- MACD trading bot Python: crossover, histogram momentum
- Bollinger Bands bot crypto: volatility squeeze and breakout
- EMA/SMA crossover bot: golden cross, death cross
- Ichimoku trading bot: cloud breakout signals
- VWAP trading bot: intraday mean reversion
- ATR bot: volatility-adjusted position sizing
- News trading bot crypto: CryptoPanic, Messari, The Block
- Twitter/X sentiment bot: real-time crypto Twitter analysis
- Reddit sentiment bot: r/CryptoCurrency, r/Bitcoin, r/wallstreetbets
- Fear & Greed Index bot: macro positioning automation
- On-chain analytics bot: exchange inflows/outflows, funding rates, open interest
/start — Start the trading bot
/stop — Stop all strategies
/status — Show open positions and PnL
/balance — Show exchange balances
/buy BTC 100 — Manual buy order
/sell ETH all — Close ETH position
/strategy list — List available strategies
/set risk 2 — Set risk per trade to 2%
/backtest — Run quick backtest
/report — Daily PnL report
python backtest.py --strategy ai_agent --pair BTC/USDT \
--start 2022-01-01 --end 2024-12-31 --timeframe 1h --capital 10000Strategy : AI Agent (DeepSeek-V3)
Period : 2023-01-01 → 2024-12-31
Total Trades: 1,247
Win Rate : 62.8%
Profit Factor: 1.94
Sharpe Ratio: 2.31
Max Drawdown: -11.2%
Total Return: +204.7%
Compatible with Freqtrade, Backtrader, Jesse, Vectorbt, Zipline.
git clone https://github.com/wen82fastik/ai-crypto-cryptocurrency-trading-bot.git
cd ai-crypto-cryptocurrency-trading-bot
pip install -r requirements.txt
cp .env.example .env
python main.py --strategy ai_agent --exchange binance --pair BTC/USDT# Docker
docker-compose up -dllm:
provider: deepseek
model: deepseek-v3
temperature: 0.1
exchange:
name: binance
market_type: futures
strategy:
name: ai_agent
pairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT"]
risk_per_trade: 0.02
telegram:
enabled: true
token: YOUR_BOT_TOKEN
chat_id: YOUR_CHAT_ID- Per-trade risk limit (default 2%)
- Daily drawdown circuit breaker
- Max open positions cap
- Correlation exposure filter
- Hard leverage limits per exchange
- Slippage protection
- Volatility circuit breaker (auto-pause on >15% candles)
- API key permission hardening (no withdrawal rights)
- Binance, Bybit, OKX, Hyperliquid, Coinbase
- Solana DEX (Jupiter, Raydium, Meteora)
- Ethereum DEX (Uniswap v4, Curve)
- LangChain multi-agent architecture
- Copy trading module
- Telegram bot interface
- Backtesting engine
- Forex MT4/MT5 integration
- Stock trading (Alpaca, IBKR)
- Polymarket prediction market bot
- MCP server (control bot from Claude Desktop)
- Web dashboard (React + FastAPI)
- Mobile app (iOS / Android)
- TON / SUI full support
PRs welcome. See CONTRIBUTING.md.
MIT License. See LICENSE.