<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kenn-kentonm</title>
    <description>The latest articles on DEV Community by kenn-kentonm (@kennkentonm).</description>
    <link>https://dev.to/kennkentonm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4058477%2F6df43c57-994c-4ea5-99c0-bd2831be9872.png</url>
      <title>DEV Community: kenn-kentonm</title>
      <link>https://dev.to/kennkentonm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kennkentonm"/>
    <language>en</language>
    <item>
      <title>I tested whether my football model beats the bookmakers. It doesn't, so my API says so</title>
      <dc:creator>kenn-kentonm</dc:creator>
      <pubDate>Thu, 19 Nov 2026 11:33:42 +0000</pubDate>
      <link>https://dev.to/kennkentonm/i-tested-whether-my-football-model-beats-the-bookmakers-it-doesnt-so-my-api-says-so-1g5b</link>
      <guid>https://dev.to/kennkentonm/i-tested-whether-my-football-model-beats-the-bookmakers-it-doesnt-so-my-api-says-so-1g5b</guid>
      <description>&lt;p&gt;I built a football prediction API. Then I tested it against the thing that matters: the bookmaker market. It didn't beat it.&lt;br&gt;
That could have been the end of the project. Instead it changed the product.&lt;br&gt;
The result&lt;br&gt;
Bookmaker odds, once you strip out the margin, are a very good probability estimate. My statistical model added nothing measurable on top. So I stopped pretending.&lt;br&gt;
Now, where odds exist, the API returns the margin-free consensus across bookmakers. Where they don't, it falls back to the model. Every response says which one you got:&lt;br&gt;
{ "prob_home": 0.48, "prob_draw": 0.27, "prob_away": 0.25, "basis": "market_consensus" }&lt;br&gt;
(Illustrative values. The real response has more fields.)&lt;br&gt;
Check it yourself&lt;br&gt;
I publish the track record, misses included: [N] finished matches, forecast before kickoff, log loss [log loss], Brier [Brier].&lt;br&gt;
Public page: &lt;a href="https://www.predictiqpro.com/accuracy" rel="noopener noreferrer"&gt;https://www.predictiqpro.com/accuracy&lt;/a&gt;&lt;br&gt;
The same numbers with no API key: GET &lt;a href="https://api.predictiqpro.com/status/accuracy" rel="noopener noreferrer"&gt;https://api.predictiqpro.com/status/accuracy&lt;/a&gt;&lt;br&gt;
How it's calculated: &lt;a href="https://www.predictiqpro.com/methodology" rel="noopener noreferrer"&gt;https://www.predictiqpro.com/methodology&lt;/a&gt;&lt;br&gt;
Using it&lt;br&gt;
Every league has a page with its ID and requests you can paste. Live scores, Python:&lt;br&gt;
import requests&lt;/p&gt;

&lt;p&gt;r = requests.get(&lt;br&gt;
    "&lt;a href="https://api.predictiqpro.com/fixtures/" rel="noopener noreferrer"&gt;https://api.predictiqpro.com/fixtures/&lt;/a&gt;",&lt;br&gt;
    params={"league_id": 88},   # Eredivisie: see /football-api/eredivisie for the ID&lt;br&gt;
    headers={"Authorization": "Token YOUR_API_KEY"},&lt;br&gt;
    timeout=15,&lt;br&gt;
)&lt;br&gt;
for m in r.json()["results"][:5]:&lt;br&gt;
    print(m["home_team"], "vs", m["away_team"], m["status"])&lt;br&gt;
