Polyclaw : Scanner d'actualités et trader IA

VérifiéPrudence

Polyclaw est un outil alimenté par IA qui scanne les actualités en temps réel, les associe aux marchés Polymarket, estime les changements de probabilité, détecte les opportunités de trading et exécute des transactions automatiquement via l'API CLOB.

Spar Skills Guide Bot
Data & IAAvancé
57026/07/2026
Claude Code
#prediction-markets#news-analysis#trading#llm#python

Recommandé pour

Synthèse automatique

Scanne des flux d'actualités en temps réel, les associe aux marchés Polymarket, estime les décalages de probabilité et gère des positions papier sur les écarts détectés.

Points forts

  • Ingestion multi-sources (RSS, CoinGecko, Fear & Greed, médias crypto chinois) avec déduplication par hash et cache glissant
  • Matching par catégorie avec extraction d'entités anglais/chinois, sentiment tenant compte des négations et filtres de spécificité
  • Signaux LLM optionnels via Gemini 2.5 Flash, fusionnables avec l'analyse rule-based ou utilisables seuls
  • Calcul d'edge net des frais Polymarket, sizing de Kelly et gestion automatique des positions (take-profit, stop-loss, expiration 24 h)

Limites

  • Les modules décrits gèrent des positions papier : l'exécution d'ordres réels via l'API CLOB n'est pas détaillée dans le skill
  • Le mode LLM exige le CLI Gemini installé à un chemin codé en dur (/opt/homebrew/bin/gemini), orienté macOS
  • Dépend d'API externes vivantes (Gamma API, flux RSS) sans backtesting ni gestion explicite des erreurs de rate limit
Quand l'utiliser

Pour explorer des opportunités de trading d'actualité sur Polymarket et simuler une stratégie d'edge sans risquer de capital réel.

Quand l'éviter

À éviter si vous cherchez un bot de production exécutant de vrais ordres ou si vous n'avez pas d'environnement Python et Gemini CLI configurés.

Analyse de sécurité

Prudence
Score qualité88/100

The skill enables automated financial trading and network interactions, but does not instruct destructive or exfiltrating actions. It requires careful handling of API keys and financial risk.

Points d'attention
  • •The skill instructs automated trading via Polymarket CLOB API, which can cause financial loss if misconfigured or malicious.
  • •Uses network access (WebFetch, Bash python) to fetch news and interact with external APIs, including Gemini CLI.
  • •Executes Python scripts from the skill's codebase, which may have untrusted modifications.
Comment cette analyse est faite

Exemples

Single LLM-assisted scan
Run a Polyclaw scan with LLM analysis on Polymarket, minimum edge 5%, and show me the top matched markets and estimated shifts.
Review open positions
Check my open Polyclaw positions and tell me which ones just hit take-profit, stop-loss, or the 24h timeout.
Continuous monitoring
Start Polyclaw continuous monitoring with a 60-second interval and a $5,000 bankroll, and flag any crypto market where fresh news moved the odds.

name: polyclaw description: AI-powered news edge scanner and auto-trader for Polymarket. Ingests real-time news from 10+ sources, matches to Polymarket markets using category-aware fuzzy matching, estimates probability shifts, detects fee-adjusted trading edges, and auto-trades via CLOB API. version: "1.1.0" license: MIT allowed-tools: Read,Write,Bash(python:*),WebFetch

Polyclaw

Prerequisites

  • Python 3.10+
  • pip packages: feedparser httpx rich pandas rapidfuzz
  • For LLM mode: Gemini CLI installed at /opt/homebrew/bin/gemini

Quick Start

# Install dependencies
cd polyclaw/src
pip install -r requirements.txt

# Run a single scan
python scanner.py --scan

# Scan with Gemini LLM analysis
python scanner.py --scan --use-llm

# Pure LLM-only mode (skip rule-based matching)
python scanner.py --scan --llm-only

# View and manage open positions
python scanner.py --positions

# Run continuous monitoring
python scanner.py --monitor --interval 60

# Custom settings
python scanner.py --scan --min-edge 0.05 --bankroll 5000

What's New (v1.1)

  • 🤖 Gemini LLM Integration — --use-llm merges LLM signals with rule-based analysis; --llm-only for pure LLM scanning
  • 📈 Position Management — Auto take-profit (+15%), stop-loss (-10%), 24h timeout with live price tracking
  • 🇨🇳 Chinese Media Sources — BlockBeats and PANews for crypto-native Chinese market intelligence
  • 8 data sources total — Reuters, AP, Bloomberg, CoinDesk, CoinGecko, Fear & Greed, BlockBeats, PANews

Architecture

News Sources (8: RSS/APIs + Chinese media)
        │
        ▼
news_ingestion.py ──► Fetch + deduplicate + cache to news_feed.json
        │
        ▼
event_parser.py ◄──── market_cache.py (Polymarket Gamma API, 5-min TTL)
  │ Category-aware matching (crypto/politics/sports/economics/tech/geopolitics)
  │ Entity extraction (English + Chinese NLP)
  │ Negation-aware sentiment analysis
  │ Fuzzy matching with specificity gates
        │
        ▼
probability_engine.py ◄── llm_analyzer.py (optional, Gemini 2.5 Flash)
  │ Per-market signal aggregation
  │ LLM signal merging (when --use-llm)
  │ Directional shift logic (YES=up vs YES=down)
  │ Source credibility weighting
  │ Volume dampening for liquid markets
        │
        ▼
edge_calculator.py
  │ Polymarket fee schedule modeling
  │ Fee-adjusted edge computation
  │ Kelly criterion position sizing
        │
        ▼
position_manager.py
  │ Open/close paper positions
  │ Auto take-profit / stop-loss
  │ 24h timeout exit
        │
        ▼
scanner.py ──► Rich terminal UI with color-coded tables

Module Descriptions

news_ingestion.py

Fetches news from RSS feeds (Reuters, AP, Bloomberg, CoinDesk, The Block, Google News), CoinGecko trending, Fear & Greed Index, BlockBeats, and PANews (Chinese crypto media). Deduplicates by content hash. Rolling cache of 100 items.

market_cache.py

Queries Polymarket Gamma API for top 100 active markets by volume. 5-minute cache TTL.

event_parser.py

Category-aware matching with entity extraction (English + Chinese NLP), negation-aware sentiment, market question parsing, and LLM integration via parse_with_llm().

probability_engine.py

Multi-signal aggregation with directional logic, source weighting, volume dampening, and merge_llm_estimates() for combining rule-based and LLM signals.

edge_calculator.py

Models Polymarket's taker fee schedule. Fee-adjusted edge for YES/NO sides. Kelly criterion sizing.

llm_analyzer.py

Calls Gemini 2.5 Flash via CLI for structured news→market analysis. Batches up to 20 news items against all markets. Returns typed LLMSignal objects.

position_manager.py

Tracks paper trading positions with:

  • Take-profit: +15% from entry → auto close
  • Stop-loss: -10% from entry → auto close
  • Timeout: 24h with <2% move → close (signal expired)
  • Max 5 open positions, 10% per position, 30% total exposure

scanner.py

CLI orchestrator. Modes: --scan, --monitor, --positions. Flags: --use-llm, --llm-only.

Configuration

| Parameter | Default | Description | |-----------|---------|-------------| | --min-edge | 0.03 (3%) | Minimum edge after fees | | --bankroll | $1,000 | Paper trading bankroll | | --interval | 60s | Monitor scan interval | | --use-llm | off | Add Gemini LLM analysis | | --llm-only | off | Pure LLM mode | | --positions | — | View/manage positions |

Skills similaires