A Discord bot that tracks market sentiment indicators and displays them in real-time
- π Live Market Data - Fetches CNN Fear & Greed Index automatically
- π° Crypto Sentiment - Tracks Crypto Fear & Greed Index from Alternative.me
- π€ Dynamic Updates - Changes bot nickname and status based on market sentiment
- β° Scheduled Updates - Configurable automatic updates with timezone support
- π¨ Customizable Templates - Create your own display format per server
- π Multiple Providers - Combine stock and crypto data in one display
- π³ Docker Ready - Easy deployment with Docker and docker-compose
- π Historical Charts - Visualize Fear & Greed trends over time with color-coded zones
- π Free & Open Source - No API keys required (uses public data)
- Python 3.9+
- Discord Bot Token (Get one here)
- Docker (optional, for containerized deployment)
# Clone the repository
git clone https://github.com/VikStoykov/Tychra.git
cd Tychra
# Create virtual environment
python3 -m venv bot-env
source bot-env/bin/activate # On Windows: bot-env\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env and add your DISCORD_TOKEN
# Run the bot
python3 main.py# Pull the image
docker pull vikstoykov/tychra:latest
# Run with environment file
docker run -d \
--name tychra-bot \
--env-file .env \
--restart unless-stopped \
vikstoykov/tychra:latest# Edit .env file with your settings
docker-compose up -dCreate a .env file with the following variables:
# Required: Your Discord bot token
DISCORD_TOKEN=your_discord_bot_token_here
# Optional: Timezone for scheduled updates (default: UTC)
TIMEZONE=UTC
# Optional: Cron schedule for automatic updates (standard cron format)
# Format: "MINUTE HOUR DAY MONTH DAYOFWEEK"
SCHEDULE_CRON=0 9,18 * * *# Every 5 minutes
SCHEDULE_CRON=*/5 * * * *
# Every day at 8:00 AM
SCHEDULE_CRON=0 8 * * *
# Every day at 1:15 PM
SCHEDULE_CRON=15 13 * * *
# Every 6 hours
SCHEDULE_CRON=0 */6 * * *
# Weekdays at 9:30 AM (Monday-Friday)
SCHEDULE_CRON=30 9 * * 1-5
# Twice daily at 9 AM and 6 PM
SCHEDULE_CRON=0 9,18 * * *
# First day of every month at midnight
SCHEDULE_CRON=0 0 1 * *Cron Format: MINUTE HOUR DAY MONTH DAYOFWEEK
- MINUTE: 0-59
- HOUR: 0-23
- DAY: 1-31
- MONTH: 1-12
- DAYOFWEEK: 0-7 (0 and 7 are Sunday)
Special characters:
*- Any value,- Value list separator (1,3,5)-- Range of values (1-5)/- Step values (*/5 = every 5)
# UTC (default)
TIMEZONE=UTC
# Eastern Time
TIMEZONE=America/New_York
# European time zones
TIMEZONE=Europe/London
TIMEZONE=Europe/Sofia
# Asian time zones
TIMEZONE=Asia/TokyoThese commands require Administrator permission:
/setnickname <template>- Set the bot's nickname template/setstatus <template>- Set the bot's status template/showtemplates- View current templates and available placeholders/forceupdate- Trigger an immediate update
Available to all users:
/about- Show bot information/chart [days] [provider]- Generate Fear & Greed Index chartdays(optional): Number of days to display (1-365, default: 10)provider(optional): Choose "Stock Market" or "Cryptocurrency" (default: Stock Market)
Stock Market (prefix: m)
| Placeholder | Description | Example |
|---|---|---|
{m.index} |
Stock market index (0-100) | 42 |
{m.emotion} |
Stock market emotion | Fear |
{m.emoji} |
Stock market emoji | π¨ |
{m.trend} |
Stock market trend | βοΈ falling |
Crypto Market (prefix: c)
| Placeholder | Description | Example |
|---|---|---|
{c.index} |
Crypto market index (0-100) | 67 |
{c.emotion} |
Crypto market emotion | Greed |
{c.emoji} |
Crypto market emoji | π |
{c.trend} |
Crypto market trend | βοΈ rising |
# Stock market only
/setnickname F/G: {m.index}
/setstatus {m.emotion} {m.emoji} - {m.trend}
# Crypto market only
/setnickname Crypto: {c.index}
/setstatus {c.emotion} {c.emoji}
# Combine both markets
/setnickname S:{m.index} C:{c.index}
/setstatus π{m.emoji}{m.index} | π°{c.emoji}{c.index}
# Full display with trends
/setnickname {m.emoji}{m.index} {c.emoji}{c.index}
/setstatus Market:{m.trend} Crypto:{c.trend}Generate beautiful historical charts to visualize Fear & Greed trends over time.
# Default: Last 10 days, stock market
/chart
# Custom time range
/chart days:30
# Crypto market chart
/chart provider:Cryptocurrency
# Custom range + crypto
/chart days:90 provider:Cryptocurrency- Line chart
- Color-coded zones for intuitive sentiment reading:
- π΄ 0-25: Extreme Fear (Dark Red)
- π 25-45: Fear (Orange)
- π‘ 45-55: Neutral (Yellow)
- π’ 55-75: Greed (Light Green)
- π 75-100: Extreme Greed (Green)
| Parameter | Type | Range | Default | Description |
|---|---|---|---|---|
days |
Integer | 1-365 | 10 | Number of historical days to display |
provider |
Choice | Stock Market / Cryptocurrency | Stock Market | Data source for chart |
- Go to Discord Developer Portal
- Click "New Application" and name it (e.g., "Tychra")
- Go to "Bot" section and click "Add Bot"
- Copy your bot token
- Under "Bot Permissions", enable:
- Change Nickname
- Send Messages
- Use Slash Commands
- Go to "OAuth2" β "URL Generator"
- Select scopes:
botandapplications.commands - Select permissions:
Change Nickname,Send Messages - Use the generated URL to invite the bot to your server ("OAuth2" β "URL Generator" β "Generated URL")
- Stock Market: CNN Fear & Greed Index
- Crypto Market: Alternative.me Crypto Fear & Greed Index
MIT License - see LICENSE for details.