Check the league ID on the league's page before you use it. I haven't verified 88 here, so don't copy it blindly. Live scores in JavaScript:&lt;br&gt;
const headers = { Authorization: "Token YOUR_API_KEY" };&lt;br&gt;
setInterval(async () =&amp;gt; {&lt;br&gt;
  const res = await fetch("&lt;a href="https://api.predictiqpro.com/live/feed" rel="noopener noreferrer"&gt;https://api.predictiqpro.com/live/feed&lt;/a&gt;", { headers });&lt;br&gt;
  console.log(await res.json());&lt;br&gt;
}, 20000);&lt;br&gt;
There's also a WebSocket that pushes only changed matches (Developer plan and up), and an MCP server so an AI agent can call the predictions as tools: &lt;a href="https://www.predictiqpro.com/mcp" rel="noopener noreferrer"&gt;https://www.predictiqpro.com/mcp&lt;/a&gt;&lt;br&gt;
League pages to start from:&lt;br&gt;
Football API: all leagues&lt;br&gt;
Brasileirão live scores API&lt;br&gt;
Eredivisie live scores API&lt;br&gt;
La Liga API&lt;br&gt;
What it isn't&lt;br&gt;
It's not the cheapest or the biggest. API-Football and Sportmonks cover many more sports and leagues. If you just need raw data, start there. I wrote a side-by-side with where they're stronger: &lt;a href="https://www.predictiqpro.com/api-football-alternative" rel="noopener noreferrer"&gt;https://www.predictiqpro.com/api-football-alternative&lt;/a&gt;&lt;br&gt;
Many projects use both: a broad data provider for fixtures and stats, and this API only for the probabilities and market analysis.&lt;br&gt;
Pricing, with no surprises&lt;br&gt;
No free-forever plan. There's a 14-day trial of the Developer plan. A card is required to start it, and nothing is charged until it ends. Paid plans start at $14 a month. There's a refund policy and you can cancel before the trial ends.&lt;br&gt;
Try it: &lt;a href="https://www.predictiqpro.com/register" rel="noopener noreferrer"&gt;https://www.predictiqpro.com/register&lt;/a&gt;. If something's missing for your use case, reply here and tell me.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>api</category>
      <category>showdev</category>
    </item>
    <item>
      <title>De-vigging bookmaker odds in Python: how I turned them into football probabilities (and why I stopped trusting my own model)" published: true</title>
      <dc:creator>kenn-kentonm</dc:creator>
      <pubDate>Wed, 21 Oct 2026 04:33:43 +0000</pubDate>
      <link>https://dev.to/kennkentonm/de-vigging-bookmaker-odds-in-python-how-i-turned-them-into-football-probabilities-and-why-i-41id</link>
      <guid>https://dev.to/kennkentonm/de-vigging-bookmaker-odds-in-python-how-i-turned-them-into-football-probabilities-and-why-i-41id</guid>
      <description>&lt;p&gt;"De-vigging bookmaker odds in Python: how I turned them into football probabilities (and why I stopped trusting my own model)"&lt;br&gt;
published: true&lt;br&gt;
description: "A short walk-through of removing the bookmaker margin, scoring probabilities with log loss, and what happened when my model went up against the market."&lt;br&gt;
tags: python, api, machinelearning, football&lt;br&gt;
---I built a football forecasting model. Then I tested it against the thing it was supposed to beat: the odds bookmakers publish. This post covers the three small pieces of code behind that test, and what I changed in my API afterwards.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Odds are not probabilities
Decimal odds of 2.10 / 3.40 / 3.60 for home, draw, away imply probabilities of 1/odds:
odds = {"home": 2.10, "draw": 3.40, "away": 3.60}
raw = {k: 1 / v for k, v in odds.items()}
print(sum(raw.values()))  # ~1.048
The sum is above 1. The extra ~4.8% is the bookmaker's margin (the "vig" or overround). To get probabilities you have to remove it.&lt;/li&gt;
&lt;li&gt;De-vigging
The simplest method is proportional normalisation:
def devig(odds: dict[str, float]) -&amp;gt; dict[str, float]:
raw = {k: 1 / v for k, v in odds.items()}
total = sum(raw.values())
return {k: v / total for k, v in raw.items()}
This assumes the margin is spread evenly across outcomes. It isn't exactly true, since bookmakers often shade the favourite or the longshot, and there are more careful methods (Shin's, the power method). Proportional is a fine baseline, and it's what I use.
One bookmaker is noisy, so I average the de-vigged probabilities across many bookmakers:
def consensus(books: list[dict[str, float]]) -&amp;gt; dict[str, float]:
devigged = [devig(b) for b in books]
return {k: sum(d[k] for d in devigged) / len(devigged) for k in devigged[0]}
Average the probabilities, not the odds. Averaging odds doesn't preserve the sum to 1.&lt;/li&gt;
&lt;li&gt;Scoring: log loss
To compare two sets of forecasts you need a proper scoring rule. Log loss is the standard one:
import math&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;def log_loss(probs: list[dict[str, float]], results: list[str]) -&amp;gt; float:&lt;br&gt;
    return -sum(math.log(p[r]) for p, r in zip(probs, results)) / len(results)&lt;br&gt;
