Autonomous Base chain crypto trading bot with AI-powered analysis. Scans DexScreener, executes swaps via 0x, manages positions with tiered trailing stop-loss, and sends Telegram alerts.
An AI-powered autonomous trading agent for the Base chain (L2 Ethereum). It scans DexScreener for high-momentum tokens, uses Claude to analyze and filter candidates, executes swaps via the 0x aggregator, and manages positions with an adaptive tiered trailing stop-loss.
| Variable | Required | Description |
|---|---|---|
PRIVATE_KEY | ✅ | Wallet private key for executing trades on Base |
TELEGRAM_BOT_TOKEN | ✅ | Telegram bot token from @BotFather |
TELEGRAM_CHAT_ID | ✅ | Your Telegram chat ID for notifications |
ZEROX_API_KEY | ✅ | 0x Swap API key (free at dashboard.0x.org) |
ANTHROPIC_API_KEY | Recommended | Claude API key for AI-powered trade analysis |
BASE_RPC_URL | Optional | Base chain RPC (default: https://mainnet.base.org) |
DRY_RUN | Optional | Set true to simulate trades without executing |
SCAN_INTERVAL_MIN | Optional | Scan interval in minutes (default: 15) |
MAX_POSITIONS | Optional | Max concurrent positions (default: 5) |
TRADE_PERCENT | Optional | % of USDC balance per trade (default: 10) |
ETH_WARN_THRESHOLD | Optional | ETH balance warning level (default: 0.001) |
SLIPPAGE_BPS | Optional | Slippage tolerance in bps (default: 100 = 1%) |
/status — Overview of balances and positions/portfolio — Detailed position list with P&L and stop-loss levels/balance — ETH + USDC balances with wallet address/history — Last 10 trades/pause — Pause autonomous trading/resume — Resume trading/sell <address> — Force-sell a position/blacklist <address> — Blacklist a token from future buys# Install dependencies
cd {baseDir}
npm install
# Build
npm run build
# Run (with .env file or exported env vars)
npm start
# Or development mode
npm run dev
Designed for Railway deployment:
railway.toml pre-configured