A Telegram bot for tracking and analyzing Polymarket prediction markets in real-time.
- Real-time Monitoring: Automatic notifications for new Polymarket events
- Market Analysis: Detailed event statistics including liquidity, volume, and current odds
- AI Context: Market context powered by Polymarket's API
- Smart Filtering: Filter events by custom keywords
- Pause/Resume: Control notifications on-demand
/start- Subscribe to event notifications/deal <link>- Analyze a specific Polymarket event/keywords- Set keyword filters for events/pause- Pause notifications/resume- Resume notifications/help- Show help information
- Python 3.8 or higher
- A Telegram Bot Token from @BotFather
- Clone the repository:
git clone https://github.com/yourusername/polytrack.git
cd polytrack- Install dependencies:
pip install -r requirements.txt- Create a configuration file:
# Create config.py with your bot token
echo BOT_TOKEN = "your_bot_token_here" > config.pyAlternatively, create a .env file:
BOT_TOKEN=your_bot_token_here- Run the bot:
python bot.pyThe bot uses the following files for data persistence:
users.json- Stores subscribed user IDsseen_events.json- Tracks processed eventskeywords.json- Stores user keyword filterspaused_users.json- Tracks users who paused notifications
These files are automatically created and managed by the bot.
/deal https://polymarket.com/event/presidential-election-winner-2024
/keywords btc, eth, crypto
/keywords "artificial intelligence", tech
/keywords clear
The bot supports:
- Simple keywords:
btc,election,sports - Phrases with quotes:
"united states","world cup" - Multiple keywords (OR logic):
btc, eth, sports
/pause # Stop receiving notifications
/resume # Start receiving notifications again
The bot integrates with:
- Polymarket Gamma API: For event data and market information
- Polymarket Grok API: For AI-generated market context
polytrack/
├── bot.py # Main bot application
├── config.py # Configuration (token)
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
└── README.md # Documentation
Contributions are welcome. Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
This bot is for informational purposes only. Always do your own research before making any predictions or financial decisions.