stellar_unsubscribe
WebSocket · Send JSON-RPC messages after opening a connection.
- Stellar Mainnet:
wss://stellar-mainnet.g.alchemy.com/v2/YOUR_API_KEY - Stellar Testnet:
wss://stellar-testnet.g.alchemy.com/v2/YOUR_API_KEY
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?