Polymarket NegRisk Arbitrage
v1.0.2扫描 multi-outcome Polymarket markets for mathematical arbitrage. When the sum of all outcome prices falls below $1.00, buy all sides simultaneously via batch trade to lock in risk-free profit. No 签名als. No AI. Just math.
运行时依赖
安装命令
点击复制技能文档
Polymarket NegRisk Arbitrage Trader
This is a template. The default 签名al is NegRisk price sum deviation from $1.00 — remix it with tighter thresholds, different min-profit floors, or 添加itional liquidity 过滤器s. The 技能 handles all the plumbing (market discovery, grouping, batch execution, safe防护s). Your 代理 provides the edge by tuning when and how aggressively to enter.
扫描 multi-outcome markets for mathematical arbitrage opportunities. When the sum of all outcome prices deviates from $1.00, buy the mispriced side across all buckets simultaneously using Simmer's batch trade 端点.
No 签名als. No AI. Just math.
Strategy
Polymarket NegRisk markets have multiple mutually exclusive outcomes (e.g., election candidates, tweet count ranges). Exactly one outcome resolves YES = $1.00.
The Math:
In an efficient market:
sum(all YES prices) = $1.00 sum(all NO prices) = $1.00
When markets are inefficient:
sum(YES) < $0.95 → Buy ALL YES → guaranteed $1.00 payout, cost < $0.95 → profit sum(NO) < $0.95 → Buy ALL NO → guaranteed $1.00 payout, cost < $0.95 → profit
Example:
Election market — 4 candidates: Candidate A: YES = $0.45 Candidate B: YES = $0.22 Candidate C: YES = $0.18 Candidate D: YES = $0.08 Sum = $0.93 (< $0.95 threshold)
→ Buy ALL YES for $0.93 total → One candidate wins → collect $1.00 → Profit: $0.07 (7.5% return, risk-free)
When to Use This 技能 Multi-outcome Polymarket 事件 (elections, tweet counts, sports brackets) When market makers are slow to rebalance after news High-volatility periods where prices shift quickly 事件 with many outcomes (more outcomes = more pricing errors) 设置up pip 安装 simmer-sdk 导出 SIMMER_API_KEY="your-key-here"
Quick 启动 # 扫描 for opportunities (dry 运行, no trades) python negrisk_arb.py
# 执行 real trades python negrisk_arb.py --live
# Only show YES arbitrage python negrisk_arb.py --side yes
# Only show NO arbitrage python negrisk_arb.py --side no
# 设置 minimum profit threshold python negrisk_arb.py --min-profit 0.05
# JSON 输出 python negrisk_arb.py --json
# Quiet mode for cron python negrisk_arb.py --live --quiet
# Show stats python negrisk_arb.py --stats
# Show config python negrisk_arb.py --config
# 更新 config python negrisk_arb.py --设置 max_position_usd=10.00
Configuration 设置ting Env Variable Default Description max_yes_sum SIMMER_NEGRISK_MAX_YES_SUM 0.95 Max sum of YES prices to trigger buy max_no_sum SIMMER_NEGRISK_MAX_NO_SUM 0.95 Max sum of NO prices to trigger buy min_profit_pct SIMMER_NEGRISK_MIN_PROFIT 0.03 Min profit % after fees (3%) max_position_usd SIMMER_NEGRISK_MAX_POSITION 10.00 Max USD per outcome bucket max_total_usd SIMMER_NEGRISK_MAX_TOTAL 50.00 Max total USD per event max_trades_per_运行 SIMMER_NEGRISK_MAX_TRADES 2 Max arbitrage 事件 per cycle dAIly_bud获取 SIMMER_NEGRISK_DAILY_BUD获取 50.00 DAIly spend limit min_outcomes SIMMER_NEGRISK_MIN_OUTCOMES 3 Min outcomes per event (skip binary) max_outcomes SIMMER_NEGRISK_MAX_OUTCOMES 15 Max outcomes (too many = illiquid) slippage_max_pct SIMMER_NEGRISK_SLIPPAGE 0.05 Max slippage tolerance (5%) fee_过滤器 SIMMER_NEGRISK_FEE_过滤器 true Skip markets with fees require_simultaneous SIMMER_NEGRISK_SIMULTANEOUS true Use batch trades for simultaneous execution How It Works
Each cycle the script:
Fetch active markets — 获取 /API/sdk/markets (all active, 排序ed by opportunity) Group by event — Group markets sharing the same Polymarket event Calculate sums — Sum YES prices and NO prices for each event group 过滤器 opportunities — Find 事件 where sum < threshold 验证 edge — 检查 fee rates, slippage estimates, min profit after costs 执行 batch — POST /API/sdk/trades/batch with all buckets simultaneously 追踪 positions — Tag all trades with source: "sdk:negrisk-arb" Safe防护s Fee 检查 — Skips any event where any outcome has taker fees Slippage 检查 — Estimates slippage via 上下文 API, skips if too high Simultaneous execution — Uses batch 端点 to minimize timing risk Position 检查 — Skips 事件 where you already hold positions DAIly bud获取 — Hard 停止 when dAIly limit is reached Min outcomes — Skips binary markets (YES + NO always = $1.00 by de签名) Liquidity 检查 — Skips outcomes with very low volume (< $100 24h) Fee-Accurate Profit Calculation yes_cost = sum of all YES prices in cluster payout = $1.00 (exactly one resolves YES) fee_cost = sum of (price × fee_rate) for each outcome net_profit = payout - yes_cost - fee_cost profit_pct = net_profit / yes_cost
Only trades when profit_pct >= min_profit_pct.
Simultaneous Execution (Critical)
Standard sequential trades are risky:
Buy outcome A → price moves → Buy outcome B → sum now > $1 → no longer profitable
This 技能 uses Simmer's batch 端点:
POST /API/sdk/trades/batch { "trades": [ {"market_id": "uuid-A", "side": "yes", "amount": 5.0}, {"market_id": "uuid-B", "side": "yes", "amount": 5.0}, {"market_id": "uuid-C", "side": "yes", "amount