> 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 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 dynamically by asking a question.

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

```
GET https://docs.lsports.eu/u/trade/integration/getting-started-steps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
