2026-02-08 01:29:01 +08:00
# 🌡️ PolyWeather: Real-time Weather Query & Analysis Bot
2026-02-05 19:52:02 +08:00
2026-02-08 01:29:01 +08:00
An intelligent weather information bot designed to provide ultra-fast, live meteorological data, high-fidelity forecasts, and smart trend analysis. Built for speed and accuracy, it bypasses network caching to deliver the most up-to-date reports from global weather stations.
2026-02-05 19:52:02 +08:00
2026-02-07 01:59:51 +08:00
## 🚀 Quick Start
2026-02-07 01:21:55 +08:00
2026-02-07 01:59:51 +08:00
### Requirements
2026-02-07 01:21:55 +08:00
2026-02-08 01:29:01 +08:00
- **Python 3.11+**
- Dependencies: `pip install -r requirements.txt`
2026-02-08 20:30:17 +08:00
- **Environment**: Configure `METEOBLUE_API_KEY` in `.env` to enable high-precision London forecasts.
2026-02-07 01:21:55 +08:00
2026-02-08 01:29:01 +08:00
### Running Locally (Windows/Linux)
2026-02-07 01:21:55 +08:00
```bash
2026-02-08 01:29:01 +08:00
# Windows
py -3.11 run.py
2026-02-07 01:21:55 +08:00
2026-02-08 01:29:01 +08:00
# Linux/VPS
python3 run.py
2026-02-07 01:21:55 +08:00
```
2026-02-08 19:49:58 +08:00
_Note: The system is currently in **Weather Query Mode**. Legacy active market monitoring and automated trading modules are suspended._
2026-02-05 19:52:02 +08:00
---
2026-02-07 01:59:51 +08:00
## 🤖 Telegram Bot Commands
2026-02-05 19:52:02 +08:00
2026-02-08 01:29:01 +08:00
| Command | Description | Usage |
| :------------- | :--------------------- | :--------------------------------------------- |
| `/city [name]` | **Query City Weather** | Get detailed forecasts, METAR & trend analysis |
| `/id` | **Get Chat ID** | Retrieve your current Telegram Chat ID |
| `/help` | **Help** | Display all available commands |
2026-02-07 22:30:19 +08:00
2026-02-05 19:52:02 +08:00
---
2026-02-08 01:29:01 +08:00
## ✨ Key Features
2026-02-06 20:16:45 +08:00
2026-02-08 19:49:58 +08:00
### 1. 🏛️ Multi-Source Data Fusion (High-Fidelity)
2026-02-06 20:16:45 +08:00
2026-02-08 19:49:58 +08:00
The bot aggregates data from multiple authoritative sources, layered by reliability:
2026-02-06 20:16:45 +08:00
2026-02-08 19:49:58 +08:00
| Source | Role | Coverage | Strength |
| :----------------- | :---------------------- | :-------------- | :--------------------------------------------------------------------------------- |
| **Open-Meteo** | Base Forecast | Global | Provides detailed 72-hour temperature curves for all cities. |
2026-02-08 20:00:59 +08:00
| **Meteoblue (MB)** | **Precision Consensus** | London Only | **Traders' choice** . Aggregates multiple models; excellent for microclimates. |
2026-02-08 19:49:58 +08:00
| **METAR** | **Settlement Standard** | Global Airports | The absolute truth for Polymarket settlement; real-time station data. |
| **NWS** | Official (US) | US Only | High-fidelity forecasts for US cities, critical for extreme weather events. |
| **MGM** | Official (Turkey) | Ankara | Direct access to Turkish State Meteorological Service for local official accuracy. |
2026-02-05 19:52:02 +08:00
2026-02-08 19:49:58 +08:00
### 2. ⚡ Ultra-Fresh Data (Cache-Busting)
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
To counter second-by-second variations in weather betting, we implemented **Zero-Cache Technology** :
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
- **Micro-timestamp Tokens**: Every request includes a dynamic token to force servers to bypass CDN caches.
- **MGM Real-time Sync**: Specialized header camouflaging to bypass local Turkish API anti-crawling for Ankara.
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
### 3. ⏱️ Automated Trend Analysis
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
The bot doesn't just fetch data; it interprets it:
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
- **Peak Window Prediction**: Automatically identifies the timeframe when today's record is most likely to be hit.
- **Risk Profiling**: Assigns risk levels based on geographic traits (e.g., Ankara high-altitude swings, London coastal microclimates).
- **Source Attribution**: Every data point is clearly labeled ([MGM], [METAR], [MB]) to help you weigh the data.
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
### 4. 📊 Smart Max-Temp Tracking
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
Optimized for Polymarket settlement logic:
2026-02-05 19:52:02 +08:00
2026-02-08 19:49:58 +08:00
- **Local Day Filtering**: Uses city UTC offsets to strictly count observations after 00:00 local time.
- **Multi-dimension Monitoring**: Includes "Feels Like" temperatures and 24h precipitation to assist in nuanced trade decisions.
2026-02-07 01:21:55 +08:00
2026-02-08 19:49:58 +08:00
---
2026-02-07 22:30:19 +08:00
2026-02-08 19:49:58 +08:00
## 🏗️ System Architecture
2026-02-07 22:30:19 +08:00
2026-02-08 19:49:58 +08:00
PolyWeather uses a **Lightweight, Plugin-based** architecture for millisecond responses.
2026-02-06 21:30:52 +08:00
2026-02-08 19:49:58 +08:00
```mermaid
graph TD
User[/Telegram User/] --> Bot[bot_listener.py]
Bot --> Collector[WeatherDataCollector]
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
subgraph "Data Engine"
Collector --> OM[Open-Meteo API]
2026-02-08 20:30:17 +08:00
Collector --> MB[Meteoblue Weather API]
2026-02-08 19:49:58 +08:00
Collector --> NOAA[METAR Data Center]
Collector --> MGM[Turkish MGM API]
Collector --> NWS[US NWS API]
end
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
Collector --> Processing[Smart Analysis & Formatting]
Processing --> Bot
Bot --> Reponse[/Compact Betting Snapshot/]
```
2026-02-08 02:55:09 +08:00
2026-02-08 19:49:58 +08:00
- **Logic Decoupling**: `weather_sources.py` handles parsing; `bot_listener.py` handles rendering.
- **Legacy Modules**: `main.py` contains the old automated trading engine. Focus has shifted to "assisted manual decision-making."
2026-02-07 00:48:16 +08:00
2026-02-05 19:52:02 +08:00
---
2026-02-08 19:49:58 +08:00
## 🎯 Betting Strategy Tips
2026-02-06 20:16:45 +08:00
2026-02-08 19:49:58 +08:00
1. **Check Consensus** : Compare Open-Meteo and Meteoblue (MB). Consensus usually implies higher probability.
2. **Watch the Peak** : Use `/city` frequently during predicted peak windows to catch momentum.
2026-02-08 20:00:59 +08:00
3. **Weighting Hierarchy** : Settlement is **METAR** ; high-accuracy trend is **MB** (London); Official (NWS/MGM) is the "anchor."
2026-02-08 19:49:58 +08:00
4. **Geographic Risk** : Pay close attention to cities where "Bias will significantly amplify."