# Golf Multiplexer Websocket

We've created an endpoint to retrieve active websockets for all golf events in play. `wss://dde-streams.data.imgarena.com/multiplexer/?sport=golf` endpoint returns new packets at the point of connecting for any "live" golf event. Once connected each packet is returned based on the "timestamp" of the packet.

Golf Multiplexer Endpoint - `wss://dde-streams.data.imgarena.com/multiplexer/?sport=golf`

Note that if you require a backfill of events, please connect to: `wss://dde-streams.data.imgarena.com/multiplexer/?catchup=true`

| Field Name | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sport      | string | Default value - "Golf"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| eventId    | string | <p>eventId format depends on feedType, for example<br><br>We return - "eventID" as "tournamentID" for the following feedTypes:<br>-approach<br>-shortgame<br>-driving<br>-putting<br>-scoring<br>-holestats</p><p>-leaderboard</p><p>-matchplayleaderboard</p><p>-teamsstats</p><p><br><br>We return - "eventID" as "tournamentID - teamNo" for the following feedTypes:<br>-holebyhole</p><p>-playerstats</p><p>We return - "eventID" as "tournamentID - MatchNo" for the following feedTypes:</p><p>-matchdetails</p><p>-matchscore</p><p><br><br>We return - "eventID" as "tournamentID - RoundId - TeamNo" for the following feedTypes:<br>-rounddetails</p> |
| feedType   | string | Please view below table with possible feedType - eventId and Websocket mapping                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| dataType   | string | Possible values of the type of data - "eventdata" "heartbeats" "connectionState"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| message    | object | The actual data packet                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

Possible vales for feedType - eventID format - websocket mapping:

| Field Name           | eventId format                  | Websocket mapping                                                                             |
| -------------------- | ------------------------------- | --------------------------------------------------------------------------------------------- |
| leaderboard          | tournamentID                    | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/leaderboard                  |
| matchplayleaderboard | tournamentID                    | wss\://dde-streams.data.imgarena.com/golf/tournaments/tournamentID/matchplayleaderboard       |
| holestats            | tournamentID                    | wss\://dde-test-streams.imggaming.com/golf/tournaments/{tournamentID}/holestats               |
| scoring              | tournamentID                    | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/stats/scoring                |
| putting              | tournamentID                    | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/stats/putting                |
| driving              | tournamentID                    | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/stats/driving                |
| shortgame            | tournamentID                    | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/stats/shortgame              |
| approach             | tournamentID                    | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/stats/approach               |
| teamsstats           | tournamentID                    | wss\://dde-streams.data.imgarena.com/golf/tournaments/{tournamentID}/playerstats              |
| holebyhole           | tournamentID - teamNo           | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/teamholebyhole/{teamNo}      |
| matchdetails         | tournamentID - MatchNo          | wss\://dde-streams.data.imgarena.com/golf/tournaments/{tournamentID}/matchdetails/{MatchNo}   |
| matchscore           | tournamentID - MatchNo          | wss\://dde-streams.data.imgarena.com/golf/tournaments/{tournamentID}/matchscore/{MatchNo}     |
| playerstats          | tournamentID - teamNo           | wss\://dde-streams.data.imgarena.com/golf/tournaments/{tournamentID}/playerstats/{teamNo}     |
| rounddetails         | tournamentID - roundId - teamId | wss\://dde-streams.imggaming.com/golf/tournaments/{tournamentID}/round/{roundNo}/team/teamId} |

Example of feedType of rounddetails

````
{
    "sport": "Golf",
    "eventId": "1982-2-84",
    "feedType": "rounddetails",
    "dataType": "eventdata",
    "message": {
        "timestamp": "2023-12-01T13:24:05.000Z",
        "courseId": "1",
        "ballLie": {
            "coordinates": {
                "x": -0.61390697504717551,
                "y": 51.393085809283207,
                "z": null
            },
            "surfaceTypeCode": "OFW",
            "distanceToPin": 194.353127018863,
            "shotDistance": 274.508517831319,
            "blindShot": false,
            "surfaceType": "Fairway",
            "obstructions": false
        },
        "delayStatus": "RECONSTRUCTED",
        "roundNo": 2,
        "provisionalIndex": 0,
        "groupId": 659368,
        "groupNo": 32,
        "eventElementType": "DetailedLie",
        "player": {
            "displayName": "Grant Forrest",
            "country": "SCO",
            "isAmateur": false,
            "lastName": "Forrest",
            "firstName": "Grant",
            "id": 160,
            "gender": "male"
        },
        "seqNum": 234,
        "holeOrder": 3,
        "teamNo": 84,
        "strokeNo": 1,
        "playerId": 160,
        "holeNo": 12
    }
}
```
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/golf/feed-specifications/endpoints-stream/golf-multiplexer-websocket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
