polymarket-whale-watcher

作者 chaoleiyv已验证

AI-powered whale trade surveillance for Polymarket — real-time monitoring of 700+ markets, 14 autonomous research tools, 7-step deep analysis with information asymmetry scoring.

213
Stars
27
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/chaoleiyv/polymarket-whale-watcher

快速入门

使用 polymarket-whale-watcher 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

🐋 Polymarket Whale Watcher

AI-Powered Whale Trade Intelligence for Polymarket Prediction Markets

Python 3.10+ License: MIT Polymarket Gemini


Real-time monitoring of 700+ markets  ·  14 autonomous research tools  ·  Multi-step deep analysis  ·  Signal accuracy tracking


Quick Start   |   How It Works   |   Sample Report   |   Configuration   |   Dashboard


pipeline

What It Does

Whale Watcher continuously monitors 700+ active Polymarket markets across three volume tiers, detects large trades with anomalous patterns, and deploys an LLM agent with 14 autonomous research tools to conduct multi-step deep investigations. Each whale trade undergoes a structured 7-step analysis pipeline — from trader profiling and cross-market position mapping to information gap assessment — producing an Information Asymmetry Score that quantifies the likelihood of non-public information advantage.


Live Demo

Terminal Output — Real-time whale detection and analysis
$ python -m src.main run

============================================================
WHALE WATCHER STARTED
============================================================
Monitoring: 765 markets
Interval: 10 seconds
Min Trade Size: $10,000 USD
Price Range: 0.1 - 0.9
============================================================

Tiered monitoring: Tier1=8 (>500K), Tier2=198 (>10K), Tier3=559 (>1K)

