Install
openclaw skills install polymarket-arbitrageMonitor and execute arbitrage opportunities on Polymarket prediction markets. Detects math arbitrage (multi-outcome probability mismatches), cross-market arbitrage (same event different prices), and orderbook inefficiencies. Use when user wants to find or trade Polymarket arbitrage, monitor prediction markets for opportunities, or implement automated trading strategies. Includes risk management, P&L tracking, and alerting.
openclaw skills install polymarket-arbitrageFind and execute arbitrage opportunities on Polymarket prediction markets.
Run a single scan to see current opportunities:
cd skills/polymarket-arbitrage
pip install requests beautifulsoup4
python scripts/monitor.py --once --min-edge 3.0
View results in polymarket_data/arbs.json
Monitor every 5 minutes and alert on new opportunities:
python scripts/monitor.py --interval 300 --min-edge 3.0
Stop with Ctrl+C
Each detected arbitrage includes:
Good opportunities:
math_arb_buy (safer)Type A: Buy All Outcomes (prob sum < 100%)
Type B: Sell All Outcomes (prob sum > 100%)
See references/arbitrage_types.md for detailed examples and strategies.
Same event priced differently across markets (not yet implemented - requires semantic matching).
Requires real-time orderbook data (homepage shows midpoints, not executable prices).
Scrape Polymarket homepage for active markets.
python scripts/fetch_markets.py --output markets.json --min-volume 50000
Returns JSON with market probabilities, volumes, and metadata.
Analyze markets for arbitrage opportunities.
python scripts/detect_arbitrage.py markets.json --min-edge 3.0 --output arbs.json
Accounts for:
Continuous monitoring with alerting.
python scripts/monitor.py --interval 300 --min-edge 3.0 [--alert-webhook URL]
Features:
polymarket_data/Goal: Understand opportunity frequency and quality
Decision point: If seeing 3-5 good opportunities per week, proceed to Phase 2.
Goal: Learn platform mechanics
Decision point: If profitable after 20+ trades, proceed to Phase 3.
Goal: Increase position sizes
Requires:
Only consider after consistently profitable manual trading.
See references/getting_started.md for detailed setup instructions.
Polymarket charges:
Conservative assumption: 2% per leg (assume taker)
Breakeven calculation:
Target: 3-5% NET profit (after fees)
Homepage probabilities are stale or represent midpoints, not executable prices. This is normal. Real arbs disappear in seconds.
Liquidity issue. Low-volume markets show misleading probabilities. Stick to $1M+ volume markets.
Increase --min-edge threshold. Try 4-5% for more conservative filtering.
All monitoring data stored in ./polymarket_data/:
markets.json - Latest market scanarbs.json - Detected opportunitiesalert_state.json - Deduplication state (which arbs already alerted)Pass webhook URL to monitor script for alerts:
python scripts/monitor.py --alert-webhook "https://api.telegram.org/bot<token>/sendMessage?chat_id=<id>"
For a 2-outcome math arb with probabilities p₁ and p₂ where p₁ + p₂ < 100%:
Optimal allocation:
This ensures equal profit regardless of which outcome wins.
Simplified rule: For small edges, split capital evenly across outcomes.
Arbs disappear fast. If planning automation:
For skill issues:
references/arbitrage_types.md for strategy detailsreferences/getting_started.md for setup helppolymarket_data/pip install requests beautifulsoup4