Skip to content

wen82fastik/ai-crypto-cryptocurrency-trading-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Trading Bot — AI Crypto, Forex & Stock Automated Trading 2026

Python License GitHub Stars GitHub Forks

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.


Download Build

Simple & fast installation for Desktop (v1.0.0-build)


📖 Table of Contents


🌟 What is this?

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

🚀 Features

🤖 AI & LLM Trading Engine

  • 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

📊 Crypto Trading Bot Features

  • 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 Features

  • 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)

📈 Stock Trading Bot Features

  • 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 & On-Chain Bot Features

  • 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

🌐 Supported Markets & Exchanges

Centralized Exchanges (CEX)

Exchange Spot Futures Margin Options
Binance
Hyperliquid
Bybit
OKX
Coinbase Advanced
KuCoin
Gate.io
MEXC
Bitget
Deribit
Phemex
Kraken

Decentralized Exchanges (DEX)

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

Traditional Markets

Market Provider
Forex MT4/MT5 MetaAPI, MetaTrader bridge
US Stocks Alpaca, Interactive Brokers, Tradier
Options Tastytrade, TD Ameritrade
Futures NinjaTrader, Rithmic

🧠 AI / LLM Engine

Supported Models

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",
}

Multi-Agent Architecture

┌─────────────────────────────────────────────────────────┐
│                   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  │
 └─────────┘ └─────────┘ └─────────┘ └────────────┘

LangGraph Agent Loop

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"})

📈 Trading Strategies

Crypto Strategies

  • 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 Strategies

  • 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 Strategies

  • 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

DeFi Strategies

  • 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 Trading

# 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 5

Features:

  • 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

⛓️ DeFi & On-Chain

  • 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 & Stocks

# 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


📡 Signal Sources

Technical Indicators

  • 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

Sentiment & On-Chain

  • 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

📱 Telegram Interface

/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

🧪 Backtesting

python backtest.py --strategy ai_agent --pair BTC/USDT \
  --start 2022-01-01 --end 2024-12-31 --timeframe 1h --capital 10000
Strategy    : 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.


📦 Installation

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 -d

⚙️ Configuration

llm:
  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

🛡️ Risk Management

  • 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)

🗺️ Roadmap

  • 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

🤝 Contributing

PRs welcome. See CONTRIBUTING.md.


📄 License

MIT License. See LICENSE.


📊 SEO

