Chapter 5: Integrating Odds Data
It’s time to add a feather to your cap! In this chapter, we will take a look at how to retrieve odds data from Sportmonks API using GO. This will be the final exercise in this blog, but not to worry, we’ve got several other how-tos on easily retrieving data from our API.
5.1 Fetching Odds for Upcoming Matches
We’ll implement functions in GO to retrieve odds data for upcoming matches in the Premier League. Just like we did in Chapter 4, these functions will send GET requests to the appropriate endpoint and parse the JSON responses to display odds information, alongside others.
Here is the query that retrieves odds data.
https://api.sportmonks.com/v3/football/fixtures/18854206?api_token=YOUR_API_KEY&include=odds&filters=bookmakers:2;markets:1
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
)
// Define structs to match the expected JSON response from the API
type Participant struct {
Id int `json:"id"`
SportId int `json:"sport_id"`
CountryId int `json:"country_id"`
VenueId int `json:"venue_id"`
Gender string `json:"gender"`
Name string `json:"name"`
ShortCode string `json:"short_code"`
ImagePath string `json:"image_path"`
Founded int `json:"founded"`
Type string `json:"type"`
Placeholder bool `json:"placeholder"`
LastPlayedAt string `json:"last_played_at"`
}
type Odds struct {
Id int64 `json:"id"`
FixtureId int `json:"fixture_id"`
MarketId int `json:"market_id"`
BookmakerId int `json:"bookmaker_id"`
Label string `json:"label"`
Value string `json:"value"`
Name string `json:"name"`
SortOrder int `json:"sort_order"`
MarketDescription string `json:"market_description"`
Probability string `json:"probability"`
Dp3 string `json:"dp3"`
Fractional string `json:"fractional"`
American string `json:"american"`
Winning bool `json:"winning"`
Stopped bool `json:"stopped"`
Total string `json:"total"`
Handicap string `json:"handicap"`
Participants string `json:"participants"`
CreatedAt string `json:"created_at"`
OriginalLabel string `json:"original_label"`
LatestBookmakerUpdate string `json:"latest_bookmaker_update"`
}
type Fixture struct {
Id int `json:"id"`
SportId int `json:"sport_id"`
LeagueId int `json:"league_id"`
SeasonId int `json:"season_id"`
StageId int `json:"stage_id"`
GroupId int `json:"group_id"`
AggregateId int `json:"aggregate_id"`
RoundId int `json:"round_id"`
StateId int `json:"state_id"`
VenueId int `json:"venue_id"`
Name string `json:"name"`
StartingAt string `json:"starting_at"`
ResultInfo string `json:"result_info"`
Leg string `json:"leg"`
Details string `json:"details"`
Length int `json:"length"`
Placeholder bool `json:"placeholder"`
HasOdds bool `json:"has_odds"`
HasPremiumOdds bool `json:"has_premium_odds"`
StartingAtTimestamp int `json:"starting_at_timestamp"`
Participants []Participant `json:"participants"`
Odds []Odds `json:"odds"`
}
type ApiResponse struct {
Data []Fixture `json:"data"`
}
func main() {
// URL to send the GET request to
url := "https://api.sportmonks.com/v3/football/fixtures/between/2024-08-30/2024-09-03?api_token=YOUR_TOKEN&filters=fixtureLeagues:8;bookmakers:2;markets:1&include=participants;odds"
// Create a new HTTP request
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Printf("Failed to create request: %s\n", err)
return
}
// Set custom headers if needed
req.Header.Set("User-Agent", "Go-http-client/1.1")
req.Header.Set("Accept", "application/json")
// Use the default HTTP client to send the request
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Printf("Failed to make request: %s\n", err)
return
}
// Ensure resp is not nil before deferring resp.Body.Close()
if resp != nil {
defer resp.Body.Close()
}
// Check the HTTP response status
if resp.StatusCode != http.StatusOK {
fmt.Printf("Unexpected status code: %d\n", resp.StatusCode)
return
}
// Read the response body
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Printf("Failed to read response body: %s\n", err)
return
}
// Parse the JSON response into the ApiResponse struct
var apiResponse ApiResponse
err = json.Unmarshal(body, &apiResponse)
if err != nil {
fmt.Printf("Failed to parse JSON response: %s\n", err)
return
}
fmt.Print("Odds:\n")
for _, Fixture := range apiResponse.Data {
fmt.Printf("Id: %d\n", Fixture.Id)
fmt.Printf("SportId: %d\n", Fixture.SportId)
fmt.Printf("LeagueId: %d\n", Fixture.LeagueId)
fmt.Printf("SeasonId: %d\n", Fixture.SeasonId)
fmt.Printf("StageId: %d\n", Fixture.StageId)
fmt.Printf("GroupId: %d\n", Fixture.GroupId)
fmt.Printf("AggregateId: %d\n", Fixture.AggregateId)
fmt.Printf("RoundId: %d\n", Fixture.RoundId)
fmt.Printf("StateId: %d\n", Fixture.StateId)
fmt.Printf("VenueId: %d\n", Fixture.VenueId)
fmt.Printf("Name: %s\n", Fixture.Name)
fmt.Printf("StartingAt: %s\n", Fixture.StartingAt)
fmt.Printf("ResultInfo: %s\n", Fixture.ResultInfo)
fmt.Printf("Leg: %s\n", Fixture.Leg)
fmt.Printf("Details: %s\n", Fixture.Details)
fmt.Printf("Length: %d\n", Fixture.Length)
fmt.Printf("Placeholder: %t\n", Fixture.Placeholder)
fmt.Printf("HasOdds: %t\n", Fixture.HasOdds)
fmt.Printf("HasPremiumOdds: %t\n", Fixture.HasPremiumOdds)
fmt.Printf("StartingAtTimestamp: %d\n", Fixture.StartingAtTimestamp)
fmt.Printf("---\n")
for _, Odd := range Fixture.Odds {
fmt.Printf(" Id: %d\n", Odd.Id)
fmt.Printf(" FixtureId: %d\n", Odd.FixtureId)
fmt.Printf(" MarketId: %d\n", Odd.MarketId)
fmt.Printf(" BookmakerId: %d\n", Odd.BookmakerId)
fmt.Printf(" Label: %s\n", Odd.Label)
fmt.Printf(" Value: %s\n", Odd.Value)
fmt.Printf(" Name: %s\n", Odd.Name)
fmt.Printf(" SortOrder: %d\n", Odd.SortOrder)
fmt.Printf(" MarketDescription: %s\n", Odd.MarketDescription)
fmt.Printf(" Probability: %s\n", Odd.Probability)
fmt.Printf(" Dp3: %s\n", Odd.Dp3)
fmt.Printf(" Fractional: %s\n", Odd.Fractional)
fmt.Printf(" American: %s\n", Odd.American)
fmt.Printf(" Winning: %t\n", Odd.Winning)
fmt.Printf(" Stopped: %t\n", Odd.Stopped)
fmt.Printf(" Total: %s\n", Odd.Total)
fmt.Printf(" Handicap: %s\n", Odd.Handicap)
fmt.Printf(" Participants: %s\n", Odd.Participants)
fmt.Printf(" CreatedAt: %s\n", Odd.CreatedAt)
fmt.Printf(" OriginalLabel: %s\n", Odd.OriginalLabel)
fmt.Printf(" LatestBookmakerUpdate: %s\n", Odd.LatestBookmakerUpdate)
fmt.Printf(" ---\n")
}
}
}
Odds:
Id: 19134473
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 204
Name: Arsenal vs Brighton & Hove Albion
StartingAt: 2024-08-31 11:30:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725103800
---
Id: 121282396080
FixtureId: 19134473
MarketId: 1
BookmakerId: 2
Label: Away
Value: 7.00
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 14.29%
Dp3: 7.000
Fractional: 7
American: 600
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:36.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:04:01
---
Id: 121282396079
FixtureId: 19134473
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 5.75
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 17.39%
Dp3: 5.750
Fractional: 23/4
American: 475
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:36.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:04:01
---
Id: 121282396077
FixtureId: 19134473
MarketId: 1
BookmakerId: 2
Label: Home
Value: 1.33
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 75.02%
Dp3: 1.333
Fractional: 4/3
American: -301
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:36.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:04:01
---
Id: 19134474
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 338817
Name: Brentford vs Southampton
StartingAt: 2024-08-31 14:00:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725112800
---
Id: 121282498530
FixtureId: 19134474
MarketId: 1
BookmakerId: 2
Label: Away
Value: 4.50
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 22.22%
Dp3: 4.500
Fractional: 9/2
American: 350
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:04:36
---
Id: 121282498527
FixtureId: 19134474
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 4.00
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 25%
Dp3: 4.000
Fractional: 4
American: 300
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:04:36
---
Id: 121282498525
FixtureId: 19134474
MarketId: 1
BookmakerId: 2
Label: Home
Value: 1.72
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 57.9%
Dp3: 1.727
Fractional: 19/11
American: -138
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:04:36
---
Id: 19134476
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 12
Name: Everton vs AFC Bournemouth
StartingAt: 2024-08-31 14:00:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725112800
---
Id: 121282497676
FixtureId: 19134476
MarketId: 1
BookmakerId: 2
Label: Away
Value: 2.55
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 39.22%
Dp3: 2.550
Fractional: 51/20
American: 154
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:04:20
---
Id: 121282497675
FixtureId: 19134476
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 3.40
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 29.41%
Dp3: 3.400
Fractional: 17/5
American: 240
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:04:20
---
Id: 121282497674
FixtureId: 19134476
MarketId: 1
BookmakerId: 2
Label: Home
Value: 2.75
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 36.36%
Dp3: 2.750
Fractional: 11/4
American: 175
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:04:20
---
Id: 19134477
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 504
Name: Ipswich Town vs Fulham
StartingAt: 2024-08-31 14:00:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725112800
---
Id: 121282498087
FixtureId: 19134477
MarketId: 1
BookmakerId: 2
Label: Away
Value: 2.25
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 44.44%
Dp3: 2.250
Fractional: 9/4
American: 125
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:04:28
---
Id: 121282498086
FixtureId: 19134477
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 3.50
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 28.57%
Dp3: 3.500
Fractional: 7/2
American: 250
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:04:28
---
Id: 121282498084
FixtureId: 19134477
MarketId: 1
BookmakerId: 2
Label: Home
Value: 3.10
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 32.26%
Dp3: 3.100
Fractional: 31/10
American: 210
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:04:28
---
Id: 19134478
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 117
Name: Leicester City vs Aston Villa
StartingAt: 2024-08-31 14:00:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725112800
---
Id: 121282498876
FixtureId: 19134478
MarketId: 1
BookmakerId: 2
Label: Away
Value: 1.72
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 57.9%
Dp3: 1.727
Fractional: 19/11
American: -138
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:04:20
---
Id: 121282498875
FixtureId: 19134478
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 3.90
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 25.64%
Dp3: 3.900
Fractional: 39/10
American: 290
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:04:20
---
Id: 121282498874
FixtureId: 19134478
MarketId: 1
BookmakerId: 2
Label: Home
Value: 4.50
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 22.22%
Dp3: 4.500
Fractional: 9/2
American: 350
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:04:20
---
Id: 19134481
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 542
Name: Nottingham Forest vs Wolverhampton Wanderers
StartingAt: 2024-08-31 14:00:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725112800
---
Id: 121282497262
FixtureId: 19134481
MarketId: 1
BookmakerId: 2
Label: Away
Value: 3.60
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 27.78%
Dp3: 3.600
Fractional: 18/5
American: 260
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:04:36
---
Id: 121282497261
FixtureId: 19134481
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 3.70
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 27.03%
Dp3: 3.700
Fractional: 37/10
American: 270
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:04:36
---
Id: 121282497260
FixtureId: 19134481
MarketId: 1
BookmakerId: 2
Label: Home
Value: 2.00
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 50%
Dp3: 2.000
Fractional: 2
American: 100
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:04:36
---
Id: 19134482
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 214
Name: West Ham United vs Manchester City
StartingAt: 2024-08-31 16:30:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725121800
---
Id: 121282394284
FixtureId: 19134482
MarketId: 1
BookmakerId: 2
Label: Away
Value: 1.40
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 71.43%
Dp3: 1.400
Fractional: 7/5
American: -251
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:35.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:05:03
---
Id: 121282394282
FixtureId: 19134482
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 5.50
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 18.18%
Dp3: 5.500
Fractional: 11/2
American: 450
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:35.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:05:03
---
Id: 121282394281
FixtureId: 19134482
MarketId: 1
BookmakerId: 2
Label: Home
Value: 7.00
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 14.29%
Dp3: 7.000
Fractional: 7
American: 600
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:35.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:05:03
---
Id: 19134475
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 321614
Name: Chelsea vs Crystal Palace
StartingAt: 2024-09-01 12:30:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725193800
---
Id: 121282498567
FixtureId: 19134475
MarketId: 1
BookmakerId: 2
Label: Away
Value: 5.00
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 20%
Dp3: 5.000
Fractional: 5
American: 400
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:06:06
---
Id: 121282498566
FixtureId: 19134475
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 4.33
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 23.08%
Dp3: 4.333
Fractional: 13/3
American: 333
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:06:06
---
Id: 121282498565
FixtureId: 19134475
MarketId: 1
BookmakerId: 2
Label: Home
Value: 1.60
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 62.5%
Dp3: 1.600
Fractional: 8/5
American: -167
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:06:06
---
Id: 19134480
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 449
Name: Newcastle United vs Tottenham Hotspur
StartingAt: 2024-09-01 12:30:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725193800
---
Id: 121282499561
FixtureId: 19134480
MarketId: 1
BookmakerId: 2
Label: Away
Value: 2.50
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 40%
Dp3: 2.500
Fractional: 5/2
American: 150
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:06:07
---
Id: 121282499560
FixtureId: 19134480
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 4.00
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 25%
Dp3: 4.000
Fractional: 4
American: 300
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:06:07
---
Id: 121282499559
FixtureId: 19134480
MarketId: 1
BookmakerId: 2
Label: Home
Value: 2.50
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 40%
Dp3: 2.500
Fractional: 5/2
American: 150
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:43:10.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:06:07
---
Id: 19134479
SportId: 1
LeagueId: 8
SeasonId: 23614
StageId: 77471288
GroupId: 0
AggregateId: 0
RoundId: 339237
StateId: 1
VenueId: 206
Name: Manchester United vs Liverpool
StartingAt: 2024-09-01 15:00:00
ResultInfo:
Leg: 1/1
Details:
Length: 90
Placeholder: false
HasOdds: true
HasPremiumOdds: true
StartingAtTimestamp: 1725202800
---
Id: 121282408579
FixtureId: 19134479
MarketId: 1
BookmakerId: 2
Label: Away
Value: 1.85
Name:
SortOrder: 2
MarketDescription: Full Time Result
Probability: 54.05%
Dp3: 1.850
Fractional: 37/20
American: -118
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:39.000000Z
OriginalLabel: 2
LatestBookmakerUpdate: 2024-08-30 09:06:27
---
Id: 121282408578
FixtureId: 19134479
MarketId: 1
BookmakerId: 2
Label: Draw
Value: 4.20
Name:
SortOrder: 1
MarketDescription: Full Time Result
Probability: 23.81%
Dp3: 4.200
Fractional: 21/5
American: 320
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:39.000000Z
OriginalLabel: Draw
LatestBookmakerUpdate: 2024-08-30 09:06:27
---
Id: 121282408576
FixtureId: 19134479
MarketId: 1
BookmakerId: 2
Label: Home
Value: 3.70
Name:
SortOrder: 0
MarketDescription: Full Time Result
Probability: 27.03%
Dp3: 3.700
Fractional: 37/10
American: 270
Winning: false
Stopped: false
Total:
Handicap:
Participants:
CreatedAt: 2024-08-22T11:42:39.000000Z
OriginalLabel: 1
LatestBookmakerUpdate: 2024-08-30 09:06:27
---
Here’s the wrap: Unlocking the Power of Sportmonks’ Football API with GO
Now that you’ve gone from zero to hero in just a bit while using GO, you can see how easy it is to retrieve data from Sportmonks API. As a summary, let’s go over all we did together.
This developer’s guide covers essential topics such as installing GO, making basic API requests, retrieving league and match data, and incorporating odds information into your applications. We looked at Sportmonks Football API structure and its features while using the HTTP package with GET to retrieve basic information from the web API and the JSON package for handling data for football leagues, match data, and odds.
Those are just a few of the comprehensive set of endpoints that our Football API provides, not to mention news, xG, in-play events, live scores, and many more. Due to its robustness and flexibility, you too can build a mind-blowing football app using the API without breaking the bank.
While these few code snippets can get you up and running in little to no time, GO’s simplicity, readability, and extensive library support enables it as a preferred language of choice among many. GO’s extensive documentation also makes it accessible to users of all skill levels, whether you’re a rookie or programming rock star. Whether you are a sports analyst, journalist, hobbyist, or professional, you too can build the future of sports.
What are you waiting for? Sign up for your free trial now.