# Websockets

Our websockets provide real-time data updates for your tracking devices, ensuring you stay informed as changes occur.

**How It Works**

1. **Authentication**\
   To initiate a WebSocket connection, a valid **session** must be included in the request query.
   * Learn how to generate a session ID [here](/the-basics/session.md) (link to detailed instructions).
2. **Websocket Connection**\
   Once connected, the websocket will stream real-time data for your tracking devices. Key details to note:
   * **Data Streaming**: Real-time updates are sent as long as the connection remains active.
   * **Rate Limiting**: A maximum of **2 responses per second** is enforced to ensure optimal performance.
   * **Update Triggers**: Updates are only sent when there is a change in the status or location of at least one of your tracking devices.
3. **Getting Started**\
   For step-by-step instructions on connecting to the websocket, refer to our[ websocket connection guide](/live-tracking-apis/positions/stream-positions.md) (link to detailed instructions).


---

# 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.sendstackhq.com/guides/websockets.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.
