# Team Match Details - Match Play

This web socket endpoint returns the event-by-event data PER MATCH. You will need to make a connection for every match played over the course of the tournament. Both (opposing) team’s event-by-event data for that match will play out, and you should close the connection upon receiving the `RoundOfficial` packet. This endpoint is in conjunction with the Live Events REST endpoint – when a match starts it will be included in the response to the [Live Events](https://docs.sportradar.com/golf/feed-specifications/endpoints-rest/live-events) endpoint, and at that point you should commence connecting to the web socket for that match’s live stream.

{% hint style="info" %}
N.B. this websocket will return data for all players in a match, each `matchNo` is unique for the whole tournament e.g. there is no way of having a match in round 7 with the same `matchNo` as in round 3 (even if the exact same players are playing in the match.)
{% endhint %}

### Endpoint URL

`wss://dde-streams.data.imgarena.com/golf/tournaments/{tournamentId}/matchdetails/{matchNo}`

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

### Request Parameters

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

### Response Model

There are a number of different types of packets that can be sent through this endpoint. They are detailed in the [Round & Match Details Scenarios](https://docs.sportradar.com/golf/round-details-scenarios) section.

{% tabs %}
{% tab title="Important details" %}
Key differences between Team Round Details & Team Match Details

* stroke play feed keeps a log of a single player’s round, the match play output keeps a log of all players in the given match
* [Round Started/Finished/Official](https://docs.sportradar.com/golf/round-details-scenarios/round-started-finished-official) packets refer to a match opposed to a round but still has same naming conventions as for stroke play
* `groupNo` and `matchNo` not included in events
* `matchType` : "Matchplay"
* [hole correction mode](https://docs.sportradar.com/golf/round-details-scenarios/hole-correction-mode) will return two packets, one for each team, the `teamNo` will be provided on each packet. Both packets combined will cover all events for the entire hole.
* different possible values for `finishReason`
  {% endtab %}
  {% endtabs %}

### Team Match Details - match play via RestAPI

Note that the Team Match details for matchplay websockets is available via Rest - `https://dde-api.data.imgarena.com/golf/tournaments/{tournamentId}/matchdetails/{MatchNo}?rest=true`
