MarketAlert is a lightweight Discord bot for economic event notifications. It fetches upcoming calendar data through investpy, stores the dataset locally, and sends reminder messages to a configured Discord thread before scheduled releases.
MarketAlert is built for Discord communities, trading groups, and internal teams that want a simple way to monitor macroeconomic events such as CPI, interest-rate decisions, and other scheduled announcements.
The current version focuses on a single responsibility:
- Fetch economic calendar data
- Persist the result as a local CSV dataset
- Schedule reminders from that dataset
- Send notifications to Discord automatically
- Automated economic calendar collection via
investpy - CSV export to
data/calendar.csv - Reminder delivery 10 minutes before each event
- Daily refresh of the schedule at
00:00inUTC+8 - Discord thread-based notification workflow
MarketAlert/
├── README.md
├── LICENSE
└── MarketAlert/
├── DiscordBot.py
├── MarketWorm.py
└── config.json
MarketAlert/DiscordBot.pyStarts the Discord client, loads the calendar file, creates reminder tasks, and sends alerts.MarketAlert/MarketWorm.pyRequests economic calendar data frominvestpyand writes the result todata/calendar.csv.MarketAlert/config.jsonStores the bot token and the Discord target identifiers.
- Python
3.10+ discord.pyinvestpy
git clone https://github.com/CodeRyoStudio/MarketAlert.git
cd MarketAlert/MarketAlertpip install discord.py investpyEdit config.json with your Discord values:
{
"discord_bot_token": "YOUR_BOT_TOKEN",
"Guild": 123456789012345678,
"Thread": 123456789012345678
}python3 DiscordBot.py| Key | Type | Description |
|---|---|---|
discord_bot_token |
string |
Discord bot token |
Guild |
integer |
Discord server ID |
Thread |
integer |
Discord thread ID used for alert delivery |
DiscordBot.pyloadsconfig.jsonDiscordBot.pystartsMarketWorm.pyMarketWorm.pyfetches calendar data frominvestpy- The result is saved to
data/calendar.csv DiscordBot.pyreads the CSV and creates reminder tasks- The bot posts an alert to the configured Discord thread when the target time is reached
- The bot should be started from the
MarketAlert/directory - Events marked as
Tentativeare normalized to00:00 - Reminder timing is currently fixed at
10 minutes before release - The scheduler refreshes automatically once per day
- Runtime behavior currently depends on local files and the working directory
- No slash-command support in the current implementation
- No in-Discord configuration workflow
- Notification filters are static
- The current repository does not yet include a packaged deployment flow or environment-based configuration
The following improvements would make the project more production-ready:
- Slash commands for setup and administration
- Configurable reminder timing
- Event filtering by country, currency, or importance
- Better deployment and environment management
- Logging, error handling, and health monitoring improvements
Released under the MIT License.