Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poly_bot

Async Telegram bot prototype that tracks user-declared PolyMarket positions using only public data.

Setup

  1. Install Python 3.11+ and dependencies:
pip install -r requirements.txt
python -m playwright install chromium  # per lo scraping headless
  1. Set your bot token (BotFather):
export TELEGRAM_BOT_TOKEN=<your_token>

Oppure crea un file .env nella root del progetto:

TELEGRAM_BOT_TOKEN=<your_token>
# opzionale
TRADES_FILE=trades.json
  1. Run:
python -m app.main

Env overrides:

  • TRADES_FILE (default trades.json): where trades are persisted locally.

Command: /add_trade

Format:

/add_trade <id> <side> <entry_price> <quantity> <market_url>

Example:

/add_trade eth_yes YES 0.42 150 https://polymarket.com/market/...

Behavior:

  • Validates args (id pattern, side YES/NO, numeric fields > 0, polymarket.com URL).
  • Stores trades to a local JSON file (auto-loaded at startup; auto-saved on each change; starts empty if file is missing/invalid).
  • Replies with confirmation when added or an error message on bad input.

Command: /positions

  • Lists all trades saved so far (from the JSON store).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages