A Python bot that monitors online sources every 5 minutes for news about SpaceX going public (IPO) and sends you alerts via WhatsApp (CallMeBot), Twilio SMS, or other notification providers.
- Multi-source monitoring: Google News RSS, SEC EDGAR filings, Reddit
- Two alert levels:
- 🚀 CONFIRMED: SEC S-1 filings, official announcements
- 📰 RUMOR: News articles, analyst predictions, community discussions
- Rumored date extraction: Automatically detects and includes mentioned IPO timeframes (e.g., "Q3 2026", "early 2027")
- Deduplication: Tracks seen articles to avoid duplicate notifications
- Rate limiting: Configurable max rumor SMS per hour to prevent spam
- Modular notification system: Easy to swap Twilio for another SMS/notification provider
- Graceful shutdown: Saves state on Ctrl+C
cd spacex_bot
pip install -r requirements.txtCopy the example config and edit it:
cp config.example.py config.py- Each recipient sends this WhatsApp message to +34 644 21 77 47:
I allow callmebot to send me messages - You'll receive an API key in the reply
- Edit
config.py:
NOTIFIER = "callmebot"
CALLMEBOT_RECIPIENTS = [
{"phone": "+14155551234", "apikey": "123456"},
# Add more recipients here
]NOTIFIER = "twilio"
PHONE_NUMBERS = ["+14155551234"]
TWILIO_ACCOUNT_SID = "ACxxxxxxxx..." # From twilio.com/console
TWILIO_AUTH_TOKEN = "your_auth_token" # From twilio.com/console
TWILIO_FROM_NUMBER = "+15551234567" # Your Twilio phone number# Production mode (sends real SMS, runs continuously)
python spacex_ipo_bot.py
# Test mode (console output only, runs once, no SMS)
python spacex_ipo_bot.py --test
# Run a single check cycle with SMS then exit
python spacex_ipo_bot.py --oncespacex_bot/
├── spacex_ipo_bot.py # Main bot orchestrator (scheduling, dedup, logic)
├── sources.py # Source checkers (Google News, SEC EDGAR, Reddit)
├── notifier.py # Abstract notifier interface + Twilio implementation
├── config.py # Configuration (credentials, intervals, settings)
├── requirements.txt # Python dependencies
└── README.md # This file
- Every 5 minutes, the bot queries all configured sources
- Articles are classified as "confirmed" or "rumor" based on keyword matching
- New articles (not previously seen) trigger SMS notifications
- Confirmed alerts are always sent immediately
- Rumor alerts are rate-limited (default: max 3 per hour)
- Any mentioned dates/timeframes are extracted and included in the SMS
| Source | What it checks |
|---|---|
| Google News RSS | Multiple search queries for SpaceX IPO news |
| SEC EDGAR | S-1 and S-1/A filings by Space Exploration Technologies Corp |
| r/wallstreetbets, r/stocks, r/investing, r/spacex, r/stockmarket |
The notification system is modular. To add a new provider:
- Create a new class in
notifier.pythat extendsBaseNotifier:
class VonageNotifier(BaseNotifier):
def __init__(self, api_key, api_secret, from_number, to_number):
# ...
def send_alert(self, message: str, alert_level: str) -> bool:
# Your implementation here
pass- Add it to the
create_notifier()factory function:
elif notifier_type == "vonage":
return VonageNotifier(...)- Update
config.py:
NOTIFIER = "vonage"
VONAGE_API_KEY = "..."
VONAGE_API_SECRET = "..."Create /etc/systemd/system/spacex-ipo-bot.service:
[Unit]
Description=SpaceX IPO Notification Bot
After=network.target
[Service]
Type=simple
User=your_username
WorkingDirectory=/path/to/spacex_bot
ExecStart=/usr/bin/python3 spacex_ipo_bot.py
Restart=on-failure
RestartSec=60
[Install]
WantedBy=multi-user.targetThen:
sudo systemctl enable spacex-ipo-bot
sudo systemctl start spacex-ipo-botscreen -S spacex-bot
python spacex_ipo_bot.py
# Detach with Ctrl+A, D| Setting | Default | Description |
|---|---|---|
CHECK_INTERVAL_SECONDS |
300 (5 min) | How often to check sources |
MAX_RUMOR_SMS_PER_HOUR |
3 | Max rumor alerts per hour |
NOTIFIER |
"twilio" | Notification provider to use |
LOG_FILE |
"spacex_ipo_bot.log" | Log file path |
SEEN_ARTICLES_FILE |
"seen_articles.json" | Deduplication state file |
Personal use.