No-Vig Odds API: Calculate Fair Odds 3 Ways in Python
Every price a bookmaker shows you is inflated. Add up the implied probabilities of any market and they sum to more than 100 percent. That excess is the vig (the juice, the margin), and until you strip it out you are not looking at a probability, you are looking at a sales price. “No-vig” or “fair” odds are what is left after you remove it, and they are the foundation of every +EV calculation, every model benchmark, and every Kelly stake.
Here is what most tutorials skip: how you remove the vig changes the answer. This guide shows the three de-vig methods that matter (proportional, power, and Shin) in plain Python, run against live data from the OddsPapi feed, and tells you which to use and when.
Why You Can’t Just Divide by the Overround
The naive method, dividing each implied probability by the booksum, is fine for a coin-flip market. It quietly breaks on lopsided ones because of the favorite-longshot bias: bettors systematically overbet longshots, so a longshot’s market price carries more inflated probability than the favorite’s. Split the vig evenly and you hand the longshot a fair price that is still too short. Models built on those numbers leak value on exactly the bets where the edge is supposed to live.
So there are three methods worth knowing:
| Method | Assumption | Longshot handling | Use when |
|---|---|---|---|
| Proportional | Vig is spread evenly across outcomes | Untouched (can overprice) | Balanced markets, quick work |
| Power (logarithmic) | Vig scales with each outcome’s probability | Strips more from longshots | Lopsided markets, modelling |
| Shin | Vig protects the book from insiders | Strips more from longshots, gently | Sharp benchmarks, research |
Get a Live Price
First, pull a real market. We use a Pinnacle line because Pinnacle runs one of the tightest margins in the business, which makes its de-vigged price the closest thing to a true market consensus. Auth is the apiKey query parameter, never a header.
import requests
API_KEY = "YOUR_API_KEY"
BASE = "https://api.oddspapi.io/v4"
params = {
"apiKey": API_KEY,
"fixtureId": "id1000018868194690", # Breidablik vs KA Akureyri
"bookmakers": "pinnacle",
}
data = requests.get(f"{BASE}/odds", params=params).json()
markets = data["bookmakerOdds"]["pinnacle"]["markets"]
# Over/Under 2.5 goals (market 1010): a deliberately lopsided 2-way market
ou = markets["1010"]["outcomes"]
over = ou["1010"]["players"]["0"]["price"] # 1.285
under = ou["1011"]["players"]["0"]["price"] # 3.60
print(over, under)
Over 2.5 is 1.285, Under is 3.60. The implied probabilities are 77.8 and 27.8 percent, summing to 105.6 percent, so the overround (the vig) is 5.6 percent. Now we remove it three ways.
Method 1: Proportional (The Baseline)
def devig_proportional(odds):
"""Scale every implied probability down by the booksum."""
implied = [1 / o for o in odds]
booksum = sum(implied)
fair_probs = [p / booksum for p in implied]
return [round(1 / p, 3) for p in fair_probs] # fair decimal odds
print(devig_proportional([1.285, 3.60])) # -> [1.357, 3.802]
Fair Over 1.357, fair Under 3.802. Simple, but notice it removed the same 5.3 percent from each side. On a market this lopsided, that is the part to question.
Method 2: Power (Corrects the Longshot Bias)
The power method raises each implied probability to an exponent k chosen so the results sum to exactly 1. Because raising a small number to a power above 1 shrinks it faster than a large one, more vig comes off the longshot.
def devig_power(odds):
"""Find k so that sum(implied_i ** k) == 1, then invert."""
implied = [1 / o for o in odds]
lo, hi = 0.5, 3.0
for _ in range(200): # bisection on k
k = (lo + hi) / 2
if sum(p ** k for p in implied) - 1 > 0:
lo = k
else:
hi = k
fair_probs = [p ** k for p in implied]
return [round(1 / p, 3) for p in fair_probs]
print(devig_power([1.285, 3.60])) # -> [1.32, 4.127] (k = 1.107)
Fair Over 1.320, fair Under 4.127. The favorite’s fair price shortened and the longshot’s lengthened well past the proportional 3.802. Power decided the Under was overbet and stripped more of its inflated probability.
Method 3: Shin (The Sharp’s Choice)
The Shin method models the vig as the book’s insurance against insider-informed bettors, solving for the proportion z of informed money. It sits between proportional and power and is the method most often used to extract a sharp consensus.
def devig_shin(odds):
"""Solve Shin's model for z, the insider proportion."""
b = [1 / o for o in odds]
B = sum(b)
def probs(z):
return [((z * z + 4 * (1 - z) * (bi * bi) / B) ** 0.5 - z)
/ (2 * (1 - z)) for bi in b]
lo, hi = 1e-9, 0.5
for _ in range(200): # bisection on z
z = (lo + hi) / 2
if sum(probs(z)) - 1 > 0:
lo = z
else:
hi = z
return [round(1 / p, 3) for p in probs(z)]
print(devig_shin([1.285, 3.60])) # -> [1.333, 4.003] (z = 5.7%)
Fair Over 1.333, fair Under 4.003. Shin lands between the other two, a more conservative longshot correction than power.
The Three Side by Side
The whole reason this matters, on one lopsided market:
| Method | Fair Over 2.5 | Fair Under 2.5 |
|---|---|---|
| Raw Pinnacle (with vig) | 1.285 | 3.60 |
| Proportional | 1.357 | 3.802 |
| Shin (z = 5.7%) | 1.333 | 4.003 |
| Power (k = 1.107) | 1.320 | 4.127 |
On the longshot, proportional says fair value is 3.802 while power says 4.127. That is a 9 percent difference in the price you would need to beat for a +EV bet, on the exact same market. Pick the wrong method and your value scanner either misses real edges or invents fake ones.
It works the same on three-way markets. The same fixture’s 1X2 (market 101) priced 1.675 / 4.61 / 4.14 de-vigs to 1.768 / 4.866 / 4.370 proportionally, but 1.726 / 5.040 / 4.498 under the power method, which again pushes the longshot Draw and Away prices longer.
Which One Should You Use?
- Proportional for balanced markets (moneylines near even, two-way totals at the median line) where the bias is negligible and speed matters.
- Power as the default for modelling and value scanning across lopsided markets. It is simple, has one parameter, and corrects the bias that actually costs you money.
- Shin when you want the academically grounded sharp consensus, especially for research or calibrating against closing lines.
Whichever you choose, de-vig the sharpest book you can. That is why we pulled Pinnacle: its fair odds are the benchmark the rest of the market gets measured against. To build that benchmark from many books at once rather than one, see our consensus odds calculator. To measure the vig itself before you strip it, the vig calculator and margin analytics guides go deeper. And to turn fair odds into bets, the expected value and Kelly staking tutorials pick up exactly here.
Frequently Asked Questions
What are no-vig odds?
No-vig (or fair) odds are a bookmaker’s prices with the built-in margin removed, so the implied probabilities sum to exactly 100 percent. They represent the book’s true estimate of each outcome’s probability and are the starting point for any expected-value calculation.
How do I remove the vig from odds in Python?
Convert each price to an implied probability (1 divided by the decimal odds), then renormalise so they sum to 1. The simplest method divides each by the booksum (proportional); the power and Shin methods adjust for the favorite-longshot bias by stripping more probability from longshots.
Which de-vig method is most accurate?
For balanced markets all three agree closely. For lopsided markets the power and Shin methods are more accurate because they correct the favorite-longshot bias that proportional ignores. Power is the common default for modelling; Shin is favoured for extracting a sharp consensus.
Why de-vig Pinnacle specifically?
Pinnacle runs one of the lowest margins in the market and moves its lines sharply, so its no-vig price is the closest single-book proxy for the true market probability. It is the standard benchmark for measuring value at softer books.
Is there a no-vig odds API?
OddsPapi gives you the raw prices from 350+ bookmakers, including Pinnacle, on a free tier, plus free historical odds. You apply the de-vig method of your choice (the functions above are all you need) to turn those into fair odds for any market.
Build Your Fair-Odds Engine
No-vig odds are three lines of Python away once you have clean prices. Get a free OddsPapi API key, pull Pinnacle and 350+ other books, and strip the vig your way.