← 返回 Skills 市场
rsquaredsolutions2026

Cross-Market Pricer

作者 rsquaredsolutions2026 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
105
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install cross-market-pricer
功能描述
Normalize odds across Polymarket, Kalshi, and sportsbooks into a unified implied-probability format. Enables apples-to-apples comparison for the same event a...
使用说明 (SKILL.md)

Cross-Market Pricer

Normalize and compare odds across Polymarket, Kalshi, and traditional sportsbooks.

When to Use

Use this skill when the user asks about:

  • Comparing odds across different platforms (sportsbooks vs prediction markets)
  • Normalizing prices to a common format
  • Side-by-side pricing for the same event on Polymarket, Kalshi, and a sportsbook
  • Whether there's a pricing gap or mispricing between platforms
  • Converting between American odds, implied probability, and contract prices

Conversion Reference

American to probability: negative → |odds|/(|odds|+100), positive → 100/(odds+100) Polymarket to probability: price is already probability Kalshi to probability: contract_price (already 0.00–1.00 from API) Probability to American: >0.5 → -(prob/(1-prob))*100, \x3C0.5 → +((1-prob)/prob)*100

Operations

1. Fetch Sportsbook Odds as Normalized Probability

Pull American odds from The Odds API and convert to implied probability inline:

curl -s "https://api.the-odds-api.com/v4/sports/SPORT_KEY/odds?apiKey=$ODDS_API_KEY&regions=us&markets=h2h&oddsFormat=american" \
  | jq '[.[] | {
    event: "\(.away_team) vs \(.home_team)",
    start: .commence_time,
    source: "sportsbooks",
    outcomes: [.bookmakers[0].markets[0].outcomes[] | {
      name: .name,
      american_odds: .price,
      implied_prob: (if .price \x3C 0 then (-((.price)) / (-((.price)) + 100)) else (100 / (.price + 100)) end) | (. * 1000 | round / 1000)
    }]
  }]'

Replace SPORT_KEY with the appropriate key (e.g., basketball_nba, americanfootball_nfl).

2. Fetch Polymarket Prices as Normalized Probability

Pull market prices from Polymarket's Gamma API:

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
  }]'

Replace CATEGORY with the relevant tag (e.g., "sports", "nba", "politics", "crypto").

3. Fetch Kalshi Contract Prices as Normalized Probability

Pull contract prices from Kalshi's public market data API:

curl -s "https://api.elections.kalshi.com/trade-api/v2/markets?status=open&limit=10&series_ticker=SERIES_TICKER" \
  | jq '[.markets[] | {
    event: .title,
    source: "kalshi",
    ticker: .ticker,
    outcomes: [{
      name: "Yes",
      kalshi_price: (.yes_ask / 100),
      implied_prob: (.yes_ask / 100)
    }, {
      name: "No",
      kalshi_price: (.no_ask / 100),
      implied_prob: (.no_ask / 100)
    }],
    volume: .volume
  }]'

Replace SERIES_TICKER with the Kalshi series ticker for the event category.

4. Unified Cross-Market Comparison

When the user wants to compare the SAME event across platforms, fetch from each source and use Python to produce a unified table:

python3 -c "
import json, subprocess

def american_to_prob(odds):
    if odds \x3C 0:
        return round(abs(odds) / (abs(odds) + 100), 4)
    else:
        return round(100 / (odds + 100), 4)

def prob_to_american(prob):
    if prob >= 1: return -99999
    if prob \x3C= 0: return 99999
    if prob > 0.5:
        return round(-(prob / (1 - prob)) * 100)
    elif prob \x3C 0.5:
        return round(((1 - prob) / prob) * 100)
    else:
        return 100

# Input: user provides these values (agent fills from context)
platforms = {
    'PLATFORM_1_NAME': {'yes_prob': PLATFORM_1_YES_PROB, 'no_prob': PLATFORM_1_NO_PROB},
    'PLATFORM_2_NAME': {'yes_prob': PLATFORM_2_YES_PROB, 'no_prob': PLATFORM_2_NO_PROB},
}

