Kelly criterion with Pinnacle fair odds
Answer: Kelly sizes a stake from your probability estimate and the price you get: f = (b·p − q) / b, where b is decimal odds minus 1, p the win probability and q = 1 − p. Using Pinnacle's no-vig fairProb from PinnFeed as p, and another bookmaker's price as b, gives a stake fraction. Because p is an estimate, most people use a fraction (a quarter Kelly) and never full Kelly.
Python#
import os, requests
def kelly(decimal_price: float, p: float) -> float:
b = decimal_price - 1
return max(0.0, (b * p - (1 - p)) / b)
KEY = os.environ["PINNFEED_KEY"] # ps_live_...
r = requests.get("https://pinnfeed.io/v1/odds", headers={"x-api-key": KEY},
params={"sport": "soccer", "market": "moneyline", "main": "true", "limit": 20}, timeout=20)
r.raise_for_status()
ev = r.json()["events"][0]
o = ev["markets"][0]["outcomes"][0]
other_book_price = 2.30 # a price you collected elsewhere
f = kelly(other_book_price, o["fairProb"])
print(ev["home"], ev["away"], o["name"], "full", round(f, 4), "quarter", round(f / 4, 4))
Worked example with illustrative numbers: fairProb 0.488 and a price of 2.30 give b 1.30, full Kelly ≈ 9.4% and quarter Kelly ≈ 2.35% of bankroll. If the price is below the fair price, Kelly returns 0: no stake.
Cautions#
fairProbis Pinnacle's price with the margin removed, not the true probability.- Check
maxStakeand whether the market is still open before trusting a price. - Track your results against the closing line (CLV) rather than short-term profit.
Full walkthrough with the same formula: value betting guide. Screening code: fairProb EV screen.
Plans#
Free (30-second delay) runs this script. Real-time: Hobby (€29/mo) REST or Builder (€99/mo) WebSocket. Paid plans: 3-day trial; a card is required and it is charged after day 3 unless you cancel.
18+. Kelly is a statistical sizing rule, not a tip. Nothing here promises a profit; bet responsibly.
Related: Value betting API.
Questions people ask#
Why a quarter Kelly?#
Full Kelly assumes your probability is exact. With estimates, fractional Kelly cuts the variance and the damage from an overestimate.
Can I use Pinnacle's own price as b?#
Then the edge is negative by the margin and Kelly returns 0. Kelly only makes sense against a price above the fair price.
Is fairProb on every plan?#
fair and fairProb are added to outcomes on the normalized feed for every plan; Free returns them with a 30-second delay and main markets only.