TriportRPC

slotsUpdatesUnsubscribe

Last updated:

slotsUpdatesUnsubscribe shuts down a slot-lifecycle stream opened with slotsUpdatesSubscribe on the same WebSocket connection. Pass the integer subscription id from the subscribe ack; the server answers result: true and stops emitting slotsUpdatesNotification frames for that id. Other subscriptions sharing the connection are not affected.

Because the updates stream fires for every stage of every slot — routinely ten or more frames per second, around a million a day — it is the kind of subscription you should treat as a scoped measurement instrument, not ambient background noise. Turn it on for the duration of a task and turn it off when the task ends: a propagation-latency benchmark that has collected its sample window, a leader-skip monitor that only runs during your validator's assigned slots, an incident investigation that was watching for dead slots while a cluster event unfolded, or a trading system that only consumes optimisticConfirmation timing during active sessions. Leaving the firehose attached to a connection that also carries application subscriptions inflates parse latency for everything else on the socket, so releasing it promptly is a performance measure as much as a hygiene one.

Lifecycle semantics follow the common Pub/Sub contract. The id exists only within the current WebSocket session; after a reconnect the server has already discarded the subscription, and replaying the old id yields -32602 (invalid subscription id) — the same error a duplicate unsubscribe produces. Given the stream's rate, expect a burst of already-buffered notifications to arrive after your unsubscribe frame and before (or even just after) the ack; route by known subscription ids and silently drop the rest. There is no replay on resubscribe — the events that occurred while you were detached are gone, which is fine for an instrumentation stream. Closing the socket releases this and all other subscriptions in one step.

Parameters

This method takes no parameters.

Returns

slotsUpdatesUnsubscribe return value
FieldType
resultobject

Examples

curl https://triport.io/sol \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"id":1,"method":"slotsUpdatesUnsubscribe","params":[],"jsonrpc":"2.0"}'
const res = await fetch("https://triport.io/sol", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "id": 1,
  "method": "slotsUpdatesUnsubscribe",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/sol",
    headers={"Authorization": "Bearer <api-key>"},
    json={"id":1,"method":"slotsUpdatesUnsubscribe","params":[],"jsonrpc":"2.0"},
)
print(resp.json())

Usage

  1. Transport: WebSocket.
  2. Networks: mainnet, devnet, testnet.
  3. Credit cost: 1 per call.

FAQ

What does slotsUpdatesUnsubscribe do?
Cancels an active slotsUpdatesSubscribe stream, identified by the subscription id returned in the subscribe ack.
How many credits does slotsUpdatesUnsubscribe cost?
slotsUpdatesUnsubscribe costs 1 credit(s) per call on Triport by default.
Is slotsUpdatesUnsubscribe available over WebSocket?
Yes, slotsUpdatesUnsubscribe supports WebSocket.