markets

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Markets Orchestration

市场编排工具

Bridges ESPN live schedules (NBA, NFL, MLB, NHL, WNBA, CFB, CBB) with Kalshi and Polymarket prediction markets. Passes sport context to both platforms for accurate single-game market matching.
将ESPN实时赛程(NBA、NFL、MLB、NHL、WNBA、CFB、CBB)与Kalshi和Polymarket预测市场打通,传递体育项目上下文至两个平台,实现精准的单场赛事市场匹配。

Quick Start

快速开始

bash
undefined
bash
undefined

Today's games with matching prediction markets

获取今日赛事及对应的预测市场

sports-skills markets get_todays_markets --sport=nba
sports-skills markets get_todays_markets --sport=nba

Search for a team across both exchanges

在两个交易平台搜索球队

sports-skills markets search_entity --query="Lakers" --sport=nba
sports-skills markets search_entity --query="Lakers" --sport=nba

Compare ESPN odds vs prediction market prices for a game

对比某赛事的ESPN赔率与预测市场价格

sports-skills markets compare_odds --sport=nba --event_id=401234567
sports-skills markets compare_odds --sport=nba --event_id=401234567

Sports-filtered market listing (no political/weather noise)

按体育项目筛选的市场列表(无政治/天气类无关内容)

sports-skills markets get_sport_markets --sport=nfl
sports-skills markets get_sport_markets --sport=nfl

Unified ESPN schedule

统一ESPN赛程

sports-skills markets get_sport_schedule --sport=nba
sports-skills markets get_sport_schedule --sport=nba

Normalize a price from any source

标准化任意来源的价格

sports-skills markets normalize_price --price=0.65 --source=polymarket
sports-skills markets normalize_price --price=0.65 --source=polymarket

Full evaluation: ESPN odds + market price → devig → edge → Kelly

完整评估:ESPN赔率 + 市场价格 → 去抽水 → 优势计算 → 凯利公式

sports-skills markets evaluate_market --sport=nba --event_id=401234567

Python SDK:
```python
from sports_skills import markets

markets.get_todays_markets(sport="nba")
markets.search_entity(query="Lakers", sport="nba")
markets.compare_odds(sport="nba", event_id="401234567")
markets.get_sport_markets(sport="nfl")
markets.get_sport_schedule(sport="nba", date="2025-02-26")
markets.normalize_price(price=0.65, source="polymarket")
markets.evaluate_market(sport="nba", event_id="401234567")
sports-skills markets evaluate_market --sport=nba --event_id=401234567

Python SDK:
```python
from sports_skills import markets

markets.get_todays_markets(sport="nba")
markets.search_entity(query="Lakers", sport="nba")
markets.compare_odds(sport="nba", event_id="401234567")
markets.get_sport_markets(sport="nfl")
markets.get_sport_schedule(sport="nba", date="2025-02-26")
markets.normalize_price(price=0.65, source="polymarket")
markets.evaluate_market(sport="nba", event_id="401234567")

Important Notes

重要说明

  • Sport context is passed through. When you specify
    --sport=nba
    , the orchestrator maps it to the correct Polymarket sport code and Kalshi series ticker automatically.
  • Both platforms use sport-aware search. Polymarket uses its
    /sports
    config to resolve sport→series_id; Kalshi uses
    KXNBA
    ,
    KXNFL
    , etc.
  • Prices are normalized. ESPN uses American odds, Polymarket uses 0-1 probability, Kalshi uses 0-100 integer. The orchestrator normalizes everything to implied probability for comparison.
  • 传递体育项目上下文:当你指定
    --sport=nba
    时,编排工具会自动将其映射为正确的Polymarket体育项目代码和Kalshi系列代码。
  • 双平台支持体育项目感知搜索:Polymarket使用其
    /sports
    配置解析体育项目→系列ID;Kalshi使用
    KXNBA
    KXNFL
    等代码。
  • 价格标准化:ESPN使用美式赔率,Polymarket使用0-1概率,Kalshi使用0-100整数。编排工具会将所有格式统一转换为隐含概率以便对比。

Commands

命令列表

CommandRequiredOptionalDescription
get_todays_markets
sport, dateFetch ESPN schedule → search both exchanges with sport context → unified dashboard
search_entity
querysportSearch Kalshi + Polymarket for a team/player/event name (passes sport to both platforms)
compare_odds
sport, event_idESPN odds + prediction market prices → normalized side-by-side + arb check
get_sport_markets
sportstatus, limitSport-filtered market listing on both platforms (uses sport code, not text query)
get_sport_schedule
sport, dateUnified ESPN schedule across one or all sports
normalize_price
price, sourceConvert any source format to common {implied_prob, american, decimal}
evaluate_market
sport, event_idtoken_id, kalshi_ticker, outcomeESPN odds + market price → devig → edge → Kelly
命令必填参数可选参数描述
get_todays_markets
sport, date获取ESPN赛程→结合体育项目上下文搜索两个交易平台→生成统一仪表板
search_entity
querysport在Kalshi和Polymarket中搜索球队/球员/赛事名称(向双平台传递体育项目参数)
compare_odds
sport, event_id对比ESPN赔率与预测市场价格→标准化并排展示+套利检查
get_sport_markets
sportstatus, limit按体育项目筛选双平台的市场列表(使用体育项目代码,而非文本查询)
get_sport_schedule
sport, date获取单一或所有体育项目的统一ESPN赛程
normalize_price
price, source将任意来源格式转换为通用格式{implied_prob, american, decimal}
evaluate_market
sport, event_idtoken_id, kalshi_ticker, outcomeESPN赔率 + 市场价格→去抽水→优势计算→凯利公式