Lower is better. It punishes confident wrong answers heavily, which is what you want. Accuracy ("did the favourite win?") hides that, because a forecast of 51% and one of 95% count the same when they're right.&lt;br&gt;
Use only matches that have finished, and only forecasts saved before kickoff. Otherwise you're scoring hindsight.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The result
My stack was CatBoost, LightGBM and a Poisson goals model with a Dixon-Coles adjustment, blended and calibrated. On finished matches I scored it against the bookmaker consensus above.
I also tried recalibrating the market probabilities and blending them with my model. The recalibration improved log loss by +0.0000, with a confidence interval of about ±0.005. The best blend weight for my model was 0. On matches with odds, my model told me nothing the market hadn't already priced in.
So I stopped dressing it up.&lt;/li&gt;
&lt;li&gt;What the API does now
Where bookmaker odds exist, the probabilities returned are the de-vigged consensus. Where they don't, they come from the model. Every response says which:
basis:            "market_consensus" | "statistical_model"
prob_home/draw/away:        the probabilities served
model_prob_home/draw/away:  the model's own numbers, for comparison
The point of the basis field is that you never have to guess. If you build on this, you can filter, compare, or ignore either source.
curl &lt;a href="https://api.predictiqpro.com/predictions/live" rel="noopener noreferrer"&gt;https://api.predictiqpro.com/predictions/live&lt;/a&gt; \
-H "Authorization: Token YOUR_API_KEY"
[PASTE A REAL, TRIMMED RESPONSE FROM YOUR API HERE — fixture, basis, prob_&lt;em&gt;, model_prob_&lt;/em&gt;]
There are also endpoints for odds (/odds/{fixture_id}), odds history (/odds/history/{fixture_id}) and market analysis (/market-analysis/{fixture_id}). Scope is football only, and the odds cover the 1X2 market only.&lt;/li&gt;
&lt;li&gt;Try it
The Developer plan has a 14-day trial with no card needed. Docs are at predictiqpro.com/docs. There's also an MCP server if you want an AI agent to call it: predictiqpro.com/mcp. The method is written up on the methodology page, and the scores are on the accuracy page.
If you spot a flaw in the de-vigging or scoring above, tell me in the comments. I'd rather fix it than defend it.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I tested my football model against the bookmaker consensus. The consensus won, so I shipped that.https://www.predictiqpro.com/football-odds-api</title>
      <dc:creator>kenn-kentonm</dc:creator>
      <pubDate>Wed, 21 Oct 2026 04:18:53 +0000</pubDate>
      <link>https://dev.to/kennkentonm/i-tested-my-football-model-against-the-bookmaker-consensus-the-consensus-won-so-i-shipped-41p2</link>
      <guid>https://dev.to/kennkentonm/i-tested-my-football-model-against-the-bookmaker-consensus-the-consensus-won-so-i-shipped-41p2</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.predictiqpro.com/football-odds-api" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;predictiqpro.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>https://www.predictiqpro.com/guides/football-fixtures-api-javascript</title>
      <dc:creator>kenn-kentonm</dc:creator>
      <pubDate>Tue, 13 Oct 2026 22:08:12 +0000</pubDate>
      <link>https://dev.to/kennkentonm/httpswwwpredictiqprocomguidesfootball-fixtures-api-javascript-n97</link>
      <guid>https://dev.to/kennkentonm/httpswwwpredictiqprocomguidesfootball-fixtures-api-javascript-n97</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.predictiqpro.com/guides/football-fixtures-api-javascript" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;predictiqpro.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>I Built PredictIQ Pro to Make Football Analytics More Data Driven