[23:41:12] WHALE TRADE DETECTED!
           Amount: $9,600.00 USDC
           Side: BUY Yes
           Price: 0.7142
           Market: US x Iran diplomatic meeting by June 30, 2026?

           Generating analysis report...
           Round 1: LLM requested 3 tool call(s)
           → search_web("US Iran diplomatic meeting June 2026")
           → search_twitter("US Iran meeting diplomacy")
           → get_wallet_transfers("0xceza...rn132")
           Round 2: LLM requested 2 tool call(s)
           → search_web("Islamabad Iran talks Witkoff April 2026")
           → search_twitter("POLYMARKET Iran meeting odds fading")
           Round 3: LLM requested 1 tool call(s)
           → search_web("Iran FM Araghchi 3 phase deal proposal")

           Analysis complete after 3 round(s)
           Information Asymmetry Score: 0.32 (LOW)
           Trader Credibility: MEDIUM (#1733, PnL: $84K)
           Verdict: Thesis continuation / loss recovery — HOLD/PASS
           Report saved: reports/20260504/...

Sample Report — 7-Step Deep Analysis (click to expand)

Each whale trade generates a comprehensive markdown report with structured multi-step analysis:

Full example: docs/examples/sample_report.md

Report Structure

======================================================================
# Whale Trade Analysis Report
======================================================================

┌─ Trade Summary ─────────────────────────────────────────────────────┐
│  Market, trade size, direction, price, odds, time, trader rank     │
└─────────────────────────────────────────────────────────────────────┘

┌─ Step 2: Trade Signal Analysis ─────────────────────────────────────┐
│  Trader profile: rank, PnL, avg size, large trade ratio            │
│  Domain expertise detection, trade timing analysis                  │
└─────────────────────────────────────────────────────────────────────┘

┌─ Step 3: Event-Related Position Analysis ───────────────────────────┐
│  Cross-market positions, roll-forward detection                     │
│  Loss recovery patterns, hedge identification                       │
└─────────────────────────────────────────────────────────────────────┘

┌─ Step 4: Market Long/Short Analysis ────────────────────────────────┐
│  Top 5 bulls & bears with rankings and PnL                          │
│  Smart money consensus assessment                                   │
└─────────────────────────────────────────────────────────────────────┘

┌─ Step 5: Information Gap Analysis ──────────────────────────────────┐
│  Public information audit (web, Twitter, Telegram)                  │
│  Market pricing efficiency check                                    │
│  Non-public information evidence search                             │
└─────────────────────────────────────────────────────────────────────┘

┌─ Step 6: Historical Pattern ────────────────────────────────────────┐
│  Trader's past bets on related events                               │
│  Strategy pattern recognition (laddering, hedging, etc.)            │
└─────────────────────────────────────────────────────────────────────┘

┌─ Step 7: Information Asymmetry Assessment ──────────────────────────┐
│  Score (0–1), trader credibility, evidence, reasoning               │
│  Multi-factor summary table with signal strength                    │
│  Recommended action: BUY / HOLD / PASS                              │
└─────────────────────────────────────────────────────────────────────┘

Example Summary Table

FactorAssessmentSignal
Trader Rank/PnLRank #1733, $84K PnLModerate
Trade Size vs. Normal~$9.6K vs. avg $10KRoutine — neutral
Related PositionHeavy loser on May 15 market (-$6.5K)Suppresses signal
Domain ExpertiseIran geopolitics specialistSupportive
Public Info CoverageExtensive public newsReduces asymmetry
Smart Money BullsRank #278 also longModest support
OverallThesis continuation, not insider signalLow-Medium

Daily Briefing — Automated intelligence summary

Daily briefings are generated at 10:00 AM local time and emailed automatically.

Full example: docs/examples/sample_briefing.md

Includes:

  • High-confidence signals (IAS >= 60%) with full analysis summaries
  • Fallback: top 5 signals by score if none reach the threshold
  • Abnormal price volatility alerts
  • Historical signal performance — win rate and ROI by confidence tier


Quick Start

One-Click Setup

git clone https://github.com/chaoleiyv/polymarket-whale-watcher.git
cd polymarket-whale-watcher
chmod +x setup.sh && ./setup.sh

The setup script will:

  1. Check Python 3.10+ is installed
  2. Create a virtual environment
  3. Install all dependencies
  4. Create .env from template

Then add your API key and start:

# Add your Gemini API key (the only required key)
echo "GEMINI_API_KEY=your_key_here" >> .env

# Activate the environment and run
source .venv/bin/activate
python -m src.main run

Get a free Gemini API key: https://aistudio.google.com/apikey

Docker

docker build -t whale-watcher .
docker run --env-file .env -v ./data:/app/data -v ./reports:/app/reports whale-watcher

How It Works

flowchart LR
    A[Polymarket API] --> B[Market Fetcher]
    B --> C[700+ Tiered Markets]
    C --> D[Trade Monitor]
    D --> E{Whale\nTrade?}
    E -->|No| D
    E -->|Yes| F[Anomaly Detector]
    F --> G{Score >= 0.65?}
    G -->|No| D
    G -->|Yes| H[LLM Analyzer]
    H --> I[14 Research Tools]
    I --> J[Signal + Report]
    J --> K[Resolution Tracker]
    K --> L[Dashboard + Email]

Pipeline

StageWhat Happens
1. Market SelectionFetches all active markets from Polymarket Gamma API, classifies into 3 tiers by 24h volume, adds token launch markets. Refreshes every 15 minutes.
2. Trade MonitoringParallel async tasks per market (700+), polls official Polymarket data-api for new taker BUY trades, deduplicates by transaction hash. Connection pool: 50 connections, 120s timeout.
3. Whale Pre-filterPrice range 0.10–0.90, $5K hard floor, dynamic threshold scaled by volume ($5K–$100K), conviction check (must pay above mid), resolution window 6h–90d.
4. Anomaly Scoring5-factor model (max 1.0): base confidence (0.50) + premium ratio (0.20) + signal cleanliness (0.10) + depth ratio (0.10) + cluster tier (0.10). Threshold: >= 0.65.
5. LLM InvestigationBuilds rich context (trade + trader profile + event positions + market top holders + historical signals). LLM autonomously selects tools for up to 3 rounds. Produces structured 7-step analysis with information asymmetry score (0–1).
6. Signal TrackingResolution tracker checks every 30 min, validates signal correctness, computes theoretical ROI. Daily briefings at 10:00 AM, emailed to recipients.

Features

FeatureDescription
Tiered Market Monitoring700+ markets across 3 tiers: Tier1 (>$500K, 15s), Tier2 (>$10K, 60s), Tier3 (>$1K, 300s)
5-Factor Anomaly DetectionPremium ratio, signal cleanliness, depth ratio, cluster signals, base confidence
7-Step Deep AnalysisTrade signal → Event positions → Long/short mapping → Info gap → Historical pattern → Asymmetry score
14 Autonomous Research ToolsWeb, Twitter, Telegram, crypto, DeFi, stocks, on-chain, legislation
Cross-Market Position AnalysisDetects roll-forwards, hedges, and loss recovery patterns across related markets
Signal Accuracy TrackingAuto resolution checking every 30 min, win rate stats by confidence tier
Daily Briefings10:00 AM automated summary with high-confidence signals, emailed to recipients
Real-time Email AlertsInstant notifications for high information-asymmetry signals (>= 60%)
Web DashboardFastAPI-based signal performance dashboard with ROI breakdowns

14 LLM Research Tools

The LLM agent autonomously selects and chains these tools during its multi-round investigation:

CategoryToolsUse Case
Social & Sentimentsearch_twitter · search_telegram · search_webPublic sentiment, insider chatter, news coverage
Crypto & DeFiget_crypto_price · get_crypto_market_overview · get_protocol_tvl · get_token_unlocks · get_protocol_revenueToken prices, TVL, unlocks, protocol health
Financial Dataget_stock_price · get_stock_news · get_economic_dataEquities, ETFs, macro indicators
On-Chainget_wallet_transfers · get_contract_infoWallet activity, contract deployments
Legislationget_bill_status · get_recent_legislationUS bills, regulatory actions

Sample Report

Every whale trade produces a structured multi-step report. Here's a condensed view:

======================================================================
# Whale Trade Analysis Report
======================================================================

Trade Summary
  Market: US x Iran diplomatic meeting by June 30, 2026?
  Size: $9,600 USDC  |  Direction: BUY Yes (71.4%)  |  Trader: #1733

Step 2: Trade Signal Analysis
  → Mid-tier trader, $84K PnL, Iran geopolitics specialist
  → Trade size ($9.6K) matches avg ($10K) — routine, not exceptional

Step 3: Event-Related Position Analysis            ← KEY FINDING
  → Losing -$6,508 on earlier "May 15 meeting" market (15.5% odds)
  → This trade is a thesis roll-forward, not a fresh insider bet

Step 4: Market Long/Short Analysis
  → Biggest Yes holder is a chronic loser (PnL: -$5.5M) — red flag
  → One elite trader (Rank #278) also long — modest support

Step 5: Information Gap Analysis
  → All supporting info widely reported in mainstream media
  → Market at 69.5% — already fairly priced

Step 6: Historical Pattern
  → "Timeline ladder" strategy across multiple Iran-related deadlines

Step 7: Information Asymmetry Assessment
  → Score: 0.32 (LOW)  |  Credibility: MEDIUM
  → Verdict: Thesis continuation / loss recovery — HOLD/PASS

======================================================================

Full report: docs/examples/sample_report.md


Configuration

Copy .env.example to .env and configure:

Required

VariableDescriptionGet It
GEMINI_API_KEYLLM API key for analysisGoogle AI Studio

Optional (enhances analysis quality)

Data Source API Keys
VariableDescriptionGet It
TAVILY_API_KEYWeb search (primary)tavily.com
SERPER_API_KEYWeb search (fallback)serper.dev
TWITTER_API_KEYTwitter sentiment searchtwitterapi.io
POLYGON_API_KEYStock/ETF/forex datapolygon.io
FRED_API_KEYEconomic indicatorsFRED
ETHERSCAN_API_KEYOn-chain wallet analysis (Polygon V2)etherscan.io
CONGRESS_API_KEYUS legislation datacongress.gov
TELEGRAM_API_ID / TELEGRAM_API_HASHTelegram channel monitoringmy.telegram.org
LLM Settings
VariableDefaultDescription
LLM_MODELgemini-3-flash-previewModel name (any OpenAI-compatible)
LLM_BASE_URLGoogle AI endpointOpenAI-compatible API base URL
LLM_TEMPERATURE0LLM temperature
Whale Detection Tuning
VariableDefaultDescription
MIN_TRADE_SIZE_USD10000Minimum trade size to consider
MIN_PRICE / MAX_PRICE0.10 / 0.90Price range filter
FETCH_INTERVAL_SECONDS10Default polling interval
Tiered Market Monitoring
VariableDefaultDescription
FULL_MARKET_SCANtrueEnable tiered monitoring (all active markets)
TIER1_VOLUME_MIN500000Tier 1 volume threshold
TIER2_VOLUME_MIN10000Tier 2 volume threshold
TIER3_VOLUME_MIN1000Tier 3 volume threshold
TIER1_POLL_INTERVAL15Tier 1 polling interval (seconds)
TIER2_POLL_INTERVAL60Tier 2 polling interval (seconds)
TIER3_POLL_INTERVAL300Tier 3 polling interval (seconds)
Email Alerts
VariableDefaultDescription
EMAIL_ENABLEDfalseEnable email notifications
EMAIL_SENDERSender email address
EMAIL_PASSWORDSender email password (app password)
EMAIL_RECIPIENTComma-separated recipient emails

Commands

# Core
python -m src.main run [--debug]              # Start monitoring
python -m src.main check-markets --limit 20   # View trending markets

# Analysis
python -m src.main test-analyze <market_id>   # Test LLM on a specific market

# Reports
python -m src.main briefing --today           # Generate today's briefing
python -m src.main briefing --date 2026-04-17 # Briefing for a specific date

# Dashboard
python -m src.main dashboard --port 8000      # Start web dashboard

# Maintenance
python -m src.main migrate                    # Migrate legacy JSON to SQLite

Dashboard

python -m src.main dashboard
# Open http://localhost:8000

The dashboard shows:

  • Overall signal statistics (total signals, win rate, avg ROI)
  • Performance breakdown by confidence tier
  • Top best/worst signals by theoretical ROI
  • Paginated signal history

Architecture

                    ┌──────────────────────────────┐
                    │     Polymarket Gamma API      │
                    │   (all active markets)        │
                    └──────────────┬───────────────┘
                                   │
                    ┌──────────────▼───────────────┐
                    │        Market Fetcher         │
                    │  Tier1: >$500K  (15s poll)    │
                    │  Tier2: >$10K   (60s poll)    │
                    │  Tier3: >$1K    (300s poll)   │
                    └──────────────┬───────────────┘
                                   │
              ┌────────────────────▼────────────────────┐
              │       Trade Monitor (async, 700+)       │
              │   Official Polymarket data-api           │
              │   Per-market parallel tasks              │
              │   Pool: 50 connections, 120s timeout     │
              └────────────────────┬────────────────────┘
                                   │
              ┌────────────────────▼────────────────────┐
              │          Pre-filter + Scoring            │
              │  $5K+ size, 0.10-0.90 price, conviction │
              │  5-factor anomaly score >= 0.65          │
              └────────────────────┬────────────────────┘
                                   │
              ┌────────────────────▼────────────────────┐
              │     LLM Analyzer — 7-Step Pipeline      │
              │   14 tools · up to 3 rounds             │
              ├──────────┬────────┬────────┬────────────┤
              │ Twitter  │  Web   │ DeFi   │  On-Chain  │
              │ Telegram │ Search │ Crypto │ Legislation│
              └──────────┴───┬────┴────────┴────────────┘
                             │
              ┌──────────────▼─────────────────────────┐
              │     Signal Storage (SQLite)             │
              │  → Resolution Tracker (every 30min)    │
              │  → Daily Briefing (10:00 AM + email)   │
              │  → Email Alerts (IAS >= 60%)           │
              │  → Dashboard (FastAPI)                 │
              └────────────────────────────────────────┘

Project Structure

src/
├── config/settings.py              # Environment configuration (Pydantic)
├── models/                         # Data models
│   ├── market.py                   # Market, TrendingMarket
│   ├── trade.py                    # TradeActivity, WhaleTrade, TraderRanking
│   ├── decision.py                 # TradeRecommendation, LLMDecision
│   └── anomaly_signal.py           # AnomalySignal (stored signal)
├── services/                       # Business logic
│   ├── market_fetcher.py           # Polymarket Gamma API (tiered market selection)
│   ├── trade_monitor.py            # Per-market parallel monitoring (official API)
│   ├── anomaly_detector.py         # 5-factor anomaly scoring
│   ├── llm_analyzer.py             # LLM with tool-use (14 tools, 3 rounds)
│   ├── tools.py                    # Tool registry
│   ├── resolution_tracker.py       # Market resolution checking
│   ├── stats_engine.py             # Performance statistics
│   ├── daily_briefing.py           # Daily summary generation + email
│   ├── twitter_search.py           # Twitter API search
│   ├── telegram_search.py          # Telegram channel monitoring
│   ├── web_search.py               # Tavily/Serper/DuckDuckGo search
│   ├── coingecko.py                # Crypto prices and market data
│   ├── defillama.py                # DeFi TVL, revenue, token unlocks
│   ├── fred.py                     # FRED macroeconomic data
│   ├── polygon.py                  # Stock/ETF prices and news
│   ├── etherscan.py                # On-chain data (Polygon, Etherscan V2)
│   └── congress.py                 # US legislation data
├── prompts/                        # LLM system prompts
│   ├── whale_analyzer.py           # Whale trade analysis prompt
│   └── volatility_analyzer.py      # Price volatility analysis prompt
├── db/database.py                  # SQLite signal storage
└── main.py                         # CLI entry point (Typer)

Disclaimer

This system is for research and educational purposes only. Prediction market trading involves significant risk. The information asymmetry scores and analyses are AI-generated estimates — not financial advice. Always conduct your own research and verify independently before making any trading decisions.


MIT License  ·  Built with Polymarket API + Gemini

常见问题

What is polymarket-whale-watcher?

polymarket-whale-watcher is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by chaoleiyv. AI-powered whale trade surveillance for Polymarket — real-time monitoring of 700+ markets, 14 autonomous research tools, 7-step deep analysis with information asymmetry scoring. It has 213 GitHub stars.

Is polymarket-whale-watcher safe to use?

Yes. polymarket-whale-watcher passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install polymarket-whale-watcher?

Clone the repository with "git clone https://github.com/chaoleiyv/polymarket-whale-watcher" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is polymarket-whale-watcher written in?

polymarket-whale-watcher is primarily written in Python. It is open-source under chaoleiyv on GitHub, so you can review or fork the full source.

Are there alternatives to polymarket-whale-watcher?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh polymarket-whale-watcher against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情