Skip to content

Tpada13/MIT_discord_bot

Repository files navigation

MIT Crypto Discord Bot

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.

Commands

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

Prerequisites

Installation

git clone https://github.com/Tpada13/MIT_discord_bot.git
cd MIT_discord_bot
pip install -r requirements.txt

Environment Variables

Create 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 access

Running the Bot

python bot.py

Slash commands sync globally on startup. First-time propagation can take up to an hour on Discord's side.

Running Tests

pytest

Project Structure

bot.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.

About

Discord bot that answers like a pirate

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages