prediction-arbitrage-scout
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrediction Arbitrage Scout (Polymarket ↔ Kalshi)
预测套利侦察工具(Polymarket ↔ Kalshi)
Read-only scouting tool that identifies potential price discrepancies between Polymarket and Kalshi prediction markets.
仅可读的侦察工具,用于识别Polymarket和Kalshi预测市场之间的潜在价格差异。
Purpose
用途
Surface candidate markets where pricing diverges across Polymarket and Kalshi.
This skill is intended for discovery, research, and prioritization, not automated trading or execution.
This skill is intended for discovery, research, and prioritization, not automated trading or execution.
找出Polymarket和Kalshi之间定价存在差异的候选市场。
本工具仅用于发现、研究和优先级排序,不用于自动化交易或执行操作。
本工具仅用于发现、研究和优先级排序,不用于自动化交易或执行操作。
Non-Goals
非目标
- No trade execution
- No guarantees of profitability
- No slippage, depth, or liquidity modeling
- No position sizing or risk management
Outputs from this skill must be validated against Kalshi orderbooks and market rules before any action.
- 不支持交易执行
- 不保证盈利
- 不进行滑点、深度或流动性建模
- 不提供仓位规模或风险管理功能
在采取任何行动前,必须对照Kalshi订单簿和市场规则验证本工具的输出结果。
Overview
概述
Workflow:
- Fetch current public market prices from Polymarket
- Fetch open public markets from Kalshi
- Match events using fuzzy string similarity
- Compute theoretical price discrepancies after basic fees
- Generate CSV and Markdown reports for review
Results are ranked by headline price discrepancy, not tradable edge.
工作流程:
- 从Polymarket获取当前公开市场价格
- 从Kalshi获取公开的未闭市市场数据
- 使用模糊字符串相似度匹配事件
- 计算扣除基础手续费后的理论价格差异
- 生成CSV和Markdown报告以供审核
结果按 headline价格差异排序,而非可交易优势。
Prerequisites
前置条件
Tools:
- Read
- Write
- Bash (python)
- Glob
- Grep
- WebFetch
Environment:
- Python 3.x
Packages:
- requests
- pandas
Install:
pip install requests pandas
工具:
- Read
- Write
- Bash (python)
- Glob
- Grep
- WebFetch
环境:
- Python 3.x
依赖包:
- requests
- pandas
安装命令:
pip install requests pandas
Instructions
操作步骤
Step 1: Fetch Polymarket Data
Command:
python {baseDir}/scripts/fetch_polymarket.py
Output:
- polymarket_data.json
Step 2: Fetch Kalshi Data
Command:
python {baseDir}/scripts/fetch_kalshi.py
Output:
- kalshi_data.json
Step 3: Detect Price Discrepancies
Command:
python {baseDir}/scripts/detect_arbitrage.py
Notes:
- Uses fuzzy string similarity (default threshold: 0.7)
- Compares YES/NO prices across platforms
- Estimates theoretical spread after basic fees
Output:
- arbitrage_opportunities.csv
Step 4: Generate Summary Report
Command:
python {baseDir}/scripts/generate_report.py
Output:
- arbitrage_report.md
步骤1:获取Polymarket数据
命令:
python {baseDir}/scripts/fetch_polymarket.py
输出:
- polymarket_data.json
步骤2:获取Kalshi数据
命令:
python {baseDir}/scripts/fetch_kalshi.py
输出:
- kalshi_data.json
步骤3:检测价格差异
命令:
python {baseDir}/scripts/detect_arbitrage.py
注意事项:
- 使用模糊字符串相似度(默认阈值:0.7)
- 对比两个平台的YES/NO价格
- 估算扣除基础手续费后的理论点差
输出:
- arbitrage_opportunities.csv
步骤4:生成汇总报告
命令:
python {baseDir}/scripts/generate_report.py
输出:
- arbitrage_report.md
Outputs
输出文件
- polymarket_data.json: Raw Polymarket market data
- kalshi_data.json: Raw Kalshi market data
- arbitrage_opportunities.csv: Ranked discrepancy list
- arbitrage_report.md: Summary report for review
- polymarket_data.json:Polymarket市场原始数据
- kalshi_data.json:Kalshi市场原始数据
- arbitrage_opportunities.csv:按差异排序的列表
- arbitrage_report.md:供审核的汇总报告
Error Handling
错误处理
Polymarket API Error:
- Verify Polymarket API availability
- Retry after a short delay
Kalshi API Error:
- Verify public endpoint availability
- Some endpoints may require auth; this skill uses public data only
No Matching Events Found:
- Increase fuzzy match threshold
- Manually map high-value series
Insufficient Price Data:
- Ensure both YES and NO prices exist on both platforms
Polymarket API错误:
- 验证Polymarket API是否可用
- 短暂延迟后重试
Kalshi API错误:
- 验证公开端点是否可用
- 部分端点可能需要授权;本工具仅使用公开数据
未找到匹配事件:
- 提高模糊匹配阈值
- 手动映射高价值系列
价格数据不足:
- 确保两个平台上均存在YES和NO价格
Interpretation Guidance
解读指南
- Treat all outputs as signals, not decisions
- Validate market resolution rules
- Check liquidity and orderbook depth
- Consider timing and volatility
- Prefer manually mapped events over fuzzy matches for action
- 将所有输出视为信号,而非决策依据
- 验证市场结算规则
- 检查流动性和订单簿深度
- 考虑时间因素和波动性
- 若要采取行动,优先选择手动映射的事件而非模糊匹配结果
Resources
资源
- Polymarket fetcher: {baseDir}/scripts/fetch_polymarket.py
- Kalshi fetcher: {baseDir}/scripts/fetch_kalshi.py
- Discrepancy analyzer: {baseDir}/scripts/detect_arbitrage.py
- Report generator: {baseDir}/scripts/generate_report.py
- Polymarket数据获取脚本:{baseDir}/scripts/fetch_polymarket.py
- Kalshi数据获取脚本:{baseDir}/scripts/fetch_kalshi.py
- 差异分析脚本:{baseDir}/scripts/detect_arbitrage.py
- 报告生成脚本:{baseDir}/scripts/generate_report.py
Usage
使用方法
Run the full scouting pipeline:
python {baseDir}/scripts/fetch_polymarket.py
python {baseDir}/scripts/fetch_kalshi.py
python {baseDir}/scripts/detect_arbitrage.py
python {baseDir}/scripts/generate_report.py
This skill may be invoked to execute the full workflow automatically.
运行完整的侦察流程:
python {baseDir}/scripts/fetch_polymarket.py
python {baseDir}/scripts/fetch_kalshi.py
python {baseDir}/scripts/detect_arbitrage.py
python {baseDir}/scripts/generate_report.py
本工具可被调用以自动执行完整工作流。