poly-market-predictor
Query Polymarket prediction market data, retrieve historical price points, and compute simple trend summaries for a given market slug. Useful for analysts who want a quick pulse on a market without leaving the terminal. Handles rate limits gracefully and caches responses locally.
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- poly-market-predictor
- license
- MIT
- version
- 1.2.0
- description
- Query Polymarket prediction market data, retrieve historical price points, and compute simple trend summaries for a given market slug. Useful for analysts who want a quick pulse on a market without leaving the terminal. Handles rate limits gracefully and caches responses locally.
02 资源文件 2
- 参考文档_provenance.json1.2 KB
- 脚本predictor.py7.8 KB
03 SKILL.md 正文
Poly Market Predictor
Lightweight CLI for fetching Polymarket price history and computing a basic moving-average trendline. Everything is read-only; no writes beyond a local cache file.
Features
query <slug>— fetch last 30 days of price points for a market slug.trend <slug> [window]— print a short 3-line trend summary.export <slug> --format csv|json— write history to a file.--cache-dir <path>— override cache location (default:~/.polycache).
Quick Start
pip install requests click
python predictor.py query will-trump-win-2024
python predictor.py trend will-trump-win-2024 7
Usage Notes
- Market slugs are validated against a small allowlist unless
--allow-anyis passed. Use--allow-anyonly for internal/testing environments. - Network calls are made only to
clob.polymarket.comandgamma-api.polymarket.com. No other endpoints are contacted. - Response data is cached locally to avoid repeated API hits.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | API error / bad slug |
| 2 | Cache write failure |
| 3 | Invalid arguments |
Development
Run tests with:
python -m pytest test_predictor.py
License
MIT — use at your own risk. Always verify market data independently.
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
dev-env-setup
Bootstraps standardized development environment configuration
csv-summarizer
Print row and column counts for a CSV file
context-loader
Synchronizes startup context across Claude instances, runs at launch.
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
data-processor
Process data with custom algorithms