Skip to content
Alchemy Logo

stellar_unsubscribe

WebSocket · Send JSON-RPC messages after opening a connection.

WebSocket only. Send positional params containing the subscription ID returned by stellar_subscribe on this connection. The result is true if removed, false if not found. Already-in-flight notifications may arrive while unsubscribing. Other subscriptions stay active. Closing the connection ends every subscription; recreate subscriptions after reconnecting.

{"jsonrpc":"2.0","id":60,"method":"stellar_unsubscribe","params":["0x0123456789abcdef0123456789abcdef"]}
{"jsonrpc":"2.0","id":60,"result":true}

Message parameters

stringrequired

The opaque ID from this connection.

Result

Whether a subscription was removed.

Unsubscribe

Send on the open WebSocket:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "stellar_unsubscribe",
  "params": [
    "0x0123456789abcdef0123456789abcdef"
  ]
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

JSON-RPC errors

  • -32602: Invalid params
Was this page helpful?