# Snapshot

The Snapshot API is designed to provide real-time, comprehensive data snapshots of ongoing sports events. This API allows you to request detailed information about live events, enabling you to capture the current state of a fixture, including live scores, markets, and settlement data.<br>

The Snapshot API should be used primarily when you are not in sync with the RabbitMQ feed. It serves as a fallback mechanism to ensure you can access the latest data when needed.

## **How to Use the Snapshot API**

You can request a snapshot from our API service using the following endpoint:

**Method**: POST\
**URL**: `https://stm-snapshot.lsports.eu/InPlay/{action}`

### **Request Limitations**

* **Full Requests Without Filters**: Allowed once every 15 seconds.
* **Filtered Requests**: Allowed once per second.
* **Fixture Snapshot Availability**: Snapshots for fixtures that ended more than 24 hours before the request will not be available.
* **General API Call Limit**: Limited to 1 call per second for all types of requests combined.

### Time Filtering Behavior

The API supports **three filtering parameters**:

* `fromDate` and `toDate` filter **fixtures by their scheduled start date**. If you don't set them, you get all the fixtures.
* `timestamp` filters **only the markets and settlements updated since the specified time**.

These filters are **independent**. Here's how they work together:

* If you set `fromDate`/`toDate` **without** `timestamp`, you receive **all data** (live scores, markets, settlements) for fixtures within the date range.
* If you set `fromDate`/`toDate` **and** `timestamp,`you get those fixtures, but **only the markets and settlements changed since the timestamp**.
* If you set **only** `timestamp,`you get **all fixtures**, but again, **only updated markets and settlements** are included (fixtures without any changes will still be returned, but without market data).

#### Best Practice

For recovery purposes, it is recommended to use **only the `timestamp` filter**, so you receive all updates since the time your system lost connection.


---

# 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.lsports.eu/u/trade/integration/apis/snapshot.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.