Supported Sports

支持的体育项目

US Sports (with ESPN schedules)

美国体育项目(含ESPN赛程)

SportKeyKalshi SeriesPolymarket Code
NFL
nfl
KXNFL
nfl
NBA
nba
KXNBA
nba
MLB
mlb
KXMLB
mlb
NHL
nhl
KXNHL
nhl
WNBA
wnba
KXWNBA
wnba
College Football
cfb
KXCFB
cfb
College Basketball
cbb
KXCBB
cbb
体育项目标识Kalshi系列代码Polymarket代码
NFL
nfl
KXNFL
nfl
NBA
nba
KXNBA
nba
MLB
mlb
KXMLB
mlb
NHL
nhl
KXNHL
nhl
WNBA
wnba
KXWNBA
wnba
大学橄榄球
cfb
KXCFB
cfb
大学篮球
cbb
KXCBB
cbb

Football (prediction markets only — no ESPN schedule)

足球赛事(仅支持预测市场——无ESPN赛程)

LeagueKeyKalshi SeriesPolymarket Code
English Premier League
epl
KXEPLGAME
epl
Champions League
ucl
KXUCL
ucl
La Liga
laliga
KXLALIGA
lal
Bundesliga
bundesliga
KXBUNDESLIGA
bun
Serie A
seriea
KXSERIEA
sea
Ligue 1
ligue1
KXLIGUE1
fl1
MLS
mls
KXMLSGAME
mls
联赛标识Kalshi系列代码Polymarket代码
英超联赛
epl
KXEPLGAME
epl
欧冠联赛
ucl
KXUCL
ucl
西甲联赛
laliga
KXLALIGA
lal
德甲联赛
bundesliga
KXBUNDESLIGA
bun
意甲联赛
seriea
KXSERIEA
sea
法甲联赛
ligue1
KXLIGUE1
fl1
美职联
mls
KXMLSGAME
mls

Workflows

工作流程

Today's NBA Dashboard

今日NBA赛事仪表板

Show all NBA games today with matching prediction market odds.
bash
sports-skills markets get_todays_markets --sport=nba
Returns each game with:
  • ESPN game info (teams, time, status)
  • ESPN DraftKings odds (American format)
  • Matching Kalshi markets (via
    search_markets(sport='nba')
    )
  • Matching Polymarket markets (via
    search_markets(sport='nba')
    )
展示今日所有NBA赛事及对应的预测市场赔率。
bash
sports-skills markets get_todays_markets --sport=nba
返回内容包含每场赛事的:
  • ESPN赛事信息(球队、时间、状态)
  • ESPN DraftKings赔率(美式格式)
  • 匹配的Kalshi市场(通过
    search_markets(sport='nba')
    获取)
  • 匹配的Polymarket市场(通过
    search_markets(sport='nba')
    获取)

Find Arb on a Specific Game

查找特定赛事的套利机会

  1. Get the ESPN event ID from the schedule:
    sports-skills markets get_sport_schedule --sport=nba
  2. Compare odds across all sources:
    sports-skills markets compare_odds --sport=nba --event_id=401234567
  3. If arbitrage is detected, the response includes allocation percentages and guaranteed ROI.
  1. 从赛程中获取ESPN赛事ID:
    sports-skills markets get_sport_schedule --sport=nba
  2. 对比所有来源的赔率:
    sports-skills markets compare_odds --sport=nba --event_id=401234567
  3. 若检测到套利机会,响应内容会包含分配比例和保证收益率。

Compare ESPN vs Polymarket

对比ESPN与Polymarket赔率

  1. sports-skills markets compare_odds --sport=nba --event_id=401234567
  2. Response includes ESPN odds normalized to probability + Polymarket prices side-by-side
  3. Arbitrage check runs automatically using
    betting.find_arbitrage
  1. 执行命令:
    sports-skills markets compare_odds --sport=nba --event_id=401234567
  2. 响应内容包含转换为概率的ESPN赔率与Polymarket价格的并排对比
  3. 系统会自动调用
    betting.find_arbitrage
    进行套利检查

Full Bet Evaluation

