Bet Slip Parser
Extract structured betting data from any bet slip format — pasted text, natural language, or screenshots.
When to Use
Use this skill when the user:
- - Pastes a bet confirmation or bet slip text
- Describes a bet they placed in natural language
- Shares a screenshot of a bet slip from any sportsbook
- Asks to "log this bet" or "parse this bet slip"
- Wants to convert a bet description into structured data
- Says "I just bet..." or "I placed a bet on..."
Supported Bet Types
| Bet Type | Keywords |
|---|
| Moneyline | moneyline, ML, to win, h2h |
| Spread |
spread, point spread, handicap, ATS, -3.5 |
| Total | total, over, under, O/U |
| Parlay | parlay, accumulator, multi, combo |
| Teaser | teaser, adjusted spread |
| Same-Game Parlay | SGP, same game, same-game |
| Prop | prop, player prop, over 24.5 pts |
| Future | future, outright, to win championship |
Supported Sportsbooks
Identify the sportsbook from branding, URLs, or mentions:
| Sportsbook | Identifiers |
|---|
| DraftKings | draftkings, dk, DK Sportsbook |
| FanDuel |
fanduel, fd, FD Sportsbook |
| BetMGM | betmgm, mgm, BetMGM Sportsbook |
| Caesars | caesars, czr, Caesars Sportsbook |
| Pinnacle | pinnacle, pin |
| Bet365 | bet365, b365 |
| BetRivers | betrivers, rivers |
| PointsBet | pointsbet |
| Polymarket | polymarket, poly |
| Kalshi | kalshi |
If the sportsbook cannot be identified, set source to "unknown".
Operations
1. Parse Text Bet Slip
When the user pastes sportsbook confirmation text, extract all fields and output JSON.
Extraction steps:
- 1. Identify sportsbook from text branding or URL
- Identify bet type from keywords (see table above)
- Extract team/player/event selections
- Extract odds — convert to American if decimal or fractional
- Extract stake amount and currency
- Calculate potential payout if not shown
- Extract timestamp if available
Odds conversion formulas (use inline when needed):
CODEBLOCK0
2. Parse Natural Language Bet
When the user describes a bet casually, extract the same fields.
Examples of natural language inputs and how to parse them:
- - "I bet $100 on the Lakers ML at +150 on DraftKings"
→ source: draftkings, bet_type: moneyline, selection: Los Angeles Lakers, odds: +150, stake: 100
- - "Put $25 on over 48.5 in Chiefs-Ravens at -110"
→ bet_type: total, selection: Over 48.5, odds: -110, stake: 25
- - "Parlayed Lakers ML and Chiefs -3.5, $50 to win $320 on FanDuel"
→ bet
type: parlay, 2 legs, stake: 50, potentialpayout: 320, source: fanduel
Always ask for missing critical fields:
- - If no stake mentioned, ask "How much did you bet?"
- If no odds mentioned, ask "What were the odds?"
- If no sportsbook mentioned, set source to "unknown"
3. Parse Screenshot Bet Slip
When the user shares an image of a bet slip:
- 1. Identify sportsbook from app branding/colors (DraftKings=green/black, FanDuel=blue/white, BetMGM=gold/black, Caesars=dark blue)
- Read all visible text on the bet slip
- Extract: event name, bet type, selection, odds, stake, potential payout
- For parlays, extract each individual leg
- Output in the standard JSON schema
Note: Screenshot parsing requires the LLM to have vision capabilities. If vision is not available, ask the user to paste the bet slip as text instead.
4. Validate Parsed Output
After parsing, validate the extracted data:
CODEBLOCK1
Output Rules
- 1. Always output a valid JSON object matching the schema
- All odds must include American format (convert if needed)
- Include decimal and implied probability for each leg
- If a field cannot be extracted, set it to null — never guess
- For parlays, each leg must be a separate entry in the legs array
- Always include the raw_input field with the original text or "screenshot"
- Potential payout must be calculated if not explicitly stated
- Timestamp should be ISO 8601 format; use current time if not on the slip
Error Handling
- - If the input is ambiguous and multiple interpretations exist, present options and ask the user to clarify
- If the image is too blurry or cropped, ask for a clearer screenshot or text input
- If odds format is unrecognized, ask the user to specify (American, decimal, or fractional)
- If the bet type cannot be determined, default to "moneyline" for single selection and "parlay" for multiple selections
- Always show the parsed JSON and ask "Does this look right?" before passing to downstream skills
About
Built by AgentBets — full tutorial at agentbets.ai/guides/openclaw-bet-slip-parser-skill/.
Part of the OpenClaw Skills series for the Agent Betting Stack.
投注单解析器
从任何投注单格式(粘贴文本、自然语言或截图)中提取结构化投注数据。
使用场景
当用户出现以下情况时使用此技能:
- - 粘贴投注确认信息或投注单文本
- 用自然语言描述他们下的注
- 分享任何体育博彩平台的投注单截图
- 要求记录此投注或解析此投注单
- 想要将投注描述转换为结构化数据
- 说我刚下了注...或我在...上下了注
支持的投注类型
| 投注类型 | 关键词 |
|---|
| 胜负盘 | moneyline, ML, to win, h2h |
| 让分盘 |
spread, point spread, handicap, ATS, -3.5 |
| 总分盘 | total, over, under, O/U |
| 串关 | parlay, accumulator, multi, combo |
| 调整让分 | teaser, adjusted spread |
| 同场串关 | SGP, same game, same-game |
| 球员/特殊投注 | prop, player prop, over 24.5 pts |
| 未来投注 | future, outright, to win championship |
支持的体育博彩平台
通过品牌标识、网址或提及内容识别体育博彩平台:
| 体育博彩平台 | 识别标识 |
|---|
| DraftKings | draftkings, dk, DK Sportsbook |
| FanDuel |
fanduel, fd, FD Sportsbook |
| BetMGM | betmgm, mgm, BetMGM Sportsbook |
| Caesars | caesars, czr, Caesars Sportsbook |
| Pinnacle | pinnacle, pin |
| Bet365 | bet365, b365 |
| BetRivers | betrivers, rivers |
| PointsBet | pointsbet |
| Polymarket | polymarket, poly |
| Kalshi | kalshi |
如果无法识别体育博彩平台,将来源设置为unknown。
操作
1. 解析文本投注单
当用户粘贴体育博彩平台确认文本时,提取所有字段并输出JSON。
提取步骤:
- 1. 从文本品牌标识或网址识别体育博彩平台
- 从关键词识别投注类型(见上表)
- 提取球队/球员/赛事选择
- 提取赔率——如果是小数或分数赔率则转换为美式赔率
- 提取投注金额和货币
- 如果未显示则计算潜在赔付额
- 如果可用则提取时间戳
赔率转换公式(需要时内联使用):
bash
小数赔率转美式赔率
echo $DECIMAL_ODDS | python3 -c
import sys
d = float(sys.stdin.read().strip())
if d >= 2.0:
print(f+{round((d - 1) * 100)})
else:
print(f{round(-100 / (d - 1))})
分数赔率(例如 3/2)转美式赔率
echo 3/2 | python3 -c
import sys
n, d = map(int, sys.stdin.read().strip().split(/))
dec = (n / d) + 1
if dec >= 2.0:
print(f+{round((dec - 1) * 100)})
else:
print(f{round(-100 / (dec - 1))})
美式赔率转隐含概率
echo -110 | python3 -c
import sys
odds = int(sys.stdin.read().strip())
if odds < 0:
prob = abs(odds) / (abs(odds) + 100)
else:
prob = 100 / (odds + 100)
print(f{prob:.4f})
美式赔率转小数赔率
echo -110 | python3 -c
import sys
odds = int(sys.stdin.read().strip())
if odds < 0:
dec = 1 + (100 / abs(odds))
else:
dec = 1 + (odds / 100)
print(f{dec:.3f})
2. 解析自然语言投注
当用户随意描述投注时,提取相同字段。
自然语言输入及其解析方式的示例:
- - 我在DraftKings上以+150赔率押了100美元湖人队胜负盘
→ source: draftkings, bet_type: moneyline, selection: Los Angeles Lakers, odds: +150, stake: 100
- - 在酋长队-乌鸦队比赛中以-110赔率押了25美元大48.5分
→ bet_type: total, selection: Over 48.5, odds: -110, stake: 25
- - 在FanDuel上串关湖人队胜负盘和酋长队-3.5,50美元赢320美元
→ bet
type: parlay, 2 legs, stake: 50, potentialpayout: 320, source: fanduel
始终询问缺失的关键字段:
- - 如果未提及投注金额,询问你押了多少钱?
- 如果未提及赔率,询问赔率是多少?
- 如果未提及体育博彩平台,将来源设置为unknown
3. 解析截图投注单
当用户分享投注单图片时:
- 1. 从应用品牌标识/颜色识别体育博彩平台(DraftKings=绿色/黑色,FanDuel=蓝色/白色,BetMGM=金色/黑色,Caesars=深蓝色)
- 读取投注单上所有可见文本
- 提取:赛事名称、投注类型、选择、赔率、投注金额、潜在赔付额
- 对于串关,提取每个单独的选项
- 以标准JSON模式输出
注意:截图解析需要LLM具备视觉能力。如果不具备视觉能力,请要求用户改为粘贴投注单文本。
4. 验证解析输出
解析后,验证提取的数据:
bash
验证美式赔率格式(必须为+或-后跟数字)
echo $ODDS | grep -qE ^[+-][0-9]+$ && echo VALID || echo INVALID: odds must be +NNN or -NNN
验证投注金额为正数
echo $STAKE | grep -qE ^[0-9]+(\.[0-9]{1,2})?$ && echo VALID || echo INVALID: stake must be positive number
验证投注类型
echo $BET_TYPE | grep -qE ^(moneyline|spread|total|parlay|teaser|sgp|prop|future)$ && echo VALID || echo INVALID: unknown bet type
交叉检查:潜在赔付额应与赔率×投注金额匹配
echo $STAKE $ODDS | python3 -c
import sys
parts = sys.stdin.read().strip().split()
stake, odds = float(parts[0]), int(parts[1])
if odds > 0:
payout = stake + (stake * odds / 100)
else:
payout = stake + (stake * 100 / abs(odds))
print(fExpected payout: {payout:.2f})
输出规则
- 1. 始终输出符合模式的合法JSON对象
- 所有赔率必须包含美式格式(如有需要则转换)
- 为每个选项包含小数赔率和隐含概率
- 如果无法提取字段,将其设置为null——切勿猜测
- 对于串关,每个选项必须是legs数组中的单独条目
- 始终包含raw_input字段,内容为原始文本或screenshot
- 如果未明确说明,必须计算潜在赔付额
- 时间戳应为ISO 8601格式;如果投注单上没有则使用当前时间
错误处理
- - 如果输入存在歧义且存在多种解释,提供选项并要求用户澄清
- 如果图片过于模糊或裁剪不当,要求提供更清晰的截图或文本输入
- 如果赔率格式无法识别,要求用户指定(美式、小数或分数)
- 如果无法确定投注类型,对于单一选择默认为moneyline,对于多个选择默认为parlay
- 始终显示解析后的JSON并询问看起来对吗?然后再传递给下游技能
关于
由AgentBets构建——完整教程请访问agentbets.ai/guides/openclaw-bet-slip-parser-skill/。
属于OpenClaw技能系列,用于智能体投注栈。