How-to build a betting odds portal
Welcome to the how-to guide about building a betting odds portal.
We define a betting odds portal, as a website that is host to various bookmakers being actively compared to each other per market.
Note, that we will not take live odds into account.
Step 1: Gather the tools
You are going to need the following tools:
Sportmonks API token
Code editor (Visual studio used in examples)
Postman (optional)
You can find a link to another article where we discuss the tools in-depth on our Developer Tools Guide.
Step 2: Decide which bookmakers and markets you want
Do you want to show every single bookmaker or just a few popular ones? The choice is yours. In this guide, we’ll focus on pre-match odds. If you’re interested in live odds, please refer to our how-to build a match page with odds guide. There are lots of different markets to choose from. You can request all the markets yourself via our all markets endpoint. We've listed a few popular ones below:
3-way results (market id: 1)
Asian Handicap (market id: 28)
Over/Under (market id: 12)
Draw no bet (market id: 28082)
The most important part of the odds portal is to compare the bookmakers. You can request all the bookmakers yourself via our all bookmakers endpoint. We've listed a few popular ones below:
bet365 (bookmaker id: 2)
1xBet (bookmaker id: 25679340)
Betfair (bookmaker id: 15)
Betway (bookmaker id: 271057011)
Unibet (bookmaker id: 97)
We at Sportmonks offer you a large number of markets and bookmakers. If it exists, we offer it!
To see the full list of all the bookmakers and markets we offer, you can simply make API requests with the following endpoints:
Step 3: Choose the correct endpoint
In our how-to build a match page with odds guide, we worked with flatOdds
and inplayOdds
as includes. For this how-to guide, we’ll be working with the include called oddComparison
(better for comparison) and the endpoint fixtures by date:
This request will return all the fixtures of a certain date with the odds. It’s also possible to filter on the markets and bookmakers you wish to see.
Step 4: Make your request
Ultimately, it’s up to you which bookmakers and markets you want to request. But for now, we’ll go with the following request:
We have included the following bookmakers: bet365, Betfair, and Unibet and the following markets: 3-way result, over/under, and Asian handicap.
Step 5: The API response
Below we can see the odds of a fixture for the market 3-way result. We can see the bookmakers and their respective odds for a 3-way result. The same data is displayed for the over/under market.
Last updated