A Discord bot that provides cryptocurrency price data, technical analysis, and AI-powered forecasts via slash commands. Market data is sourced from CoinGecko; forecasts are generated by Anthropic Claude.
| Command | Description |
|---|---|
/price <coin> [timeframe] |
Current price and % change. Timeframes: 1h, 24h, 3d, 7d (default: 24h) |
/analyze <coin> [timeframe] |
RSI, SMA 20/50, EMA 12/26, volume trend. Timeframes: 7d, 30d, 90d, 180d (default: 30d) |
/forecast <coin> [timeframe] |
AI analyst report with buy/hold/sell signal. Timeframes: 7d, 30d, 90d, 180d (default: 30d) |
/help |
List commands and supported coins |
Supported coins: BTC, ETH, SOL, BNB, XRP, ADA, DOGE, AVAX, XDC, LINK, SUI, ZRO, ONDO, CRV, SEI
- Python 3.10+
- A Discord bot token (Discord Developer Portal)
- An Anthropic API key (console.anthropic.com)
- Optionally, a CoinGecko API key (free tier works without one)
git clone https://github.com/Tpada13/MIT_discord_bot.git
cd MIT_discord_bot
pip install -r requirements.txtCreate a .env file in the project root:
TOKEN=your_discord_bot_token
ANTHROPIC_API_KEY=your_anthropic_api_key
COINGECKO=your_coingecko_api_key # optional — omit for free-tier accesspython bot.pySlash commands sync globally on startup. First-time propagation can take up to an hour on Discord's side.
pytestbot.py # Entry point — initializes and runs the bot
cogs/crypto.py # Slash command definitions
services/
coingecko.py # CoinGecko API client
indicators.py # Technical indicator calculations (RSI, SMA, EMA)
claude_analyst.py # Claude-powered forecast generation
config.py # Supported coins, timeframes, Claude prompt constants
tests/ # pytest unit tests
To add a new coin, add its ticker and CoinGecko ID to SUPPORTED_COINS in config.py and a description to COIN_DESCRIPTIONS.