Polymarket Sports Edge
This is a template. The default signal compares sportsbook consensus odds
against Polymarket prices and trades when divergence exceeds a threshold.
Remix it — adjust the sports, threshold, sizing, or add your own filters
(e.g., only trade NBA, require minimum volume, weight by recency).
What It Does
Scans active Polymarket sports markets and compares prices against the
sportsbook consensus from The Odds API. When a market is mispriced relative
to sharp bookmaker lines, it buys the underpriced side.
The edge: Sportsbook lines are set by professional oddsmakers with billions
in handle — they're extremely well-calibrated. Polymarket sports markets are
thinner and less efficient. When they disagree, the books are usually right.
How It Works
Two parallel scanning modes run each cycle:
Game-level (h2h): Matches individual Polymarket game markets against sportsbook moneylines.
- 1. Fetch active sports markets from Simmer (
GET /api/sdk/markets?q=<sport>) - Fetch current h2h odds from The Odds API for the same sports
- Match markets to games by comparing team names
- Calculate implied probability from the sportsbook consensus (average across all bookmakers)
- Compare against the Polymarket price — if divergence exceeds the threshold, trade
Futures (outrights): Matches Polymarket championship/winner markets against sportsbook futures odds.
- 1. Fetch outrights from The Odds API (
_winner sport keys, e.g., basketball_nba_championship_winner) - Search Simmer for futures markets (e.g., "NBA championship", "Super Bowl winner")
- Match market questions to teams in the outrights data
- Compare sportsbook implied probability vs Polymarket price and trade divergence
Setup
Environment Variables
| Variable | Required | Default | Description |
|---|
| INLINECODE3 | Yes | — | Your Simmer API key |
| INLINECODE4 |
Yes | — | Free key from
the-odds-api.com (500 req/month free) |
|
LIVE | No |
false | Set to
true for real trades. Default is dry-run. |
|
MIN_DIVERGENCE | No |
0.08 | Minimum spread to enter a trade (8%) |
|
EXIT_SPREAD | No |
0.02 | Exit when spread closes below this (2%) |
|
TRADE_AMOUNT | No |
10.0 | Dollars per trade |
|
MAX_RESOLVE_DAYS | No |
30 | Skip futures markets resolving beyond this (capital lock-up) |
|
MIN_SHARES_TO_SELL | No |
5.0 | Polymarket minimum sell size |
|
API_TIMEOUT | No |
30 | HTTP timeout in seconds |
|
SPORTS | No | 7 sports | Comma-separated game-level Odds API sport keys |
|
FUTURES | No | 4 leagues | Comma-separated futures sport keys |
Get a Free Odds API Key
- 1. Go to the-odds-api.com
- Sign up for the free tier (500 requests/month)
- Copy your API key
- Set it: INLINECODE22
First Run Setup
When a user first installs this skill, walk them through these configuration
choices before running:
- 1. API keys — Confirm
SIMMER_API_KEY and THE_ODDS_API_KEY are set. - Divergence threshold (
MIN_DIVERGENCE) — Default is 8%. Lower values
(e.g., 5%) find more trades but with thinner edges. Higher values (e.g., 10%)
are more selective. Ask the user what level of aggression they prefer.
- 3. Exit spread (
EXIT_SPREAD) — Default is 2%. This is when the arb is
considered closed and the position is sold. Tighter values exit sooner.
- 4. Trade size (
TRADE_AMOUNT) — Default $10 per trade. Ask the user what
they're comfortable risking per position.
- 5. Resolution window (
MAX_RESOLVE_DAYS) — Default 90 days. Skip futures
markets that resolve beyond this horizon. Shorter = less capital lock-up,
but may miss valid opportunities.
- 6. Sports — By default scans all major US sports plus EPL and MLS. The user
can narrow to specific leagues if they prefer.
- 7. Dry run — Start with
LIVE=false (the default) and review a few cycles
of output before going live.
Explain each setting and its trade-offs so the user can make an informed choice.
Running
CODEBLOCK0
Example Output
CODEBLOCK1
Polymarket Sports Edge
这是一个模板。 默认信号将体育博彩共识赔率与Polymarket价格进行比较,当偏差超过阈值时进行交易。
您可以重新组合它——调整运动项目、阈值、头寸规模,或添加自己的过滤器
(例如,仅交易NBA、要求最低成交量、按近期数据加权)。
功能说明
扫描活跃的Polymarket体育市场,并将价格与来自The Odds API的体育博彩共识进行比较。当某个市场相对于精准的博彩公司赔率出现错误定价时,它会买入被低估的一方。
优势所在: 体育博彩公司的赔率由专业赔率制定者设定,涉及数十亿美元的交易量——它们校准得极为精准。Polymarket的体育市场流动性较低,效率也较低。当两者出现分歧时,博彩公司通常是正确的。
工作原理
每个周期运行两种并行扫描模式:
比赛级别(一对一): 将单个Polymarket比赛市场与体育博彩的胜负盘赔率进行匹配。
- 1. 从Simmer获取活跃的体育市场(GET /api/sdk/markets?q=)
- 从The Odds API获取同一运动项目的当前胜负盘赔率
- 通过比较队伍名称将市场与比赛进行匹配
- 从体育博彩共识(所有博彩公司的平均值)计算隐含概率
- 与Polymarket价格进行比较——如果偏差超过阈值,则进行交易
期货(冠军盘): 将Polymarket的冠军/获胜者市场与体育博彩的期货赔率进行匹配。
- 1. 从The Odds API获取冠军盘(winner运动项目键,例如basketballnbachampionshipwinner)
- 在Simmer中搜索期货市场(例如NBA championship、Super Bowl winner)
- 将市场问题与冠军盘数据中的队伍进行匹配
- 比较体育博彩隐含概率与Polymarket价格,并对偏差进行交易
设置
环境变量
| 变量 | 必需 | 默认值 | 描述 |
|---|
| SIMMERAPIKEY | 是 | — | 您的Simmer API密钥 |
| THEODDSAPIKEY |
是 | — | 来自
the-odds-api.com的免费密钥(每月500次免费请求) |
| LIVE | 否 | false | 设置为true进行真实交易。默认为模拟运行。 |
| MIN_DIVERGENCE | 否 | 0.08 | 进入交易的最小价差(8%) |
| EXIT_SPREAD | 否 | 0.02 | 价差低于此值时退出(2%) |
| TRADE_AMOUNT | 否 | 10.0 | 每笔交易金额(美元) |
| MAX
RESOLVEDAYS | 否 | 30 | 跳过超过此期限结算的期货市场(资金锁定) |
| MIN
SHARESTO_SELL | 否 | 5.0 | Polymarket最小卖出数量 |
| API_TIMEOUT | 否 | 30 | HTTP超时时间(秒) |
| SPORTS | 否 | 7个运动项目 | 逗号分隔的比赛级别Odds API运动项目键 |
| FUTURES | 否 | 4个联赛 | 逗号分隔的期货运动项目键 |
获取免费Odds API密钥
- 1. 前往the-odds-api.com
- 注册免费套餐(每月500次请求)
- 复制您的API密钥
- 设置密钥:export THEODDSAPIKEY=yourkeyhere
首次运行设置
当用户首次安装此技能时,在运行前引导他们完成以下配置选择:
- 1. API密钥 — 确认已设置SIMMERAPIKEY和THEODDSAPIKEY。
- 偏差阈值(MINDIVERGENCE)— 默认为8%。较低的值(例如5%)会发现更多交易,但优势较小。较高的值(例如10%)更具选择性。询问用户偏好的激进程度。
- 退出价差(EXITSPREAD)— 默认为2%。这是套利被认为已关闭并卖出头寸的时机。更紧的值会更快退出。
- 交易规模(TRADEAMOUNT)— 默认每笔交易10美元。询问用户每笔头寸愿意承担的风险。
- 结算窗口(MAXRESOLVEDAYS)— 默认90天。跳过超过此期限结算的期货市场。时间越短=资金锁定越少,但可能会错过有效机会。
- 运动项目 — 默认扫描所有主要美国运动项目加上英超和MLS。用户可以根据偏好缩小到特定联赛。
- 模拟运行 — 从LIVE=false(默认)开始,在进入实盘前查看几个周期的输出。
解释每个设置及其权衡,以便用户做出明智的选择。
运行
bash
模拟运行(默认)— 记录它将进行的交易
python sports_edge.py
实盘交易
LIVE=true python sports_edge.py
示例输出
[Sports Edge] 正在扫描7个运动项目+4个期货...(dryrun=True, mindivergence=8%)
[Sports Edge] NBA:找到6场比赛的赔率
[Sports Edge] 匹配:凯尔特人队会战胜步行者队吗? → 波士顿凯尔特人队 vs 印第安纳步行者队
[Sports Edge] Polymarket YES:0.58 | 博彩公司:0.69 | 偏差:+0.11
[Sports Edge] 模拟运行:将以0.58买入YES(优势11%)— 10.0
[Sports Edge] 期货NBA冠军:在冠军盘中找到30支队伍
[Sports Edge] 匹配:凯尔特人队会赢得2026年NBA总冠军吗 → 波士顿凯尔特人队
[Sports Edge] Polymarket YES:0.12 | 博彩公司:0.22 | 偏差:+0.10
[Sports Edge] 模拟运行:将以0.12买入YES(优势10%)— 10.0
[Sports Edge] 完成。找到2个机会(模拟运行)。