Odds are one of our API's most used features. With this data feature, you can build an odds portal and a match page with odds. We offer various ways of requesting odds.
The possibilities are:
But first, let's explain what bookmakers and markets are.
A bookmaker is a betting company that gives you the option to bet on a match’s particular outcome. The market is the type of betting system itself. There are various markets, but the most well-known one is the 3-way result (home team wins, draw, visitor team wins).
We at SportMonks offer you a large number of markets and bookmakers for you to choose from.
You can request all the bookmakers' ids via our bookmakers endpoint. This endpoint is very useful for administrative purposes to check and structure the bookmakers’ availability.
Besides that, you can request all the market ids via our markets endpoint. The markets endpoint will help you set up the Odds properly on your website or application. This endpoint is very useful for administrative purposes to check and structure market availability.
Here's an overview of all the different odds we will discuss:
Live odds: these are the odds for live games. We only offer bet365 and all their markets for live odds. Please note that you can only use the live odds when the fixture is in-play.
Pre-match odds: these are odds before a fixture. You can best use this if you want to show the odds before a match starts.
FlatOdds: this is used as an include on our livescores/fixtures endpoint. It allows you to filter on a specific bookmaker and/or market id.
OddComparison: the benefit of the oddComparison include is that it contains more bookmakers, making this the best option if you want to make a comparison application between all the bookmakers and the odds they offer.
You can also use odds
as an include on the fixture endpoints or livescores endpoints. When you do this, you’re able to filter on multiple bookmakers and markets because the fixture endpoint has those parameters.
Therefore, if you want to request odds from various bookmakers or markets, we suggest using flatOdds
as an include.
For example, the 3-way result market (#1) from bet365 (#2) of all the fixtures played on 2020-08-02
Last but not least, you can also use oddComparison
as an include. The main difference between flatOdds
and oddComparison
is that flatOdds
are updated more frequently.
The benefit of the oddComparison
include is that it contains more bookmakers. Therefore this is the best option if you want to make a comparison application between all the bookmakers and the odds they offer.
In this last tutorial, we’re going to discuss our Prediction API. We offer the prediction API as a separate add-on. Meaning, you will need to have a plan with this add-on to have access to our prediction model. We’re going to discuss what you can do with the prediction API and how it works.
But first, what is included in our prediction API add-on? Our prediction API has three key models:
Prediction model (based on Bayesian principles)
Probabilities per match (domestic leagues only) - Winner predictions (home win, away win or draw) - BTTS (Both Teams To Score) prediction - Correct score predictions - Over/under probabilities
Leagues and performance (measuring the performance of probabilities)
Valuebet model*
Player contribution model**
* The valuebet model processes thousands and thousands of historical odds data and market trends in order to find value opportunities, which are then compared against bookmaker odds. ** Used to calculate probabilities of international cups. The last known line-up is used for the calculations of probabilities. As soon as the new line-up is known, the probability will also be re-calculated
All three models and algorithms are based on four key principles
Timely and substantive The prediction API is updated daily with the latest data from the SportMonks football database
Data controlled No human intervention is needed. The prediction API runs on statistical analysis results, based on the entire historical SportMonks Football Database
Precise probabilities The prediction API offers the most precise probabilities possible, thanks to our mathematical probability distribution models
Predictability performance
The success rate and quality of our prediction API are monitored by us, but you can also track our predictions’ performance yourself.
For a full overview of the technology behind our predictions, you can refer to our blog.
The prediction model makes predictions about the possible outcomes of fixtures, such as the probability that the home or away team wins, but also the probability of a draw.
The prediction model is created with the latest machine learning techniques and can thus offer you the best predictions possible
The prediction model offers various probabilities and we’re going to show you how to request them and how you should interpret them.
There are actually two options to request the fixture probability:
Let’s start with the first option.
This endpoint will give you all the detected fixtures’ probabilities. This will show all probabilities for every single fixture in your plan.
Probabilities are available 21 days before a game starts
This might seem like a lot of data at first, but it is quite straightforward actually. Let’s walk through the data together.
First thing we see is ‘BTTS’, which means Both Teams To Score. The probability that both teams will score a goal is roughly 55%. Next, we see: over 2.5 is roughly 51%, meaning that there’s a 51% chance that there will be over two and a half goals in the game. HT and AT under/over indicate the respective probabilities for the home and away teams. Finally, correct score is a bunch of probabilities for each possible score. So, a final score of 1-1 has a probability of 12.2%
Note that the prediction model updates its predictions daily. So, predictions can and will change from day to day.
The second option is to get probabilities by fixture id. The only difference is that instead of requesting all fixtures with their probabilities for the next 21 days, you now request one single fixture.
As you can see in our API reference guide, only fixture
is allowed as an include. However, as you’ve learned from our nested includes tutorial, you can enrich the include with a relationship. For example:
&include=fixture.localTeam,fixture.visitorTeam
Please note that you can also use the &include=probability
on one of our fixture endpoints or livescores endpoints
The Leagues & performances endpoint will give you information about which leagues are included in our prediction API and what the performance is per league.
Every league has a performance rating. This rating is continuously updated by our prediction API. The league predictability is a set of metrics that measures the quality and predictive power of the model. For more information about our model, please refer to our prediction blog.
You can request the performance of the leagues by using the following URL:
This will return predictions for all the leagues in your subscription. As well as the league’s performance.
For example:
What do we see exactly? The league predictability tells you about the prediction performance of that league. Let’s discuss this.
The league predictability consists of four elements.
Hit Ratio
Let's take a look at one example. We can see here that for the Danish Superliga (league id: 271), the ‘hit ratio’ is 0.48 for the 3-way result (1, X, 2) market. The hit ratio is the number of times the model predicted the particular market correctly the last 100 matches of the league. The closer to 1,00, the better it is. You can track and see the real-time predictability performance for all prediction markets per league.
Log Loss
This is the average log loss over the last 100 matches of the league. It measures the quality of the probabilities. The closer the number is to 0, the better it is. The quality is considered poor, medium, good or high based on the log loss.
Poor is < -1.07
Medium is > -1.07
Good is > -1.02
High is > -.98
Predictability
Not everybody is comfortable with numbers. The predictability is the same poor, medium, good, and high as from log loss. However, this will tell you straight away in words, whether the predictability of the league is good or bad.
Predictive power
This tells you whether the log loss has been increasing or not, in the last 50 matches. Possible outcomes are up, down, or unchanged. If the predictive power is up, then the league becomes more predictable.
The Value Bet model processes thousands of historical odds data and market trends to find the best value opportunities. In other words, it compares bookmakers odds with each other and then gives you the best value bookmaker.
Once the opening odds are available, the value detection algorithm runs every 10 minutes up to the beginning of the match. Each value detected by the model comes with a set of features described below.
bet
: 1 = home, x = draw, 2 = away
bookmaker
: The name of the bookmaker with the best odd
odd
: The odd provided by the bookmaker
is_value
: Indicates if the value bet is still available
stake
: The stake helps manage the risk that the model would take in the bet. The risk is measured with the volatility of the profit and loss of the value bet strategy. The stake is calculated to have an average risk of one unit.
fair_odd
: Our algorithm allows you to find the fair odd of a value. The fair odd is useful to play against bookmakers that are not listed in SportMonks. Any odd above the fair odd can be considered as value.
Please note that our algorithm detects Value Bets based on all available odds in combination with the fair odd calculated by the Value Bet algorithm. Therefore, not every match has a Value Bet available.
Just like with the probabilities, the value bet API has two options:
Get next value bets: This endpoint will give you all the value bets of the next fixtures.
Get value bet by fixture id: This endpoint will give you the value bets of one fixture
An example of a response:
Bet has the possible value of 1, X or 2. This represents the 3-Way Result market.
1 = home
X = draw
2 = away
The bookmaker’s name is bet365.
bet365 provides an odd of 19.
The stake assists in managing the risk that the model would take in the bet. The risk is measured with the volatility of the profit and loss of the Value Bet Strategy. The stake is calculated in order to have an average risk of one unit.
The fair odd is calculated with our algorithm. It’s the fair odd of a value. Any odd above the fair odd can be considered as value.
Please note that you can also use the&include=valuebet
on one of our fixture endpoints or livescores endpoints.
Next up is Sportmonks' ID Finder. The easiest tool to find all ID's you need.
We also have live odds available. It’s good to note that we have all the markets but only from bet365 for live odds. Live odds can only be requested when the fixture is in-play. There are no live odds available before and after the fixture.
You can use our inplay odds by fixture id endpoint to get live odds of one fixture. However, you can also use inplayOdds
as an include on one of our livescores endpoints.
In this tutorial, we’re going to discuss odds & predictions.
Odds are one of our football API's most used features. With this data feature, you can build an odds portal or a match page with odds. Let’s discuss the different ways of requesting odds.
We offer the prediction API as a separate add-on. Meaning, you will need to have a plan with this add-on to have access to our prediction model. We’re going to discuss what you can do with the prediction API and how it works. For more in-depth information about the prediction API please check out our how-to guide.
The odds by fixture and bookmaker id endpoint is recommended if you want to request the odds for one fixture and one bookmaker.
As you can see, you need to parse one fixture and one bookmaker id. The endpoint will return all the available markets of one bookmaker for one fixture. As mentioned previously, you can find the bookmakers ids via our bookmaker endpoint.
For example, the odds from bet365 (#2) for the fixture Juventus – Barcelona (17361236):
As you can see, it gives you all the markets from bet365. However, you can also request one market from all the bookmakers.
Let’s continue with this example. However, this time, you want to know the odds of the home, draw, away (3-way-result) market from all the bookmakers from the same fixture. You can use our odds by fixture and market id for this.
As you can see, you need to parse one fixture and one market id. The endpoint will return one market from all the available bookmakers for one fixture. You can find the market ids via our markets endpoint.
For example, the 3-way-result market (#1) for the fixture Juventus – Barcelona (17361236).
As you can see, the API returns all the odds of the requested market from different bookmakers. You can see Cloudbet and many more. This could be great if you want to compare all the bookmakers from one market.
Interested in the best odds for a market? We also offer a Value Bet model for this. More about the value bet can be found in our predictions tutorial.
Of course, it’s also possible to request all the odds markets from all the bookmakers. You can use our odds by fixture id endpoint for that:
Note that it’s not possible to filter on this endpoint. If you want to filter the odds, you should use the flatOdds include on one of our fixtures endpoints.