← FastballAPICONTENT HISTORY

Update to FastballAPI

Snapshot Oct 30, 2026 · 00:06 UTC · version 1.0.0

Collection source: downloaded plugin package.

WHAT CHANGED

First saved snapshot

No earlier snapshot is available to establish a change.

Save FastballAPI and check future changes in Following.

Up to 10 plugins free · no card required.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Converts baseball betting odds between formats and removes the bookmaker margin to get true implied probabilities for moneylines, run lines, totals and player props. Use when the user asks about devigging, vig, implied probability, no-vig price, multiplicative, power or Shin methods, American vs decimal odds, or what a price really says. Prerequisite for edge detection. Do not use for browsing current lines: see odds-explorer. Do not use for calibrating model output: see walk-forward-validation.",
  "included_files": [],
  "name": "odds-analysis",
  "skill_md_contents": "---\nname: odds-analysis\ndescription: \"Converts baseball betting odds between formats and removes the bookmaker margin to get true implied probabilities for moneylines, run lines, totals and player props. Use when the user asks about devigging, vig, implied probability, no-vig price, multiplicative, power or Shin methods, American vs decimal odds, or what a price really says. Prerequisite for edge detection. Do not use for browsing current lines: see odds-explorer. Do not use for calibrating model output: see walk-forward-validation.\"\nmetadata:\n  version: 1.0.0\n  author: FastballAPI\n---\n\n# Odds Analysis\n\n> **Default data tool:** FastballAPI (`fastballapi-tool`).\n> Mostly pure math. Use `get_odds` (5 credits per game, 10 per date) for closing prices and `get_player_props` or `get_prop_history` (10 credits) for two-way prop prices. User-supplied prices cost nothing.\n\nYou turn prices into probabilities honestly. Every price carries a margin; a fair probability needs it removed, and the method you choose matters most on lopsided markets, which baseball has plenty of (pitching mismatches, run lines, props with one juiced side).\n\n## When to Use\n\n- \"What is -174 / +142 really saying?\"\n- Removing the margin from a two-way market (moneyline, over/under, run line)\n- Comparing prices across books on an equal footing\n- Turning a prop price pair (over -146, under +115) into a fair probability\n- Explaining American vs decimal odds\n\n## When NOT to Use\n\n- Browsing current lines: `odds-explorer`\n- Judging whether a model's probabilities are well calibrated: `walk-forward-validation`\n\n## Commands Available\n\n| Command | What it does | Credits |\n|---------|--------------|---------|\n| `get_odds` | Prices by book for a game (5) or a date (10); finished games include `result` | 5 or 10 |\n| `get_player_props` | Over and under prices by book for a game or a player | 10 |\n| `get_prop_history` | Closing line and prices for a player-market over time | 10 |\n\n## Commands That Do NOT Exist\n\n| Not available | Use instead |\n|---------------|-------------|\n| `get_no_vig_line`, `get_fair_odds` | Compute from `get_odds` with the methods below |\n| `get_true_probability` | Compute it; the API's `*_close_prob` fields still contain the margin |\n| `get_three_way_odds` | Not applicable: baseball has no draw in the moneyline |\n\n## Conversions\n\n```python\ndef implied(american):\n    return -american / (-american + 100) if american < 0 else 100 / (american + 100)\n\ndef decimal(american):\n    return 1 + (american / 100 if american > 0 else 100 / -american)\n```\n\n| American | Decimal | Implied |\n|----------|---------|---------|\n| -174 | 1.575 | 63.5% |\n| +142 | 2.420 | 41.3% |\n| -146 | 1.685 | 59.3% |\n| +115 | 2.150 | 46.5% |\n| -110 | 1.909 | 52.4% |\n\nPayout on a winning stake S is S times (decimal minus 1). A push returns the stake.\n\n## The Margin\n\nFor a two-way market, the sum of the implied probabilities exceeds 1. The excess is the margin (vig, overround).\n\nReal example: DraftKings closing moneyline on NYY vs TOR (2025-10-07), NYY -174, TOR +142 from `get_odds`:\n\n```\nimplied NYY = 174/274 = 0.6350\nimplied TOR = 100/242 = 0.4132\nsum         = 1.0483     margin = 4.8%\n```\n\nThe `home_close_prob` and `away_close_prob` fields in the API response (0.635, 0.413) are exactly these raw numbers. They are not fair probabilities.\n\n## Devig Methods\n\nAll three return probabilities that sum to 1. They differ on how the margin is spread.\n\n**1. Multiplicative (proportional).** Divide each implied probability by the sum.\n\n```\nNYY: 0.6350 / 1.0483 = 0.6058     TOR: 0.4132 / 1.0483 = 0.3942\n```\n\nSimple, and assumes the margin is spread in proportion to probability. Tends to under-correct favourites.\n\n**2. Power.** Find k such that p_home^k + p_away^k = 1, then use the powered values.\n\n```\nk = 1.0758:  NYY 0.6136, TOR 0.3864\n```\n\nTakes more margin off the longshot than multiplicative does. Use when you believe the favourite-longshot bias is present.\n\n**3. Shin.** Solves for the share of money from informed bettors, z, and removes margin accordingly.\n\n```\nz = 0.048:  NYY 0.6109, TOR 0.3891\n```\n\nBetween the other two on this example. Preferred in the literature for horse racing and soccer markets; for baseball moneylines the three differ by under 1.5 points near 60/40.\n\n**When the methods disagree.** The gap grows as the market gets lopsided or the margin grows. On a -300/+240 market the favourite is 71.8% (multiplicative), 73.3% (power) or 72.8% (Shin): a 1.5-point spread, which is larger than many claimed edges. Pick one method, state it, and use it everywhere. The default for this pack: **Shin or power for single bets, multiplicative only for quick checks.** Never switch methods to make an edge appear.\n\n```python\nfrom math import sqrt\n\ndef devig_multiplicative(p):\n    s = sum(p)\n    return [x / s for x in p]\n\ndef devig_power(p, tol=1e-10):\n    lo, hi = 1.0, 3.0\n    for _ in range(100):\n        k = (lo + hi) / 2\n        if sum(x ** k for x in p) > 1:\n            lo = k\n        else:\n            hi = k\n    return [x ** k for x in p]\n\ndef devig_shin(p):\n    s, lo, hi = sum(p), 0.0, 0.4\n    for _ in range(100):\n        z = (lo + hi) / 2\n        q = [(sqrt(z * z + 4 * (1 - z) * x * x / s) - z) / (2 * (1 - z)) for x in p]\n        if sum(q) > 1:\n            lo = z\n        else:\n            hi = z\n    return q\n```\n\n## Devigging a Prop\n\nReal closing line for a pitcher strikeout prop: Tarik Skubal, 2025-09-23, over 7.5 strikeouts at DraftKings, over -146, under +115 (`get_player_props`).\n\n```\nimplied over  = 146/246 = 0.5935\nimplied under = 100/215 = 0.4651     sum = 1.0586   margin = 5.9%\nfair over: multiplicative 0.5606, power 0.5661, Shin 0.5642\n```\n\nThe over at -146 breaks even at a true 59.3%; the fair estimate is about 56%. That 3-point gap is the margin you pay. Prop margins usually run higher than moneyline margins, and many apparent prop edges are just margin.\n\nUse the same line at the same book: the over at 7.5 and the under at 7.5. Do not pair an over at 7.5 from one book with an under at 8.5 from another.\n\n## Run Lines and Totals\n\n- Run line at -1.5: pair the two sides at the same book and devig as above. The -1.5 favourite price and the +1.5 underdog price are one two-way market.\n- Totals: pair over and under at the same number. If the books post 8 and 8.5, they are different markets. A total of 8 has a push probability; if over and under are both near -110 at a whole number, some of the 52.4% implied on each is compensation for pushes. Do not renormalize it away without saying so.\n- Measure the push rate from your own history of final scores against the closing total rather than assuming one. Check how `result.over` treats a push before relying on it.\n\n## Combining Books: The Consensus Line\n\nTo get a market probability across books, devig each book first, then take the median of the fair probabilities (or weight sharper books higher). Do not average raw implied probabilities across books: books with larger margins pull the average up. For closing-line work, the median of devigged closes across the books present is a sturdy reference, but the book count changes by era (see `odds-explorer` coverage).\n\n## Credit Usage\n\n| Operation | Credits |\n|-----------|---------|\n| Convert and devig user-supplied prices | 0 |\n| Pull one game's closing prices | 5 |\n| Pull a day's closing prices | 10 |\n| Pull a prop price pair | 10 |\n\n## Anti-patterns\n\n| Mistake | Why it is wrong | Do This |\n|---------|-----------------|---------|\n| Treating `*_close_prob` as fair | It includes the margin (sum above 1) | Devig first |\n| Devigging across two different books | Not one market | Pair sides at one book |\n| Averaging raw implied probabilities | Margin leaks in | Devig, then median |\n| Switching devig method until an edge shows | Method shopping creates false edges | Fix the method up front |\n| Ignoring pushes on a whole-number total | Understates both sides' risk | State the push share |\n| Hunting a 2-point edge while methods differ by 1.5 | The method choice is most of the signal | Report the range across methods |\n\n## Output Format\n\n```\nMarket: NYY -174 / TOR +142 (DraftKings, close)\nImplied: 63.5% / 41.3%  (sum 104.8%, margin 4.8%)\nFair NYY: multiplicative 60.6%, power 61.4%, Shin 61.1%\nRange across methods: 0.8 points. Method used: Shin.\n```\n\n## What to Do Next\n\n| You found | Next | Skill |\n|-----------|------|-------|\n| Prop fair probability | Build the projection to beat it | `prop-modeling` |\n| Prices not yet pulled | Fetch and compare books | `odds-explorer` |\n"
}

SHA-256 of public snapshot: 4db6fe4d86d5933ae06b7327847f887ca3ca1cee6613b6272e7a1636cd1a5a56