# ๐ŸŒก๏ธ PolyWeather: Polymarket Weather Trading Monitor An intelligent monitoring and alerting system based on multi-source real-time meteorological data and Polymarket market pricing deviation analysis. ## ๐Ÿš€ Quick Start ```bash python run.py ``` This command launches: 1. **Monitoring Engine**: Scans markets 24/7, providing **85ยข-95ยข Price Alerts** and **Market Anomalies**. 2. **Command Listener**: Handles Telegram commands and returns real-time signals. --- ## ๐Ÿค– Telegram Bot Commands | Command | Description | Usage | | :----------- | :---------------------- | :------------------------------------------- | | `/signal` | **Get Trading Signals** | Returns top 3 markets with highest deviation | | `/portfolio` | **View Portfolio** | Get real-time paper trading profit report | | `/status` | **Check Status** | Confirm if the monitoring engine is online | | `/help` | **Help** | Display all available commands | --- ## ๐Ÿ“ข Alerting Dimensions ### 1. ๐Ÿ“‚ City Alert Summaries (Push) - **Optimization**: All anomalies for the same city are merged into a **single report** per scan cycle to prevent spamming. - **Content**: Includes Price Alerts and Market Anomalies (Whales/Volume). ### 2. โšก Price Alerts (Auto Paper Trade) - **Trigger**: Buy Yes or Buy No price enters the **85ยข-95ยข** range. - **Auto Action**: System automatically executes a **$5.00 Paper Trade** to track success rate. - **Purpose**: High-probability / Near-settlement reminders. ### 3. ๐Ÿ‘€ Market Anomalies - **Whale Inflow**: Large single trades (>$5,000) with imbalanced ratios. - **Volume Spikes**: Sudden increase in volume (>2x historical std dev). ### 4. ๐Ÿ“… Daily PnL Summary - **Trigger**: Triggered automatically around 23:55 (Beijing Time). - **Content**: Summarizes daily floating PnL, balance changes, and win rate. ### 4. ๐ŸŽฏ Trading Signals (Query) - Comparison between weather forecasts and market pricing. - Includes: City, bucket, local time, expected temperature (unit-aware), and deviation score. --- ## ๐Ÿ› ๏ธ Configuration (.env) Duplicate `.env.example` to `.env` and fill in your credentials: ```bash # Telegram Bot TELEGRAM_BOT_TOKEN=your_bot_token TELEGRAM_CHAT_ID=your_chat_id # Polymarket API (Used for real-time prices & trade history) POLYMARKET_API_KEY=your_api_key_here # Proxy (Optional) HTTPS_PROXY=http://127.0.0.1:7890 ``` --- ## ๐Ÿ“‹ Core Features - โœ… **Smart Merged Push**: City-based alert aggregation for a clean interface. - โœ… **High-Speed Price Sync**: Utilizes CLOB batch API for instant price updates without 404s. - โœ… **Timezone Adaptation**: All timestamps are automatically adjusted to Beijing Time (UTC+8). - โœ… **Smart Date Selection**: Automatically targets the earliest active market date and rolls over after settlement. - โœ… **Unit Sensitivity**: US markets display Fahrenheit (ยฐF), while others use Celsius (ยฐC). - โœ… **Data Persistence**: Local JSON storage for signals and push history to ensure no duplicates after restart. ---