markets
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMarkets 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
undefinedbash
undefinedToday'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 , the orchestrator maps it to the correct Polymarket sport code and Kalshi series ticker automatically.
--sport=nba - Both platforms use sport-aware search. Polymarket uses its config to resolve sport→series_id; Kalshi uses
/sports,KXNBA, etc.KXNFL - 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.
- 传递体育项目上下文:当你指定时,编排工具会自动将其映射为正确的Polymarket体育项目代码和Kalshi系列代码。
--sport=nba - 双平台支持体育项目感知搜索:Polymarket使用其配置解析体育项目→系列ID;Kalshi使用
/sports、KXNBA等代码。KXNFL - 价格标准化:ESPN使用美式赔率,Polymarket使用0-1概率,Kalshi使用0-100整数。编排工具会将所有格式统一转换为隐含概率以便对比。
Commands
命令列表
| Command | Required | Optional | Description |
|---|---|---|---|
| sport, date | Fetch ESPN schedule → search both exchanges with sport context → unified dashboard | |
| query | sport | Search Kalshi + Polymarket for a team/player/event name (passes sport to both platforms) |
| sport, event_id | ESPN odds + prediction market prices → normalized side-by-side + arb check | |
| sport | status, limit | Sport-filtered market listing on both platforms (uses sport code, not text query) |
| sport, date | Unified ESPN schedule across one or all sports | |
| price, source | Convert any source format to common {implied_prob, american, decimal} | |
| sport, event_id | token_id, kalshi_ticker, outcome | ESPN odds + market price → devig → edge → Kelly |
| 命令 | 必填参数 | 可选参数 | 描述 |
|---|---|---|---|
| sport, date | 获取ESPN赛程→结合体育项目上下文搜索两个交易平台→生成统一仪表板 | |
| query | sport | 在Kalshi和Polymarket中搜索球队/球员/赛事名称(向双平台传递体育项目参数) |
| sport, event_id | 对比ESPN赔率与预测市场价格→标准化并排展示+套利检查 | |
| sport | status, limit | 按体育项目筛选双平台的市场列表(使用体育项目代码,而非文本查询) |
| sport, date | 获取单一或所有体育项目的统一ESPN赛程 | |
| price, source | 将任意来源格式转换为通用格式{implied_prob, american, decimal} | |
| sport, event_id | token_id, kalshi_ticker, outcome | ESPN赔率 + 市场价格→去抽水→优势计算→凯利公式 |
Supported Sports
支持的体育项目
US Sports (with ESPN schedules)
美国体育项目(含ESPN赛程)
| Sport | Key | Kalshi Series | Polymarket Code |
|---|---|---|---|
| NFL | | KXNFL | |
| NBA | | KXNBA | |
| MLB | | KXMLB | |
| NHL | | KXNHL | |
| WNBA | | KXWNBA | |
| College Football | | KXCFB | |
| College Basketball | | KXCBB | |
| 体育项目 | 标识 | Kalshi系列代码 | Polymarket代码 |
|---|---|---|---|
| NFL | | KXNFL | |
| NBA | | KXNBA | |
| MLB | | KXMLB | |
| NHL | | KXNHL | |
| WNBA | | KXWNBA | |
| 大学橄榄球 | | KXCFB | |
| 大学篮球 | | KXCBB | |
Football (prediction markets only — no ESPN schedule)
足球赛事(仅支持预测市场——无ESPN赛程)
| League | Key | Kalshi Series | Polymarket Code |
|---|---|---|---|
| English Premier League | | KXEPLGAME | |
| Champions League | | KXUCL | |
| La Liga | | KXLALIGA | |
| Bundesliga | | KXBUNDESLIGA | |
| Serie A | | KXSERIEA | |
| Ligue 1 | | KXLIGUE1 | |
| MLS | | KXMLSGAME | |
| 联赛 | 标识 | Kalshi系列代码 | Polymarket代码 |
|---|---|---|---|
| 英超联赛 | | KXEPLGAME | |
| 欧冠联赛 | | KXUCL | |
| 西甲联赛 | | KXLALIGA | |
| 德甲联赛 | | KXBUNDESLIGA | |
| 意甲联赛 | | KXSERIEA | |
| 法甲联赛 | | KXLIGUE1 | |
| 美职联 | | KXMLSGAME | |
Workflows
工作流程
Today's NBA Dashboard
今日NBA赛事仪表板
Show all NBA games today with matching prediction market odds.
bash
sports-skills markets get_todays_markets --sport=nbaReturns 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
查找特定赛事的套利机会
- Get the ESPN event ID from the schedule:
sports-skills markets get_sport_schedule --sport=nba - Compare odds across all sources:
sports-skills markets compare_odds --sport=nba --event_id=401234567 - If arbitrage is detected, the response includes allocation percentages and guaranteed ROI.
- 从赛程中获取ESPN赛事ID:
sports-skills markets get_sport_schedule --sport=nba - 对比所有来源的赔率:
sports-skills markets compare_odds --sport=nba --event_id=401234567 - 若检测到套利机会,响应内容会包含分配比例和保证收益率。
Compare ESPN vs Polymarket
对比ESPN与Polymarket赔率
sports-skills markets compare_odds --sport=nba --event_id=401234567- Response includes ESPN odds normalized to probability + Polymarket prices side-by-side
- Arbitrage check runs automatically using
betting.find_arbitrage
- 执行命令:
sports-skills markets compare_odds --sport=nba --event_id=401234567 - 响应内容包含转换为概率的ESPN赔率与Polymarket价格的并排对比
- 系统会自动调用进行套利检查
betting.find_arbitrage
Full Bet Evaluation
完整投注评估
sports-skills markets evaluate_market --sport=nba --event_id=401234567- Fetches ESPN odds, searches for matching prediction market price
- Pipes through : devig → edge → Kelly
betting.evaluate_bet - Returns fair probability, edge percentage, EV, Kelly fraction, and recommendation
- 执行命令:
sports-skills markets evaluate_market --sport=nba --event_id=401234567 - 获取ESPN赔率,搜索匹配的预测市场价格
- 传入处理:去抽水→优势计算→凯利公式
betting.evaluate_bet - 返回公平概率、优势百分比、预期收益、凯利比例及建议
Search for a Team
搜索球队相关市场
Find all prediction markets related to a team:
bash
sports-skills markets search_entity --query="Chiefs" --sport=nflReturns Kalshi events (via ) and Polymarket markets (via ).
search_markets(sport='nfl', query='Chiefs')search_markets(sport='nfl', query='Chiefs')查找与某球队相关的所有预测市场:
bash
sports-skills markets search_entity --query="Chiefs" --sport=nfl返回Kalshi赛事(通过获取)和Polymarket市场(通过获取)。
search_markets(sport='nfl', query='Chiefs')search_markets(sport='nfl', query='Chiefs')Price Normalization
价格标准化
Different sources use different formats:
| Source | Format | Example | Meaning |
|---|---|---|---|
| ESPN | American odds | | Favorite, implied 60% |
| Polymarket | Probability (0-1) | | 65% implied probability |
| Kalshi | Integer (0-100) | | 65% implied probability |
normalize_pricejson
{
"implied_probability": 0.65,
"american": -185.7,
"decimal": 1.5385,
"source": "polymarket"
}不同来源使用不同的赔率格式:
| 来源 | 格式 | 示例 | 含义 |
|---|---|---|---|
| ESPN | 美式赔率 | | 热门方,隐含60%概率 |
| Polymarket | 概率(0-1) | | 隐含65%概率 |
| Kalshi | 整数(0-100) | | 隐含65%概率 |
normalize_pricejson
{
"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
不存在的命令——请勿调用
— does not exist. Useget_oddsto see odds across sources, or use the polymarket/kalshi skill directly.compare_odds— does not exist on the markets module. Usesearch_marketsinstead. For raw market search, use the polymarket or kalshi skill directly.search_entity— does not exist. Useget_scheduleinstead.get_sport_schedule
If a command is not listed in the Commands section above, it does not exist.
—— 不存在。如需查看跨平台赔率,请使用get_odds,或直接使用polymarket/kalshi工具。compare_odds—— markets模块中不存在该命令。请使用search_markets替代。如需原始市场搜索,请直接使用polymarket或kalshi工具。search_entity—— 不存在。请使用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搜索失败: 连接超时"]
}
}这样即使某一来源临时不可用,你仍能获取可用数据。