# slotsUpdatesSubscribe

Subscribe to receive a notification from the validator on a variety of updates on every slot

{% hint style="danger" %}
This subscription is unstable. The format of this subscription may change in the future, and may not always be supported.
{% endhint %}

#### Parameters required for this RPC call

* No parameters required.

{% tabs %}
{% tab title="Websocket" %}

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "slotsUpdatesSubscribe"
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "jsonrpc": "2.0",
  "result": 0,
  "id": 1
}
```

{% endtab %}
{% endtabs %}

**Notification Format:**

The notification will be an object with the following fields:

* `err: <string|undefined>` - The error message. Only present if the update is of type "dead".
* `parent: <u64|undefined>` - The parent slot. Only present if the update is of type "createdBank".
* `slot: <u64>` - The newly updated slot
* `stats: <object|undefined>` - The error message. Only present if the update is of type "frozen". An object with the following fields:
  * `maxTransactionsPerEntry: <u64>`,
  * `numFailedTransactions: <u64>`,
  * `numSuccessfulTransactions: <u64>`,
  * `numTransactionEntries: <u64>`,
* `timestamp: <i64>` - The Unix timestamp of the update in milliseconds
* `type: <string>` - The update type, one of:
  * "firstShredReceived"
  * "completed"
  * "createdBank"
  * "frozen"
  * "dead"
  * "optimisticConfirmation"
  * "root"

{% tabs %}
{% tab title="Example" %}

```json
{
  "jsonrpc": "2.0",
  "method": "slotsUpdatesNotification",
  "params": {
    "result": {
      "parent": 75,
      "slot": 76,
      "timestamp": 1625081266243,
      "type": "optimisticConfirmation"
    },
    "subscription": 0
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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.shyft.to/solana/rpc-calls/solana-websockets/slotupdatessubscribe.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.
