Leaderboard

This endpoint is a live websocket endpoint that returns all leaderboard information at any one time. Currently the whole leaderboard is sent whenever there is an update – this will look to be optimised in the future. You should receive a new update any time a player completes a hole, and their total strokes and “to par” score for the day changes.

The authentication token provided will be required to make a connection to this websocket endpoint.

Once you have the API token, any further data that you send over the connection will be ignored.

N.B – This endpoint sends heartbeats in-between data packets to let you know that it is still connected.

This endpoint currently takes no request parameters, we aim to add them, and once we have they will be detailed here.

Endpoint URL

wss://dde-streams.imggaming.com/media/golf/tournaments/[ID]/leaderboard

N.B. – Please use tournament ID “99999” to return you the sample data. This sample data is 3 leaderboard updates for 3 players towards the end of a round. The authentication token provided will be required to make a connection to this websocket endpoint.

Process for connecting to the web socket endpoints

  • Connect to SSL websocket address

  • Send JSON packet containing API token

  • Receive response indicating that connection is authorised (or a response indicating why the connection cannot be made)

  • Receive heartbeat packets every 10 seconds to verify the connection is live

  • Receive data packets

Once you have the API token, any further data that you send over the connection will be ignored. This endpoint sends heartbeats in-between data packets to let you know that it is still connected.

Request parameters

Request Parameters This endpoint currently takes no request parameters, we aim to add them, and once we have they will be detailed here. For this example we will be using the following endpoint URL for Sentry Tournament of Champions 2019: wss://dde-streams.imggaming.com/golf/tournaments/80/leaderboard

Response model

Leaderboard Object

Field Name

Type

Description

standings

object

see object docs

tournamentId

integer

Identifier for the tournament

timestamp

time

Time the update is sent

seqNum

int

Sequence number of the update packet

currentRound

object

see object docs

roundStatuses

array

see array docs;

tournamentStatus

string

possible values: NotStarted, InProgress, PlayComplete, Suspended, Official

 "tournamentId": 228,
  "timestamp": "2020-08-16T19:39:26.904Z",
  "seqNum": 7474,
  "currentRound": {
    "number": 4,
    "name": "Round 4",
  },
  "tournamentStatus": "Official",
  "roundStatuses": [
    {
      "number": 1,
      "status": "Official"
    },
    {
      "number": 2,
      "status": "Official"
    },
    {
      "number": 3,
      "status": "Official"
    },
    {
      "number": 4,
      "status": "Official"
    }
  ]
}

Standings Array

Field Name

Type

Description

players

object

see object docs

holesThrough

object

see object docs

roundInfo

object

see object docs

roundInfo

object

see object docs

toParToday

object

see object docs

totalScore

object

see object docs

status

string

player status, possible values: Possible values: Uncut, Cut, Withdrawn, Retired, Disqualified, DidNotStart, MadeCutButDidNotFinish, Other and Removed (*).

(*) Removed is currently not available.

currentRound

integer

number of current round

teamNo

integer

what team the player is associated with (for individual tournaments players are in their own team of 1)

toPar

object

see object docs

position

object

see object docs

