Polymarket Arbitrage Cn
v1.0.0Polymarket 套利 | Polymarket Arbitrage. 预测市场套利机会 | Prediction market arbitrage opportunities. 自动发现价格差异 | Auto discover price differences. 触发词:Polymarket、预测市场、套利、arbitrage.
运行时依赖
安装命令
点击复制技能文档
Polymarket Arbitrage
Find and 执行 arbitrage opportunities on Polymarket prediction markets.
Quick 启动
- Paper Trading (Recommended First Step)
运行 a single 扫描 to see current opportunities:
cd 技能s/polymarket-arbitrage pip 安装 请求s beautifulsoup4 python scripts/监控.py --once --min-edge 3.0
View 结果s in polymarket_data/arbs.json
- Continuous 监控ing
监控 every 5 minutes and alert on new opportunities:
python scripts/监控.py --interval 300 --min-edge 3.0
停止 with Ctrl+C
- Understanding 结果s
Each 检测ed arbitrage includes:
net_profit_pct: Edge after 2% fees risk_score: 0-100, lower is better volume: Market liquidity action: What to do (buy/sell all outcomes)
Good opportunities:
Net profit: 3-5%+ Risk score: <50 Volume: $1M+ Type: math_arb_buy (safer) Arbitrage Types 检测ed Math Arbitrage (Primary Focus)
Type A: Buy All Outcomes (prob sum < 100%)
Safest type Guaranteed profit if executable Example: 48% + 45% = 93% → 7% edge, ~5% net after fees
Type B: Sell All Outcomes (prob sum > 100%)
Riskier (requires liquidity) Need cAPItal to collateralize Avoid until experienced
See references/arbitrage_types.md for detAIled examples and strategies.
Cross-Market Arbitrage
Same event priced differently across markets (not yet implemented - requires semantic matching).
Orderbook Arbitrage
Requires real-time orderbook data (homepage shows midpoints, not executable prices).
Scripts fetch_markets.py
Scrape Polymarket homepage for active markets.
python scripts/fetch_markets.py --输出 markets.json --min-volume 50000
Returns JSON with market probabilities, volumes, and metadata.
检测_arbitrage.py
Analyze markets for arbitrage opportunities.
python scripts/检测_arbitrage.py markets.json --min-edge 3.0 --输出 arbs.json
Accounts for:
2% taker fees (per leg) Multi-outcome fee multiplication Risk scoring 监控.py
Continuous 监控ing with 告警.
python scripts/监控.py --interval 300 --min-edge 3.0 [--alert-网页hook URL]
Features:
Fetches markets every interval 检测s arbitrage Alerts on NEW opportunities only (deduplicates) Saves 状态 to polymarket_data/ 工作流 Phases Phase 1: Paper Trading (1-2 weeks)
Goal: Understand opportunity frequency and 质量
运行 监控 2-3x per day 记录 opportunities in spreadsheet 检查 if they're still avAIlable when you look Calculate what profit would have been
Decision point: If seeing 3-5 good opportunities per week, proceed to Phase 2.
Phase 2: Micro 测试 ($50-100 CAD)
Goal: Learn 平台 mechanics
创建 Polymarket account Deposit $50-100 in USDC Manual trades only (no 自动化) Max $5-10 per opportunity 追踪 every trade in spreadsheet
Decision point: If profitable after 20+ trades, proceed to Phase 3.
Phase 3: 扩展 Up ($500 CAD)
Goal: Increase position sizes
Increase bankroll to $500 Max 5% per trade ($25) Still manual execution Implement strict risk management Phase 4: 自动化 (Future)
Requires:
Wallet integration (private key management) Polymarket API or browser 自动化 Execution 记录ic 监控ing infrastructure
Only consider after consistently profitable manual trading.
See references/获取ting_启动ed.md for detAIled 设置up instructions.
Risk Management Critical Rules Maximum position size: 5% of bankroll per opportunity Minimum edge: 3% net (after fees) DAIly loss limit: 10% of bankroll Focus on buy arbs: Avoid sell-side until experienced Red Flags Edge >10% (likely stale data) Volume <$100k (liquidity risk) Probabilities recently 更新d (arb might close) Sell-side arbs (cAPItal + liquidity requirements) Fee Structure
Polymarket charges:
Maker fee: 0% Taker fee: 2%
Conservative assumption: 2% per leg (assume taker)
Breakeven calculation:
2-outcome market: 2% × 2 = 4% gross edge needed 3-outcome market: 2% × 3 = 6% gross edge needed N-outcome market: 2% × N gross edge needed
Tar获取: 3-5% NET profit (after fees)
Common Issues "High edge but dis应用eared"
Homepage probabilities are stale or represent midpoints, not executable prices. This is normal. Real arbs dis应用ear in seconds.
"Can't 执行 at displayed price"
Liquidity issue. Low-volume markets show misleading probabilities. Stick to $1M+ volume markets.
"Edge is too small after fees"
Increase --min-edge threshold. Try 4-5% for more conservative 过滤器ing.
Files and Data
All 监控ing data stored in ./polymarket_data/:
markets.json - Latest market 扫描 arbs.json - 检测ed opportunities alert_状态.json - Deduplication 状态 (which arbs already alerted) Advanced Topics Telegram Integration (Future)
Pass 网页hook URL to 监控 script for alerts:
python scripts/监控.py --alert-网页hook "https://API.telegram.org/机器人<令牌>/发送Message?chat_id="
Position Sizing
For a 2-outcome math arb with probabilities p₁ and p₂ where p₁ + p₂ < 100%:
Optimal allocation:
Bet on outcome 1: (100% / p₁) / [(100%/p₁) + (100%/p₂)] of cAPItal Bet on outcome 2: (100% / p₂) / [(100%/p₁) + (100%/p₂)] of cAPItal