v1.0 · MIT License · Open Source

News Hits. Markets React. PolyClaw Trades.

AI-powered prediction market scanner that ingests 11+ real-time signal sources, matches breaking news to 500+ Polymarket events, and executes trades in 90-second cycles.

11+
Signal Sources
90s
Scan Cycle
500+
Active Markets
5
Strategy Arena
// SIGNAL PIPELINE

How PolyClaw Works

Every 90 seconds, PolyClaw executes a complete scan cycle — ingesting news, matching markets, calculating edge, and executing trades.

01

Ingest & Classify

Polls 11+ real-time sources simultaneously — RSS feeds, Twitter KOLs, Reddit, ESPN, economic calendars, and on-chain signals. Classifies each item into crypto, politics, sports, economics, or geopolitics.

> news_ingestion.py · twitter_source.py · reddit_source.py
02

Match & Estimate

Bilingual NLP (English + Chinese) extracts entities, then fuzzy-matches against 500+ active Polymarket markets. Multi-signal probability aggregation with source credibility weighting and freshness decay.

> event_parser.py · probability_engine.py
03

Edge & Execute

Fee-adjusted edge calculation with Half-Kelly position sizing. Auto-filters lottery tickets, near-expiry, and absurd edges. Executes via Polymarket CLOB with TP/SL/trailing stop management.

> edge_calculator.py · live_trader.py
// FEATURES

Built for Edge

Every component is designed to exploit the information lag between breaking news and market price adjustment.

Strategy Arena

5 strategies compete in parallel paper trading — baseline, aggressive, conservative, sniper, and trend follower. Compare real performance before going live.

Conservative Risk Management

Half-Kelly sizing, $15/order cap, $30/day loss limit, 50% AI discount on probability estimates, and auto-rejection of >40% edge signals.

Bilingual NLP

English + Chinese entity extraction covers Western and Chinese crypto news (BlockBeats), catching signals that English-only tools miss entirely.

Zero-Config Paper Trading

Works out of the box without a wallet. Default mode is pure paper trading — evaluate strategies safely before risking any capital.

Optional LLM Analysis

Integrate Claude CLI for deeper signal interpretation. Use --use-llm for augmented analysis or --llm-only for full AI-driven decisions.

Decision Journal

Complete audit trail for every signal and trade decision. Full transparency into why each order was placed or rejected.

// SIGNAL SOURCES

11+ Real-Time Data Feeds

Comprehensive coverage across crypto, finance, sports, politics, economics, weather, and on-chain data.

RSS Feeds All

Reuters, AP, Bloomberg, CoinDesk, TheBlock, PANews

Twitter / X All

KOL tweet tracking via RapidAPI with key rotation

Reddit Finance

r/wallstreetbets, r/politics, r/cryptocurrency

ESPN Sports

Live scores, injury reports, and game updates

The Odds API Sports

NFL, NBA, MLB, NHL, EPL live betting lines

ForexFactory Economics

CPI, NFP, FOMC, GDP economic event calendar

BlockBeats Crypto

Chinese-language crypto flash news

Fear & Greed Index Crypto

Crypto market sentiment gauge

Open-Meteo Weather

Weather data for weather-sensitive event markets

Volume Monitor On-chain

Unusual volume spikes on Polymarket itself

Price Monitor On-chain

5min/15min price anomaly detection

// TECH STACK

Under the Hood

Python 3.10+
Core language
Polygon
L2 blockchain
USDC.e
Stablecoin
CLOB API
Order execution
rapidfuzz
Fuzzy matching
feedparser
RSS ingestion
web3.py
On-chain ops
SQLite
Local database
NLP
EN + CN parsing
Half-Kelly
Position sizing
Claude CLI
Optional LLM
Discord
Webhook alerts
// TRADING ENGINE

Full-Cycle Trade Management

From signal detection to on-chain redemption — every phase is automated with hard safety limits.

Order Placement

挂单策略
TYPE All orders are GTC Limit Orders on Polymarket CLOB
BUY Price at best ask for immediate fill; fallback +2¢ bump
SELL Price at best bid; fallback -2¢ bump
GUARD Spread > 10¢ → skip ("dead market")
// Hard Limits
Max per order $20.00
Daily loss cap $40.00
Max positions 8
Balance guard 95%