print('=== Cross-Market Comparison ===')
print(f\"{'Platform':\x3C18} {'Yes Prob':>10} {'Yes Amer':>10} {'No Prob':>10} {'No Amer':>10} {'Total':>8}\")
print('-' * 70)
for name, data in platforms.items():
    y = data['yes_prob']
    n = data['no_prob']
    total = round(y + n, 4)
    y_am = prob_to_american(y)
    n_am = prob_to_american(n)
    y_am_s = f'+{y_am}' if y_am > 0 else str(y_am)
    n_am_s = f'+{n_am}' if n_am > 0 else str(n_am)
    print(f'{name:\x3C18} {y:>10.1%} {y_am_s:>10} {n:>10.1%} {n_am_s:>10} {total:>8.1%}')

# Flag mispricings
probs = [d['yes_prob'] for d in platforms.values()]
gap = max(probs) - min(probs)
if gap > 0.03:
    print(f'\
⚠ MISPRICING: {gap:.1%} gap across platforms on Yes side')
else:
    print(f'\
Pricing aligned within {gap:.1%} — no actionable gap')
"

The agent must fill in PLATFORM_1_NAME, PLATFORM_1_YES_PROB, etc. from the results of Operations 1–3. If an event only exists on two platforms, remove the third entry.

5. Quick Single-Value Conversion

For ad-hoc conversions when the user gives a single odds value:

python3 -c "
odds_input = 'INPUT_VALUE'
# Detect format and normalize
if odds_input.startswith('+') or odds_input.startswith('-'):
    odds = int(odds_input)
    prob = abs(odds)/(abs(odds)+100) if odds \x3C 0 else 100/(odds+100)
    fmt = 'American'
elif '.' in odds_input and float(odds_input) \x3C= 1:
    prob = float(odds_input)
    fmt = 'Probability'
elif odds_input.startswith('\$'):
    prob = float(odds_input.replace('\$',''))
    fmt = 'Kalshi contract'
else:
    prob = float(odds_input)
    fmt = 'Decimal probability' if float(odds_input) \x3C= 1 else 'Unknown'

# Convert to all formats
if prob > 0.5:
    american = round(-(prob/(1-prob))*100)
elif prob \x3C 0.5:
    american = round(((1-prob)/prob)*100)
else:
    american = 100

am_str = f'+{american}' if american > 0 else str(american)
print(f'Input: {odds_input} ({fmt})')
print(f'Implied probability: {prob:.1%}')
print(f'American odds: {am_str}')
print(f'Kalshi contract: \${prob:.2f}')
print(f'Polymarket share: {prob:.4f}')
"

Replace INPUT_VALUE with the user's value (e.g., "-150", "0.62", "$0.58").

Output Rules

  1. Always show implied probability as the primary format (3 decimal places, e.g., 0.620)
  2. Include American odds equivalent alongside probability for sportsbook-familiar users
  3. When comparing platforms, display as a table with columns: Platform, Yes Prob, Yes American, No Prob, No American, Total
  4. The "Total" column (Yes + No probabilities) reveals vig — anything over 100% is overround
  5. Flag gaps greater than 3% between platforms as potential mispricings
  6. Always note which sportsbook was used as the sportsbook source (since books differ)
  7. Report The Odds API quota after any sportsbook fetch

Error Handling

  • If ODDS_API_KEY is not set, tell the user to get a free key at https://the-odds-api.com/
  • If Polymarket returns empty results for a category, try broader search terms or list available categories
  • If Kalshi returns empty results, the event may not have an active contract — suggest checking kalshi.com directly
  • If an event exists on one platform but not another, report what's available and note the gap
  • If rate limited on any API, report the limitation and suggest which platforms can still be queried

About

Built by AgentBets — full tutorial at agentbets.ai/guides/openclaw-cross-market-pricer-skill/.

Part of the OpenClaw Skills series for the Agent Betting Stack.

安全使用建议
This skill appears to do what it says (normalizing market odds) but has two issues you should address before installing: (1) Metadata mismatch — SKILL.md requires ODDS_API_KEY but the registry metadata doesn't declare it. Ask the publisher to update the registry to list ODDS_API_KEY (and explain where it will be used). (2) SKILL.md is partially truncated and uses many placeholders that the agent is asked to 'fill from context' — request the complete instructions and confirm exactly what context the agent should use so it won't indiscriminately read or include unrelated user data. Only provide a minimal-scope API key (or a test/unprivileged key) for The Odds API, and do not supply other credentials. If you rely on this skill in production, verify endpoints and test with dummy data first.
功能分析
Type: OpenClaw Skill Name: cross-market-pricer Version: 1.1.0 The skill contains a shell injection vulnerability in Operation 5 of SKILL.md, where user-provided input is directly embedded into a python3 command string without sanitization, potentially allowing arbitrary code execution. Additionally, Operation 4 imports the 'subprocess' module despite only performing mathematical calculations, which is unnecessary and increases the attack surface. While the skill's primary logic aligns with its stated purpose of fetching odds from legitimate APIs (the-odds-api.com, polymarket.com, and kalshi.com), these implementation flaws pose a security risk.
能力评估
Purpose & Capability
The name/description match the actions in SKILL.md: fetching odds from sportsbooks (The Odds API), Polymarket, and Kalshi and normalizing them. Required binaries (curl, jq, python3) are appropriate. However, SKILL.md declares a required credential (ODDS_API_KEY) that the registry metadata did not list — a metadata mismatch.
Instruction Scope
Instructions are scoped to calling public APIs and converting odds formats. They do not instruct reading system files or unrelated credentials. Concerns: SKILL.md is partially truncated at the end and repeatedly relies on the agent to 'fill in' placeholders from context — this ambiguity could cause the agent to gather broader context than necessary if not constrained.
Install Mechanism
No install spec or code is present (instruction-only), so nothing is written to disk or downloaded by the skill itself — lowest install risk.
Credentials
SKILL.md requests a single external API key (ODDS_API_KEY for The Odds API), which is proportional to fetching sportsbook odds. But the registry metadata omitted declaring this required env var / primary credential; that inconsistency could lead to missing user warnings or accidental disclosure. No other credentials or config paths are requested.
Persistence & Privilege
always is false, autonomous invocation is allowed (platform default) and acceptable here. The skill does not request persistent or system-wide changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cross-market-pricer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cross-market-pricer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Add attribution links to agentbets.ai guides
v1.0.0
Initial release — AgentBets OpenClaw Skills series
元数据
Slug cross-market-pricer
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Cross-Market Pricer 是什么?

Normalize odds across Polymarket, Kalshi, and sportsbooks into a unified implied-probability format. Enables apples-to-apples comparison for the same event a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 105 次。

如何安装 Cross-Market Pricer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cross-market-pricer」即可一键安装,无需额外配置。

Cross-Market Pricer 是免费的吗?

是的,Cross-Market Pricer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cross-Market Pricer 支持哪些平台?

Cross-Market Pricer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cross-Market Pricer?

由 rsquaredsolutions2026(@rsquaredsolutions2026)开发并维护,当前版本 v1.1.0。

💬 留言讨论