完整投注评估

  1. sports-skills markets evaluate_market --sport=nba --event_id=401234567
  2. Fetches ESPN odds, searches for matching prediction market price
  3. Pipes through
    betting.evaluate_bet
    : devig → edge → Kelly
  4. Returns fair probability, edge percentage, EV, Kelly fraction, and recommendation
  1. 执行命令:
    sports-skills markets evaluate_market --sport=nba --event_id=401234567
  2. 获取ESPN赔率,搜索匹配的预测市场价格
  3. 传入
    betting.evaluate_bet
    处理:去抽水→优势计算→凯利公式
  4. 返回公平概率、优势百分比、预期收益、凯利比例及建议

Search for a Team

搜索球队相关市场

Find all prediction markets related to a team:
bash
sports-skills markets search_entity --query="Chiefs" --sport=nfl
Returns Kalshi events (via
search_markets(sport='nfl', query='Chiefs')
) and Polymarket markets (via
search_markets(sport='nfl', query='Chiefs')
).
查找与某球队相关的所有预测市场:
bash
sports-skills markets search_entity --query="Chiefs" --sport=nfl
返回Kalshi赛事(通过
search_markets(sport='nfl', query='Chiefs')
获取)和Polymarket市场(通过
search_markets(sport='nfl', query='Chiefs')
获取)。

Price Normalization

价格标准化

Different sources use different formats:
SourceFormatExampleMeaning
ESPNAmerican odds
-150
Favorite, implied 60%
PolymarketProbability (0-1)
0.65
65% implied probability
KalshiInteger (0-100)
65
65% implied probability
normalize_price
converts any format to a common structure:
json
{
  "implied_probability": 0.65,
  "american": -185.7,
  "decimal": 1.5385,
  "source": "polymarket"
}
不同来源使用不同的赔率格式:
来源格式示例含义
ESPN美式赔率
-150
热门方,隐含60%概率
Polymarket概率(0-1)
0.65
隐含65%概率
Kalshi整数(0-100)
65
隐含65%概率
normalize_price
命令可将任意格式转换为通用结构:
json
{
  "implied_probability": 0.65,
  "american": -185.7,
  "decimal": 1.5385,
  "source": "polymarket"
}

Examples

使用示例

User: "What NBA games are on today and what are the prediction market odds?" →
markets.get_todays_markets(sport="nba")
User: "Find me Lakers markets on Kalshi and Polymarket" →
markets.search_entity(query="Lakers", sport="nba")
User: "Compare the odds for this Celtics game across ESPN and Polymarket" →
markets.compare_odds(sport="nba", event_id="<id>")
User: "Is there edge on the Chiefs game?" →
markets.evaluate_market(sport="nfl", event_id="<id>")
User: "Show me all NFL prediction markets" →
markets.get_sport_markets(sport="nfl")
User: "Convert a Polymarket price of 65 cents to American odds" →
markets.normalize_price(price=0.65, source="polymarket")
用户:“今天有哪些NBA赛事,对应的预测市场赔率是多少?” → 执行
markets.get_todays_markets(sport="nba")
用户:“帮我在Kalshi和Polymarket上查找湖人队相关的市场” → 执行
markets.search_entity(query="Lakers", sport="nba")
用户:“对比这场凯尔特人赛事在ESPN和Polymarket上的赔率” → 执行
markets.compare_odds(sport="nba", event_id="<id>")
用户:“酋长队的赛事有投注优势吗?” → 执行
markets.evaluate_market(sport="nfl", event_id="<id>")
用户:“展示所有NFL预测市场” → 执行
markets.get_sport_markets(sport="nfl")
用户:“把Polymarket上65美分的价格转换为美式赔率” → 执行
markets.normalize_price(price=0.65, source="polymarket")

Commands that DO NOT exist — never call these

不存在的命令——请勿调用

  • get_odds
    — does not exist. Use
    compare_odds
    to see odds across sources, or use the polymarket/kalshi skill directly.
  • search_markets
    — does not exist on the markets module. Use
    search_entity
    instead. For raw market search, use the polymarket or kalshi skill directly.
  • get_schedule
    — does not exist. Use
    get_sport_schedule
    instead.
If a command is not listed in the Commands section above, it does not exist.
  • get_odds
    —— 不存在。如需查看跨平台赔率,请使用
    compare_odds
    ,或直接使用polymarket/kalshi工具。
  • search_markets
    —— markets模块中不存在该命令。请使用
    search_entity
    替代。如需原始市场搜索,请直接使用polymarket或kalshi工具。
  • get_schedule
    —— 不存在。请使用
    get_sport_schedule
    替代。
未在上述命令列表中列出的命令均不存在。

Partial Results

部分结果返回

If one source is unavailable (e.g., Kalshi is down), the module returns what it has with warnings:
json
{
  "status": true,
  "data": {
    "games": [...],
    "warnings": ["Kalshi search failed: connection timeout"]
  }
}
This ensures you always get usable data even when a source is temporarily unavailable.
若某一来源不可用(例如Kalshi宕机),模块会返回已获取的数据并附带警告:
json
{
  "status": true,
  "data": {
    "games": [...],
    "warnings": ["Kalshi搜索失败: 连接超时"]
  }
}
这样即使某一来源临时不可用,你仍能获取可用数据。