Order Cancellation

撤单策略

Stale orders are auto-cleaned under three conditions:

Age > 12 hours → auto-cancel
Market expires in < 1 hour → auto-cancel
Price drift > 20% from order price → auto-cancel
EXCEPTION: Orders > 50% filled are kept ("let it ride")
When a new signal needs capital, the oldest unfilled orders are cancelled first (FIFO) until enough funds are freed.

Exit Strategies

止盈 / 止损 / 追踪止损 / 超时退出
1
Take Profit
High conf. (≥75%)85%
Base (55-75%)70%
Low (≤55%)55%
of predicted price move
2
Stop Loss
Small (≤3% kelly)-35%
Base (3-10%)-25%
Large (≥10%)-18%
from entry price
3
Trailing Stop
Activation50%
Trail distance30%
below peak price, never below hard stop
4
Time Tighten
Window12-24h
New stopmid
stop moves to midpoint of SL & entry
5
Timeout
Paper24h
Live6h
<2% move = FLAT, ≥2% = AGED

Redemption

赎回策略

When a market resolves, winning CTF tokens are automatically redeemed back to USDC on the Polygon chain.

Auto-detect resolved markets
On-chain CTF → USDC.e conversion
Zero manual intervention required

Signal Filtering

信号过滤

7 hard filters reject bad signals before any order fires:

Expiry < 1h SKIP
Edge < min threshold SKIP
Price < 3¢ (lottery) SKIP
Edge > 40% (absurd) SKIP
Extreme mismatch SKIP
Too few shares (<5) SKIP
Price ≥ 99.9¢ SKIP

Position Sizing

Half-Kelly 仓位管理
f* = (b×p - q) / b
size = bankroll × min(f*/2, 0.15)
Kelly fraction 50% (Half)
Max per position 15% bankroll
Fee rate 0.3%
Min order $1.00 / 3 shares
Re-entry cooldown 1 hour
Correlated limit 35% bankroll
// QUICK START

Up and Running in 5 Minutes

Paper trading works out of the box — no wallet needed. Add credentials later to go live.

Step 1 — Clone & Setup
$ git clone https://github.com/arkyu2077/polyclaw.git
$ cd polyclaw
$ ./setup.sh
# Creates venv, installs deps, scaffolds .env
Step 2 — Configure (Optional for paper trading)
$ nano .env
# Set POLYMARKET_PRIVATE_KEY (0x-prefixed)
# Optional: DISCORD_WEBHOOK_URL, TWITTER_RAPIDAPI_KEYS, ODDS_API_KEY
$ cp config.example.yaml config.yaml
# Adjust strategy, min_edge, bankroll, etc.
Step 3 — Run
# Paper trading (safe, no real orders):
$ ./run.sh
# Live trading with sniper strategy:
$ python3 src/scanner.py --monitor --interval 90 --live --strategy sniper
# With LLM analysis:
$ python3 src/scanner.py --monitor --interval 90 --use-llm
// Strategy Arena — Built-in Presets
Strategy Kelly % Min Edge Timeout Max Pos.
baseline 50%2%24h8
aggressive 75%1%24h12
conservative 25%4%24h5
sniper ★ 50%6%6h4
trend_follower 50%3%48h10
★ Default live strategy — high edge threshold, fast exits, tight position count
COMING SOON

Launch Your Cloud Lobster

No server. No terminal. No setup.
One click to deploy your own PolyClaw instance in the cloud — scanning, trading, and earning 24/7.

Cloud-Hosted
Always-on VPS, no local machine needed
One-Click Deploy
Configure wallet, pick strategy, launch
Live Dashboard
Real-time P&L, signals, and positions
// JOIN THE WAITING LIST

Be the First to Deploy

Early access users get priority onboarding and exclusive pricing. Drop your email — we'll notify you when Cloud Lobster goes live.

No spam, ever
Early access pricing
// REPOSITORY

Open Source

PolyClaw is fully open source under the MIT license. Star, fork, and contribute on GitHub.

arkyu2077/polyclaw
MIT License · Python
// CONTACT

Get in Touch

Questions, feedback, or collaboration ideas? Reach out through any of these channels.

GitHub Issues
Contact info coming soon...