trading bot · ai trading bot · crypto trading bot · forex trading bot · ai crypto trading bot · ai stock trading bot · solana trading bot · cryptocurrency trading bot · bitcoin trading bot · ethereum trading bot · binance trading bot · hyperliquid trading bot · bybit trading bot · okx trading bot · coinbase trading bot · kucoin trading bot · automated trading bot · best trading bot · best trading bot 2025 · best trading bot 2026 · free trading bot · open source trading bot · trading bot python · trading bot github · trading bot crypto · ai trading bot crypto · ai trading bot python · ai trading bot github · ai trading bot free · best ai trading bot · best ai trading bot 2025 · best ai trading bot 2026 · crypto trading bot python · crypto trading bot github · crypto trading bot free · best crypto trading bot · best crypto trading bot 2025 · best crypto trading bot 2026 · open source crypto trading bot · automated crypto trading bot · crypto trading bot tutorial · cryptocurrency trading bot python · cryptocurrency trading bot github · open source cryptocurrency trading bot · best cryptocurrency trading bot · automated cryptocurrency trading · cryptocurrency trading bot 2025 · cryptocurrency trading bot 2026 · crypto currency trading bot · forex trading bot python · forex trading bot github · best forex trading bot · automated forex trading bot · forex trading bot free · forex trading bot mt4 · forex trading bot mt5 · forex scalping bot · forex grid trading bot · forex arbitrage bot · ai forex trading bot · best forex trading bot 2025 · best forex trading bot 2026 · forex trading bot open source · ai stock trading bot python · ai stock trading bot github · automated stock trading bot · best stock trading bot · stock trading bot python · stock scalping bot · stock arbitrage bot · options trading bot · stock trading bot free · ai stock trading bot free · stock trading bot 2025 · solana trading bot python · solana trading bot github · solana sniper bot · solana mev bot · solana copy trading bot · solana arbitrage bot · solana dex trading bot · solana ai trading bot · best solana trading bot · solana trading bot 2025 · solana trading bot 2026 · hyperliquid trading bot python · hyperliquid ai bot · hyperliquid sniper bot · hyperliquid copy trading · hyperliquid perp bot · best hyperliquid bot · hyperliquid bot 2025 · binance trading bot python · binance ai trading bot · binance futures bot · binance grid trading bot · binance dca bot · binance scalping bot · binance arbitrage bot · best binance trading bot · bybit trading bot python · bybit ai bot · bybit grid bot · bybit futures bot · best bybit bot · okx trading bot python · okx grid bot · okx futures bot · defi trading bot · defi arbitrage bot · defi sniper bot · defi yield bot · defi bot python · flash loan arbitrage bot · uniswap trading bot · uniswap v4 bot · pancakeswap bot · raydium trading bot · jupiter trading bot · mev bot · solana mev bot · ethereum mev bot · copy trading bot · copy trading bot crypto · smart money copy trading bot · on chain copy trading bot · whale copy trading bot · crypto copy trading python · ethereum copy trading bot · defi copy trading bot · hyperliquid copy trading bot · arbitrage bot · crypto arbitrage bot · triangular arbitrage bot · cross exchange arbitrage bot · statistical arbitrage bot · latency arbitrage bot · defi flash loan arbitrage bot · grid trading bot · crypto grid trading bot · forex grid trading bot · binance grid bot · dca bot · dca bot crypto · crypto dca bot python · dollar cost averaging bot crypto · scalping bot · crypto scalping bot · forex scalping bot · stock scalping bot · hft bot crypto · futures trading bot · crypto futures trading bot · perpetual futures bot · binance futures bot · options trading bot python · crypto options bot · stock options bot · deribit bot · langchain trading bot · langgraph trading bot · langchain crypto bot · langchain forex bot · llm trading bot · gpt trading bot · gpt-4 trading bot · claude trading bot · deepseek trading bot · deepseek crypto bot · llama trading bot · openai trading bot · anthropic trading bot · reinforcement learning trading bot · lstm crypto bot · transformer trading bot · machine learning trading bot · deep learning trading bot · neural network trading bot · ai hedge fund crypto · multi agent trading bot · autonomous trading agent · ai portfolio manager crypto · agentic trading bot · llm crypto agent · ai trading agent python · telegram trading bot · crypto telegram bot · telegram crypto bot python · binance telegram bot · trading bot telegram notifications · crypto price alert bot · whale alert telegram bot · defi telegram bot · crypto portfolio tracker telegram · forex telegram bot · backtesting trading bot · crypto backtesting · freqtrade custom strategy · backtrader crypto · jesse trading bot · vectorbt backtesting · zipline crypto · trading bot backtesting python · rsi trading bot · macd trading bot · bollinger bands bot · ema crossover bot · technical analysis bot crypto · momentum trading bot · mean reversion bot · on chain analytics bot · whale tracker bot · smart wallet tracker · crypto whale tracker · news trading bot crypto · sentiment analysis bot · fear greed index bot · twitter trading bot · polymarket trading bot · prediction market bot · polymarket ai agent · polymarket python · mcp trading server · crypto mcp server · claude mcp crypto · mcp trading bot · bitcoin bot · ethereum bot · solana bot · bnb bot · avalanche bot · ton trading bot · sui trading bot · arbitrum bot · base chain bot · polygon bot · optimism bot · how to build a trading bot python · trading bot tutorial · trading bot for beginners · simple trading bot python · trading bot with backtesting · trading bot docker · trading bot websocket · trading bot api · crypto bot 2025 · crypto bot 2026 · profitable trading bot github · open source trading bot 2025 · open source trading bot 2026 · free crypto bot github · best open source trading bot · trading bot python github · automated trading python github

About

AI cryptocurrency trading bot: LLM agents, Binance, Hyperliquid, Bybit, Solana DEX, copy trading, arbitrage, DCA, grid, scalping, backtesting. Python. Crypto trading bot open source 2026.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages