> For the complete documentation index, see [llms.txt](https://docs.lsports.eu/u/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lsports.eu/u/trade/integration/getting-started-steps.md).

# Getting Started

Receive your credentials and enable your data distribution

Receive your credentials from LSports, then enable your data distribution.

## Step 1: Receive Your Credentials

LSports will provide your login credentials: **Username**, **Password**, and **Package ID**. These identify your account and package when calling the Distribution API and connecting to RabbitMQ. Store them securely: you'll use them in both places.

## Step 2: Enable Distribution

Distribution must be explicitly enabled before you can consume messages. This is an API call, not a one-time toggle: you'll use the Start/Stop endpoints any time you need to pause or resume your feed, including as part of the recovery sequence covered in [Reliability & Recovery](/u/trade/integration/reliability-and-recovery.md).

### Request endpoints

* **Enable:** `https://stm-api.lsports.eu/Distribution/Start`
* **Disable:** `https://stm-api.lsports.eu/Distribution/Stop`

### Request body

```json
{
    "PackageId": "YOUR_PACKAGE_ID",
    "UserName": "YOUR_USERNAME",
    "Password": "YOUR_PASSWORD"
}
```

### Response

```json
{
    "Header": { "HttpStatusCode": 200 },
    "Body": { "Message": "Success" }
}
```

### Keep watching it: Distribution Status API

Once distribution is running, poll the Distribution Status API regularly rather than treating it as fire-and-forget: it's your earliest warning that something on your consumption side is falling behind.

| Metric                         | What to watch for                                                                                                                                                                 |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Polling frequency**          | Every \~5 seconds, within rate limits                                                                                                                                             |
| **Distribution active status** | Should read `true`; `false` means distribution has stopped and you must start the recovery sequence in [Reliability & Recovery](/u/trade/integration/reliability-and-recovery.md) |
| **Consumers connected**        | Shows how many consumers are attached to your queue; confirms your consumer is actually connected and helps spot unexpected extra or missing consumers                            |
| **Messages per second**        | Baseline this so you can spot drops or spikes                                                                                                                                     |
| **Messages in queue**          | The critical metric, see thresholds below                                                                                                                                         |

| Queue depth                         | Meaning / action                                             |
| ----------------------------------- | ------------------------------------------------------------ |
| **0 messages**                      | Target state: you're consuming as fast as data arrives       |
| **500+ messages (5-second window)** | Investigate consumer performance immediately                 |
| **10,000 unconsumed messages**      | Queue auto-shuts down: suspend trading and run full recovery |

***

Next: [Connection Setup](/u/trade/integration/connection-setup.md)


---

# 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.lsports.eu/u/trade/integration/getting-started-steps.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.
