> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/tennis/documentation-1/connecting-programmatically.md).

# Connecting Programmatically

## Overview

To connect to the system programmatically, you will need to provide the IP address (or addresses/blocks) that you will connect from.

You will then be provided with one API token that will allow you to gain secured access to both the list of events (Schedule) and the live data (Streams) that you have licensed from IMG Gaming.

For non-streaming schedule data, all API requests should be directed to the following URL:

URL: `https://dde-api.data.srarena.io/`

Requests for streamed live data should be issued to:

URL: `wss://dde-streams.data.srarena.io/`

## Schedule API

Our Schedule API provides the following end points. These end points are all related to Draw or Order of Play (OOP) information:

`/players`

`/tournaments`

`/tournaments/{id}`

`/tournaments/{id}/draws`

`/tournaments/{id}/events`

`/competitions/{id}/events`

`/competitions/{id}/draws`

`/tournaments/{id}/results`

`/tournaments/liveevents`

## Streams API

When a new event appears on the /tournaments/liveevents endpoint, you should automatically connect to the SSL websocket address for that event:

1\) Call `https://dde-api.data.srarena.io/tournaments/liveevents` (this should be requested every 10 seconds, so you do not miss a new event starting).

![](https://files.readme.io/261a138-RESTful_connections.png)

2\) See a new event appear on the /tournaments/liveevents endpoint, e.g.

```
{
        "startTime": {
            "status": "FollowsPrevious"
        },
        "teamA": {
            "status": "KnownTennisTeam",
            "team": {
                "player1": {
                    "id": "MN13",
                    "firstName": "Maximilian",
                    "lastName": "Marterer",
                    "country": "GER"
                },
                "entryType": "Standard",
                "seed": 8
            }
        },
        "eventId": "2025-9900-MS028",
        "teamB": {
            "status": "KnownTennisTeam",
            "team": {
                "player1": {
                    "id": "F0BT",
                    "firstName": "Jonas",
                    "lastName": "Forejtek",
                    "country": "CZE"
                },
                "entryType": "Standard"
            }
        },
        "tournamentName": "United Cup"
    },
```

3\) Connect to the new match on the live streams endpoint:

![](https://files.readme.io/ea2178b-Websocket_connections.png)

There are two stream endpoints that you can connect to for a live event:

Live Streams, e.g: `wss://dde-streams.data.srarena.io/tennis/events/2024-0540-MS001/stream`

Live Statistics, e.g: `wss://dde-streams.data.srarena.io/tennis/events/2024-0540-MS001/statistics`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sportradar.com/tennis/documentation-1/connecting-programmatically.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
