Skip to content

About

Telegram bot tracking weekly Polymarket events for Elon Musk tweet count

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Polymarket Tracker

Polymarket tracker bot for monitoring selected prediction markets and maintaining a tracked market list. It supports add/delete/list/history/status, mute/unmute, and buffer controls for alert noise management.

Features

  • Tracks configured Polymarket markets and history.
  • Provides Telegram commands for adding, deleting, listing, muting, unmuting, and status checks.
  • Includes buffer controls to reduce noisy alerts.

Architecture

  • Repository: MilaArtyNew/polymarket-tracker
  • Primary stack: Python, systemd, Railway
  • Entrypoints and scripts:
    • main.py
  • Notable dependencies: aiogram, aiosqlite, apscheduler, beautifulsoup4, httpx, lxml, pydantic-settings, pytest, sqlalchemy[asyncio]

Configuration

Configure the service with environment variables. Do not commit real secrets to the repository.

  • ADMIN_CHAT_ID — required or optional runtime configuration. See deployment environment for the actual value.
  • DATABASE_URL — required or optional runtime configuration. See deployment environment for the actual value.
  • POLYMARKET_GAMMA_API_URL — required or optional runtime configuration. See deployment environment for the actual value.
  • TELEGRAM_BOT_TOKEN — required or optional runtime configuration. See deployment environment for the actual value.
  • XTRACKER_BASE_URL — required or optional runtime configuration. See deployment environment for the actual value.
  • XTRACKER_SOURCE_URL — required or optional runtime configuration. See deployment environment for the actual value.

Setup

git clone https://github.com/MilaArtyNew/polymarket-tracker
cd polymarket-tracker
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Running Locally

python main.py

Bot Commands

  • /add — Add a tracked item.
  • /buffer_off — Disable alert buffer.
  • /buffer_on — Enable alert buffer.
  • /buffer_value — Show or set alert buffer value.
  • /count — Show tracked market/item count.
  • /delete — Delete a tracked item.
  • /history — Show historical records.
  • /list — List tracked items.
  • /mute — Mute alerts.
  • /status — Show current service or strategy status.
  • /unmute — Unmute alerts.

If a command requires extra input and the argument is missing, the bot should ask a follow-up question instead of failing silently.

Deployment Notes

  • Keep secrets in the deployment platform environment variables, not in Git.
  • Use the default branch as the source of truth for deployments.
  • Check logs after every deployment and verify the /status or health endpoint when available.
  • If the project uses a scheduler, verify timezone assumptions and idempotency before enabling it in production.

Operational Notes

  • Review logs after startup for missing environment variables or API authentication errors.
  • Keep command names in English and document every user-facing command in this README.
  • For Telegram bots, /help should list the same commands documented here.
  • Inline buttons should edit the original message with the final status rather than sending duplicate messages.

Troubleshooting

  • Bot does not respond: verify the bot token, webhook/polling mode, and chat permissions.
  • Missing data: check API keys, rate limits, and upstream service status.
  • Deployment starts but exits: inspect platform logs for missing environment variables or import errors.
  • Commands differ from README: update the command list here and in the bot command menu at the same time.

Security

  • Never commit .env files, API keys, private keys, Telegram tokens, or session strings.
  • Use .env.example for placeholders only.
  • Rotate any credential that was accidentally committed.

About

Telegram bot tracking weekly Polymarket events for Elon Musk tweet count

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages