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:

https://soccer.sportmonks.com/api/v2.0/markets?api_token={API_TOKEN}

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:

https://soccer.sportmonks.com/api/v2.0/fixtures/date/{YYYY-MM-DD}?api_token={API_TOKEN}&include=oddComparison&markets={Market_IDs}&bookmakers={Bookmaker_IDs}

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:

https://soccer.sportmonks.com/api/v2.0/fixtures/date/{YYYY-MM-DD}?api_token={API_TOKEN}&include=oddComparison&markets=1,12,28&bookmakers=2,15,97

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.

"oddComparison": {
                "data": [
                {
                        "bookmaker_id": 97,
                        "bookmaker_event_id": "1007404195",
                        "market_id": 1,
                        "suspended": false,
                        "odds": [
                            {
                                "value": "1.98",
                                "dp3": "1.980",
                                "us": "-102",
                                "id": "566582618211523",
                                "handicap": null,
                                "total": null,
                                "label": "1",
                                "probability": "50.51%",
                                "american": -103,
                                "factional": null,
                                "winning": false,
                                "stop": false,
                                "last_update": {
                                    "date": "2021-04-07 01:59:35.100809",
                                    "timezone_type": 3,
                                    "timezone": "UTC"
                                }
                            },
                            {
                                "value": "3.70",
                                "dp3": "3.700",
                                "us": "270",
                                "id": "566582618231524",
                                "handicap": null,
                                "total": null,
                                "label": "2",
                                "probability": "27.03%",
                                "american": 270,
                                "factional": null,
                                "winning": true,
                                "stop": false,
                                "last_update": {
                                    "date": "2021-04-07 01:59:35.100822",
                                    "timezone_type": 3,
                                    "timezone": "UTC"
                                }
                            },
                            {
                                "value": "3.40",
                                "dp3": "3.400",
                                "us": "240",
                                "id": "566582618221525",
                                "handicap": null,
                                "total": null,
                                "label": "X",
                                "probability": "29.41%",
                                "american": 240,
                                "factional": null,
                                "winning": false,
                                "stop": false,
                                "last_update": {
                                    "date": "2021-04-07 01:59:35.100831",
                                    "timezone_type": 3,
                                    "timezone": "UTC"
                                }
                            }
                        ]
                    },
                    {
                        "bookmaker_id": 15,
                        "bookmaker_event_id": "30392412",
                        "market_id": 1,
                        "suspended": false,
                        "odds": [
                            {
                                "value": "2.06",
                                "dp3": "2.060",
                                "us": "106",
                                "id": "566582612111523",
                                "handicap": null,
                                "total": null,
                                "label": "1",
                                "probability": "48.54%",
                                "american": 106,
                                "factional": null,
                                "winning": false,
                                "stop": false,
                                "last_update": {
                                    "date": "2021-04-07 01:59:35.084430",
                                    "timezone_type": 3,
                                    "timezone": "UTC"
                                }
                            },
                            {
                                "value": "4.00",
                                "dp3": "4.000",
                                "us": "300",
                                "id": "566582612131524",
                                "handicap": null,
                                "total": null,
                                "label": "2",
                                "probability": "25%",
                                "american": 300,
                                "factional": null,
                                "winning": true,
                                "stop": false,
                                "last_update": {
                                    "date": "2021-04-07 01:59:35.084452",
                                    "timezone_type": 3,
                                    "timezone": "UTC"
                                }
                            },
                            {
                                "value": "3.65",
                                "dp3": "3.650",
                                "us": "265",
                                "id": "566582612121525",
                                "handicap": null,
                                "total": null,
                                "label": "X",
                                "probability": "27.4%",
                                "american": 265,
                                "factional": null,
                                "winning": false,
                                "stop": false,
                                "last_update": {
                                    "date": "2021-04-07 01:59:35.084466",
                                    "timezone_type": 3,
                                    "timezone": "UTC"
                                }
                            }
                        ]
                    },

Last updated