Suggested tags: #football #machinelearning #api #opensource
When I started building PredictIQ Pro, I wanted to explore a question that has interested me for a long time.
How can we use data</title>
      <dc:creator>kenn-kentonm</dc:creator>
      <pubDate>Tue, 13 Oct 2026 22:07:07 +0000</pubDate>
      <link>https://dev.to/kennkentonm/i-built-predictiq-pro-to-make-football-analytics-more-data-driven-suggested-tags-football-1e46</link>
      <guid>https://dev.to/kennkentonm/i-built-predictiq-pro-to-make-football-analytics-more-data-driven-suggested-tags-football-1e46</guid>
      <description></description>
    </item>
    <item>
      <title>What It Takes to Build a Football API (Beyond Just Returning JSON)</title>
      <dc:creator>kenn-kentonm</dc:creator>
      <pubDate>Sat, 01 Aug 2026 22:07:40 +0000</pubDate>
      <link>https://dev.to/kennkentonm/what-it-takes-to-build-a-football-api-beyond-just-returning-json-3cae</link>
      <guid>https://dev.to/kennkentonm/what-it-takes-to-build-a-football-api-beyond-just-returning-json-3cae</guid>
      <description>&lt;p&gt;When developers think about a football API, it's easy to imagine an endpoint that returns fixtures or match results.&lt;/p&gt;

&lt;p&gt;GET /matches&lt;/p&gt;

&lt;p&gt;But building a production-ready sports API is much more complicated.&lt;/p&gt;

&lt;p&gt;Over the past few months, I've been building PredictIQ Pro, a football data and prediction platform. Along the way, I've learned that the hardest problems aren't writing API endpoints—they're designing systems that remain fast, reliable, and scalable.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Never Stops Changing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Football data is constantly updated.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fixtures change.&lt;/li&gt;
&lt;li&gt;Kickoff times are rescheduled.&lt;/li&gt;
&lt;li&gt;Lineups are announced minutes before matches.&lt;/li&gt;
&lt;li&gt;Statistics are updated every few seconds.&lt;/li&gt;
&lt;li&gt;Odds move continuously.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good API isn't just a database—it needs a reliable data pipeline.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database Design Matters&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One of the biggest lessons I learned is that database structure affects everything.&lt;/p&gt;

&lt;p&gt;Instead of storing everything in one table, I separated data into entities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Competitions&lt;/li&gt;
&lt;li&gt;Seasons&lt;/li&gt;
&lt;li&gt;Teams&lt;/li&gt;
&lt;li&gt;Players&lt;/li&gt;
&lt;li&gt;Fixtures&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;Standings&lt;/li&gt;
&lt;li&gt;Statistics&lt;/li&gt;
&lt;li&gt;Predictions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes querying faster and scaling much easier.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Speed Is a Feature&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Developers expect APIs to respond quickly.&lt;/p&gt;

&lt;p&gt;That means thinking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;Database indexes&lt;/li&gt;
&lt;li&gt;Compression&lt;/li&gt;
&lt;li&gt;Pagination&lt;/li&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;li&gt;Efficient queries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A slow API is frustrating regardless of how much data it offers.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Real-Time Data Is a Different Challenge&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;REST APIs work well for historical data.&lt;/p&gt;

&lt;p&gt;Live football is different.&lt;/p&gt;

&lt;p&gt;For live scores and match events, WebSockets become much more suitable because clients receive updates instantly instead of polling every few seconds.&lt;/p&gt;

&lt;p&gt;Designing that infrastructure has been one of the most interesting engineering problems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Documentation Is Part of the Product&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I've realized that developers judge an API before they write a single line of code.&lt;/p&gt;

&lt;p&gt;Good documentation should include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication examples&lt;/li&gt;
&lt;li&gt;Error responses&lt;/li&gt;
&lt;li&gt;SDK examples&lt;/li&gt;
&lt;li&gt;Rate limits&lt;/li&gt;
&lt;li&gt;Endpoint descriptions&lt;/li&gt;
&lt;li&gt;Sample requests and responses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The easier it is to integrate, the more likely developers are to keep using it.&lt;/p&gt;

&lt;p&gt;What's Next?&lt;/p&gt;

&lt;p&gt;My roadmap includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time WebSocket feeds&lt;/li&gt;
&lt;li&gt;More prediction markets&lt;/li&gt;
&lt;li&gt;Better caching&lt;/li&gt;
&lt;li&gt;Self-hosted PostgreSQL infrastructure&lt;/li&gt;
&lt;li&gt;Improved monitoring and analytics&lt;/li&gt;
&lt;li&gt;Public SDKs for JavaScript and Python&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building an API has taught me that software engineering isn't just about writing code—it's about designing systems that other developers can trust.&lt;/p&gt;

&lt;p&gt;I'm curious to hear from other backend engineers.&lt;/p&gt;

&lt;p&gt;If you've built an API before, what was the hardest problem you had to solve?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>python</category>
    </item>
  </channel>
</rss>
