Discord bot for tracking cryptocurrency and asset prices with beautiful charts.
- Multiple independent bot instances, one per ticker
- Real-time price updates via Pyth Network, Yahoo Finance, GoldSilver.ai, and DexScreener
- Discord nicknames display ticker + current price
- Status cycles through BTC/ETH/SOL conversions and 1h change
- Historical price charts with high/low markers
- Detailed price embeds with 24h/7d/30d percentage changes
- PostgreSQL for persistent price history
- Lightweight Alpine-based Docker image (~266MB)
cp .env.example .env
# Edit .env with your Discord bot tokens
docker-compose up -d --buildGenerate a price chart with high/low markers and percentage change.
/chart price timeframe:2w
| Option | Default | Examples |
|---|---|---|
| timeframe | 24h | 1h, 6h, 12h, 24h, 48h, 1w, 2w, 30d, 3m |
Display current price with conversions and percentage changes.
/price current
/price current crypto:ETH
Shows USD price, 24h/7d/30d changes, and BTC/ETH/SOL conversions.
| Ticker | Source |
|---|---|
| BTC, ETH, SOL, and other Pyth feeds | Pyth Network |
| DXY | Yahoo Finance |
| SSILVER | GoldSilver.ai |
| Any DexScreener pair (e.g. CYB, Solana altcoins) | DexScreener |
DexScreener is used for tokens that aren't listed on Pyth Network — Solana altcoins, pump.fun tokens, etc.
1. Get the pair address
Open any token's page on DexScreener and copy the pair part of the URL. The URL format is:
https://dexscreener.com/<chain>/<pair_address>
e.g. https://dexscreener.com/solana/chvehkrbncdpdr1od9eya1vp635wwfdzgxdzexxt6v96
Here solana is the chain and chvehkrbncdpdr1od9eya1vp635wwfdzgxdzexxt6v96 is the pair address. You need both.
2. Add a bot token
DISCORD_TOKEN_CYB=your_cyb_bot_token_here3. Add the pair to DEXSCREENER_FEEDS
Add an entry in the format TICKER:<chain>/<pair_address>:
DEXSCREENER_FEEDS=CYB:solana/chvehkrbncdpdr1od9eya1vp635wwfdzgxdzexxt6v96Add multiple pairs by separating with commas:
DEXSCREENER_FEEDS=CYB:solana/<pair_address>,FOO:ethereum/<pair_address>4. Rebuild
docker-compose up -d --buildThe bot will automatically pick up the new ticker and start showing its price (including BTC/ETH/SOL conversions and charts, once it has collected enough history).
# Bot tokens - one per ticker
DISCORD_TOKEN_BTC=your_token
DISCORD_TOKEN_CYB=your_token
# Pyth feed IDs
CRYPTO_FEEDS=BTC:feed_id,ETH:feed_id,SOL:feed_id
# DexScreener pairs (for tokens not on Pyth): TICKER:<chain>/<pair_address>
DEXSCREENER_FEEDS=CYB:solana/chvehkrbncdpdr1od9eya1vp635wwfdzgxdzexxt6v96
# Optional
UPDATE_INTERVAL_SECONDS=12- Python 3.12 (Alpine)
- discord.py
- asyncpg / PostgreSQL
- matplotlib
- aiohttp
- Docker / Docker Compose
├── bot.py # Main bot, commands, status cycling
├── database.py # PostgreSQL operations
├── price_service.py # Price fetching
├── chart_service.py # Chart generation
├── docker-compose.yml
├── Dockerfile
└── requirements.txt