{
  "standings": [
    {
      "players": [
        {** see object below **}
      ],
      "holesThrough": {
        ** see object below **
      },
      "roundInfo": {
        "1": {** see object below **},
        "2": {** see object below **},
        "3": {** see object below **},
        "4": {** see object below **},
      "toParToday": {** see object below **},
      "totalScore": {** see object below **},
      "status": "Uncut",
      "currentRound": 4,
      "teamNo": 1,
      "toPar": {** see object below **},
      "position": {** see object below **}
    }

Players Array

Field Name

Type

Description

displayName

string

Player's display name

country

string

country code of the player

isAmeteur

boolean

True if player is an amateur

lastName

string

last name

firstName

string

first name

id

integer

player's identifier

      "players": [
        {
          "displayName": "Martin KAYMER",
          "country": "GER",
          "isAmateur": false,
          "lastName": "KAYMER",
          "firstName": "Martin",
          "id": 142
        }

Holes Through Object

Field Name

Type

Description

value

integer

The number of holes that a player has completed at this point

displayValue

string

The number of holes that a player has completed at

      "holesThrough": {
        "value": 18,
        "displayValue": "18"
      },

roundInfo object

Field Name

Type

Description

Value (1)

object

round 1 - see value object table

Value (2)

object

round 2 - see value object table

Value (3)

object

round 3 - see value object table

Value (4)

object

round 4 - see value object table

Value (401)

object

playoff round 1 after 4th round. The playoff numbering convention is "{round # after which the playoff is held}0{round # of playoff} "

      "roundInfo": {
        "1": {** see object below **
        },
        "2": {** see object below **
        },
        "3": {** see object below **
        },
        "4": {** see object below **
        },
        "401": {** see object below **}
        

Value object (including round values 1, 2, 3, 4, 401+)

Field Name

Type

Description

score

object

see object docs

toPar

object

see object docs

teeTime

string

Time golfer scheduled to tee off

startHole

integer

Number of the hole the player begins the round on (typically only 1 or 10)

{
          "startHole": 10,
          "score": {** see object below **
          },
          "teeTime": "2020-06-02T07:35:00+04:00",
          "toPar": {** see object below **}
          

Round Info - Score Object

Field Name

Type

Description

value

int

The overall number of strokes the player has taken in the selected round, updated a the end of the hole

displayValue

string

The overall number of strokes the player has taken in the selected round, updated a the end of the hole

          "score": {
            "value": 73,
            "displayValue": "73"
          }

Round info - toPar object

Field Name

Type

Description

value

int

The overall "to par" score so far for the tournament for a given player. Updated after every hole finishes

displayValue

string

The overall "to par" score so far for the tournament for a given player. Updated after every hole finishes.

          "toPar": {
            "value": 1,
            "displayValue": "1"
          }

Round info - toParToday object

Field Name

Type

Description

value

int

The overall "to par" score so far for the day for that player for the selected round. Updated after every hole finishes

displayValue

string

The overall "to par" score so far for the day for that player for the selected round. Updated after every hole finishes

      "toParToday": {
        "value": -1,
        "displayValue": "-1"
      }

Round info - totalScore object

Field Name

Type

Description

value

int

The overall number of strokes the player has taken in the tournament to date, updated at the end of the hole

displayValue

string

The overall number of strokes the player has taken in the tournament to date, updated at the end of the hole

      "totalScore": {
        "value": 280,
        "displayValue": "280"
      }

Position object

Field Name

Type

Description

order

int

The unique order of that player in the leaderboard. To be used to order the players from top to bottom

value

int

The player's position in the leaderboard. Players can have the same value

format

string

Either "absolute" if only player in that position, or "tied" is sharing the position with another player

displayValue

string

The player's position in the leaderboard - will include a "T" if tied

      "position": {
        "value": 10,
        "displayValue": "T10",
        "order": 15,
        "format": "tied"
      }

Current round object

Field Name

Type

Description

number

int

Number of the current round

name

string

Name of the current round

cutline

object

Includes “required, a boolean field indicating if there is a cut on the current round or not, and “cut”, which is the current score that players need to be above to avoid the cut.

  "currentRound": {
    "number": 401,
    "name": "Round 401",
    "cutLine": {** see object below **
    }

Cut line object

Field Name

Type

Description

required

boolean

Is it required to show a cut line true/false

    "cutLine": {
      "required": false
    }

roundStatus Array

An array containing multiple objects, each object contains the following:

Field Name

Type

Description

number

int

Number of the current round

status

string

status of the round. possible values: Groupings Official, In Progress, Maintenance, Not Started, Official, Play Complete, Suspended

  "roundStatuses": [
    {
      "number": 1,
      "status": "Official"
    },
    {
      "number": 2,
      "status": "Official"
    },
    {
      "number": 3,
      "status": "Official"
    },
    {
      "number": 4,
      "status": "Official"
    },
    {
      "number": 401,
      "status": "Official"
    }
  ]
}

Sample Response

{
    "timestamp": "2017-09-26T13:50:10.922Z",
    "seqNum": 1,
    "currentRound": {
        "number": 2,
        "name": "Round 2",
        "cutLine": {
            "required": true,
            "cut": -2
        }
    },
    "standings": [{
        "players": [{
            "displayName": "Tiger",
            "country": "USA",
            "isAmateur": "false",
            "lastName": "Woods",
            "firstName": "Tiger",
            "id": 12345,
        }],
        "holesThrough": {
            "value": 16,
            "displayValue": "16"
        },
        "teamId": 1,
        "currentRound": 1,
        "toParToday": {
            "value": -2,
            "displayValue": "-2"
        },
        "totalScore": {
            "value": 126,
            "displayValue": "126"
        },
        "toPar": {
            "value": -6,
            "displayValue": "-6"
        },
        "position": {
            "value": 1,
            "order": 1,
            "format": "absolute",
            "displayValue": "1"
        },
        "roundInfo": {
            "1": {
                "score": {
                    "value": 66,
                    "displayValue": "66"
                },
                "toPar": {
                    "value": -4,
                    "displayValue": "-4"
                },
                "teeTime": "2018-05-25T07:05Z",
                "startHole": 1
            },
            "2": {
                "score": {
                    "value": 60,
                    "displayValue": "60"
                },
                "toPar": {
                    "value": -2,
                    "displayValue": "-2"
                },
                "teeTime": "2018-05-25T07:05Z",
                "startHole": 1
            }
        }
    }, {
        "players": [{
            "displayName": "Rory McIlroy",
            "country": "NIR",
            "isAmateur": "false",
            "lastName": "McIlroy",
            "firstName": "Rory",
            "id": 12346
        }],
        "holesThrough": {
            "value": 16,
            "displayValue": "16"
        },
        "teamId": 1,
        "currentRound": 1,
        "toParToday": {
            "value": -2,
            "displayValue": "-2"
        },
        "totalScore": {
            "value": 127,
            "displayValue": "127"
        },
        "entryType": "Alternate",
        "toPar": {
            "value": -5,
            "displayValue": "-5"
        },
        "position": {
            "value": 2,
            "order": 2,
            "format": "absolute",
            "displayValue": "2"
        },
        "roundInfo": {
            "1": {
                "score": {
                    "value": 67,
                    "displayValue": "67"
                },
                "toPar": {
                    "value": -3,
                    "displayValue": "-3"
                },
                "teeTime": "2018-05-25T07:05Z",
                "startHole": 1
            },
            "2": {
                "score": {
                    "value": 60,
                    "displayValue": "60"
                },
                "toPar": {
                    "value": -2,
                    "displayValue": "-2"
                },
                "teeTime": "2018-05-25T07:05Z",
                "startHole": 1
            }
        }
    }, {
        "players": [{
            "displayName": "Ian Poulter",
            "country": "GBR",
            "isAmateur": "false",
            "lastName": "Poulter",
            "firstName": "Ian",
            "id": 12347
        }],
        "holesThrough": {
            "value": 16,
            "displayValue": "16"
        },
        "teamId": 1,
        "currentRound": 1,
        "toParToday": {
            "value": -5,
            "displayValue": "-5"
        },
        "totalScore": {
            "value": 128,
            "displayValue": "128"
        },
        "entryType": "Alternate",
        "toPar": {
            "value": -5,
            "displayValue": "-5"
        },
        "position": {
            "value": 3,
            "order": 3,
            "format": "absolute",
            "displayValue": "3"
        },
        "roundInfo": {
            "1": {
                "score": {
                    "value": 70,
                    "displayValue": "70"
                },
                "toPar": {
                    "value": 0,
                    "displayValue": "Par"
                },
                "teeTime": "2018-05-25T07:05Z",
                "startHole": 10
            },
            "2": {
                "score": {
                    "value": 58,
                    "displayValue": "58"
                },
                "toPar": {
                    "value": -4,
                    "displayValue": "-4"
                },
                "teeTime": "2018-05-25T07:05Z",
                "startHole": 10
            }
        }
    }]
}

Last updated