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 here.

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:

Request markets
Request bookmakers
Request markets
https://soccer.sportmonks.com/api/v2.0/markets?api_token={API_TOKEN}
Request bookmakers
https://soccer.sportmonks.com/api/v2.0/bookmakers?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.

Response 3-way result
Response Over/Under
Response Asian Handicap
Response 3-way result
"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"
}
}
]
},
Response Over/Under
"oddComparison": {
"data": [
{
"bookmaker_id": 36,
"bookmaker_event_id": "11317959",
"market_id": 12,
"suspended": false,
"odds": [
{
"value": "2.60",
"dp3": "2.600",
"us": "160",
"id": "5665826522611523",
"handicap": null,
"total": null,
"label": "1",
"probability": "38.46%",
"american": 160,
"factional": null,
"winning": false,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.193800",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"value": "4.20",
"dp3": "4.200",
"us": "320",
"id": "5665826522631524",
"handicap": null,
"total": null,
"label": "2",
"probability": "23.81%",
"american": 320,
"factional": null,
"winning": false,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.193812",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"value": "2.13",
"dp3": "2.130",
"us": "113",
"id": "5665826522621525",
"handicap": null,
"total": null,
"label": "X",
"probability": "46.95%",
"american": 112,
"factional": null,
"winning": false,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.193821",
"timezone_type": 3,
"timezone": "UTC"
}
}
]
},
Response Asian Handicap
"oddComparison": {
"data": [
{
"bookmaker_id": 15,
"bookmaker_event_id": "30392412",
"market_id": 28,
"suspended": false,
"odds": [
{
"handicap": null,
"value": "2.41",
"dp3": "2.410",
"us": "141",
"id": "566582642111528",
"total": null,
"label": "1",
"probability": "41.49%",
"american": 141,
"factional": null,
"winning": false,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.160122",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"handicap": null,
"value": "8.68",
"dp3": "8.680",
"us": "768",
"id": "566582642121549",
"total": null,
"label": "2",
"probability": "11.52%",
"american": 768,
"factional": null,
"winning": true,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.160354",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"handicap": null,
"value": "2.27",
"dp3": "2.270",
"us": "127",
"id": "566582642121539",
"total": null,
"label": "2",
"probability": "44.05%",
"american": 127,
"factional": null,
"winning": true,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.160301",
"timezone_type": 3,
"timezone": "UTC"
}
},
{
"handicap": null,
"value": "1.41",
"dp3": "1.410",
"us": "-244",
"id": "566582642111540",
"total": null,
"label": "1",
"probability": "70.92%",
"american": -244,
"factional": null,
"winning": false,
"stop": false,
"last_update": {
"date": "2021-04-07 01:59:35.160308",
"timezone_type": 3,
"timezone": "UTC"
}
},