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