> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# accountSubscribe

> Abonnieren Sie ein Konto, um Benachrichtigungen zu erhalten, wenn sich die Lamports oder Daten für einen bestimmten Konto-Public-Key ändern.

## Endpunkte

Websockets sind im Mainnet und Devnet mit den folgenden URLs verfügbar:

* **Mainnet** `wss://mainnet.helius-rpc.com/?api-key=<api-key>`
* **Devnet** `wss://devnet.helius-rpc.com/?api-key=<api-key>`

<Note>Websockets haben einen 10-minütigen Inaktivitäts-Timer; es wird dringend empfohlen, regelmäßige Gesundheitschecks durchzuführen und jede Minute Pings zu senden, um die Websocket-Verbindung aktiv zu halten.</Note>

## Berechtigungen

<ParamField query="api-key" type="string" required>
  Ihr Helius-API-Schlüssel. Sie können einen kostenlos im [Dashboard](https://dashboard.helius.dev/api-keys) erhalten.
</ParamField>

## Body

<ParamField body="params" type="array" required>
  <Expandable title="properties" defaultOpen>
    <ParamField body="pubkey" type="string" required>
      Konto-Pubkey, als base-58-codierter String.
    </ParamField>

    <ParamField body="encoding" type="string">
      Kodierungsformat für Kontodaten. Kann sein `base58`, `base64`, `base64+zstd` oder `jsonParsed`.

      * `base58` ist langsam
      * `jsonParsed`-Kodierung versucht, programmspezifische Zustandsparser zu verwenden, um menschenlesbarere und explizitere Kontozustandsdaten zurückzugeben
      * Wenn `jsonParsed` angefordert wird, aber kein Parser gefunden werden kann, fällt das Feld auf die binäre Kodierung zurück, erkennbar, wenn das Datenfeld vom Typ String ist.
    </ParamField>

    <ParamField body="commitment" type="string">
      Das Commitment-Level für das Abonnement. Kann sein `finalized`, `confirmed` oder `processed`.
    </ParamField>

    <ParamField body="notifyOn" type="string" deprecated>
      **Veraltet — ab Agave 4.2 unwirksam.** Die Einstellung `notifyOn` hat keine Wirkung. Das Feld wird zu einem späteren Zeitpunkt entfernt.
    </ParamField>
  </Expandable>
</ParamField>

## Antwort

<ResponseField name="result" type="integer">
  Abonnement-ID (notwendig zum Abbestellen)
</ResponseField>

<RequestExample>
  ```json Request theme={"system"}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "accountSubscribe",
    "params": [
      "CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12",
      {
        "encoding": "jsonParsed",
        "commitment": "finalized"
      }
    ]
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={"system"}
  {
    "jsonrpc": "2.0",
    "result": 23784,
    "id": 1
  }
  ```

  ```json Message (base58) theme={"system"}
  {
    "jsonrpc": "2.0",
    "method": "accountNotification",
    "params": {
      "result": {
        "context": {
          "slot": 5199307
        },
        "value": {
          "data": [
            "11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHPXHRDEHrBesJhZyqnnq9qJeUuF7WHxiuLuL5twc38w2TXNLxnDbjmuR",
            "base58"
          ],
          "executable": false,
          "lamports": 33594,
          "owner": "11111111111111111111111111111111",
          "rentEpoch": 635,
          "space": 80
        }
      },
      "subscription": 23784
    }
  }
  ```

  ```json Message (jsonParsed) theme={"system"}
  {
    "jsonrpc": "2.0",
    "method": "accountNotification",
    "params": {
      "result": {
        "context": {
          "slot": 5199307
        },
        "value": {
          "data": {
            "program": "nonce",
            "parsed": {
              "type": "initialized",
              "info": {
                "authority": "Bbqg1M4YVVfbhEzwA9SpC9FhsaG83YMTYoR4a8oTDLX",
                "blockhash": "LUaQTmM7WbMRiATdMMHaRGakPtCkc2GHtH57STKXs6k",
                "feeCalculator": {
                  "lamportsPerSignature": 5000
                }
              }
            }
          },
          "executable": false,
          "lamports": 33594,
          "owner": "11111111111111111111111111111111",
          "rentEpoch": 635,
          "space": 80
        }
      },
      "subscription": 23784
    }
  }
  ```
</ResponseExample>
