Normalize odds across Polymarket, Kalshi, and sportsbooks into a unified implied-probability format. Enables apples-to-apples comparison for the same event across platforms. Use when asked to compare odds across markets, normalize pricing, or find cross-platform mispricings.
标准化并比较Polymarket、Kalshi和传统体育博彩的赔率。
当用户询问以下内容时使用此技能:
美国赔率转概率:负值 → |赔率|/(|赔率|+100),正值 → 100/(赔率+100)
Polymarket转概率:价格即为概率
Kalshi转概率:合约价格(API返回的0.00–1.00格式)
概率转美国赔率:>0.5 → -(概率/(1-概率))100,<0.5 → +((1-概率)/概率)100
从The Odds API获取美国赔率并内联转换为隐含概率:
bash
curl -s https://api.the-odds-api.com/v4/sports/SPORTKEY/odds?apiKey=$ODDSAPI_KEY®ions=us&markets=h2h&oddsFormat=american \
| jq [.[] | {
event: \(.awayteam) vs \(.hometeam),
start: .commence_time,
source: sportsbooks,
outcomes: [.bookmakers[0].markets[0].outcomes[] | {
name: .name,
american_odds: .price,
implied_prob: (if .price < 0 then (-((.price)) / (-((.price)) + 100)) else (100 / (.price + 100)) end) | (. * 1000 | round / 1000)
}]
}]
将SPORTKEY替换为相应的键(例如,basketballnba,americanfootball_nfl)。
从Polymarket的Gamma API获取市场价格:
bash
curl -s https://gamma-api.polymarket.com/markets?closed=false&limit=10&tag=CATEGORY \
| jq [.[] | {
event: .question,
source: polymarket,
outcomes: [{
name: Yes,
polymarket_price: (.outcomePrices | fromjson | .[0] | tonumber | (. * 1000 | round / 1000)),
implied_prob: (.outcomePrices | fromjson | .[0] | tonumber | (. * 1000 | round / 1000))
}, {
name: No,
polymarket_price: (.outcomePrices | fromjson | .[1] | tonumber | (. * 1000 | round / 1000)),
implied_prob: (.outcomePrices | fromjson | .[1] | tonumber | (. * 1000 | round / 1000))
}],
volume: .volume,
liquidity: .liquidity
}]
将CATEGORY替换为相关标签(例如,sports,nba,politics,crypto)。
从Kalshi的公开市场数据API获取合约价格:
bash
curl -s https://api.elections.kalshi.com/trade-api/v2/markets?status=open&limit=10&seriesticker=SERIESTICKER \
| jq [.markets[] | {
event: .title,
source: kalshi,
ticker: .ticker,
outcomes: [{
name: Yes,
kalshiprice: (.yesask / 100),
impliedprob: (.yesask / 100)
}, {
name: No,
kalshiprice: (.noask / 100),
impliedprob: (.noask / 100)
}],
volume: .volume
}]
将SERIES_TICKER替换为事件类别的Kalshi系列代码。
当用户想要比较跨平台的同一事件时,从每个来源获取数据并使用Python生成统一表格:
bash
python3 -c
import json, subprocess
def americantoprob(odds):
if odds < 0:
return round(abs(odds) / (abs(odds) + 100), 4)
else:
return round(100 / (odds + 100), 4)
def probtoamerican(prob):
if prob >= 1: return -99999
if prob <= 0: return 99999
if prob > 0.5:
return round(-(prob / (1 - prob)) * 100)
elif prob < 0.5:
return round(((1 - prob) / prob) * 100)
else:
return 100
print(=== 跨市场比较 ===)
print(f\{平台:<18} {是概率:>10} {是美国赔率:>10} {否概率:>10} {否美国赔率:>10} {总计:>8}\)
print(- * 70)
for name, data in platforms.items():
y = data[yes_prob]
n = data[no_prob]
total = round(y + n, 4)
yam = probto_american(y)
nam = probto_american(n)
yams = f+{yam} if yam > 0 else str(y_am)
nams = f+{nam} if nam > 0 else str(n_am)
print(f{name:<18} {y:>10.1%} {yams:>10} {n:>10.1%} {nams:>10} {total:>8.1%})
代理必须根据操作1-3的结果填充PLATFORM1NAME、PLATFORM1YES_PROB等。如果事件仅存在于两个平台,则删除第三个条目。
当用户给出单个赔率值时的临时转换:
bash
python3 -c
oddsinput = INPUTVALUE
am_str = f+{american} if american > 0 else str(american)
print(f输入:{odds_input} ({fmt}))
print(f隐含概率:{prob:.1%})
print(f美国赔率:{am_str})
print(fKalshi合约:\${prob:.2f})
print(fPolymarket份额:{prob:.4f})
将INPUT_VALUE替换为用户的值(例如,-150,0.62,$0.58)。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 cross-market-pricer-1776028719 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 cross-market-pricer-1776028719 技能
skillhub install cross-market-pricer-1776028719
文件大小: 3.81 KB | 发布时间: 2026-4-13 09:55