Skip to main content

slotsUpdatesSubscribe RPC Method

Loading...

Updated on
May 01, 2026

slotsUpdatesSubscribe RPC Method

As of May 1, 2026, this WebSocket method is billed based on metered data usage: 0.1 MB = 15 API credits. Learn more about WebSocket billing.
The Solana Kit example uses createSolanaRpcSubscriptions_UNSTABLE because the Kit API for slot update subscriptions is currently experimental and the implementation may change. The slotsUpdatesSubscribe method itself is fully supported by the Quicknode WebSocket API.

Parameters

This method does not accept any parameters

Returns

slotsUpdatesNotification
object
Loading...
slot
integer
Loading...
timestamp
integer
Loading...
type
string
Loading...
stats
object
Loading...
numTransactionEntries
integer
Loading...
numSuccessfulTransactions
integer
Loading...
numFailedTransactions
integer
Loading...
maxTransactionsPerEntry
integer
Loading...
Request
1
import { createSolanaRpcSubscriptions_UNSTABLE } from '@solana/kit';
2
3
const rpcSubscriptions = createSolanaRpcSubscriptions_UNSTABLE('');
4
5
async function main() {
6
const abortController = new AbortController();
7
8
const slotsUpdatesNotification = await rpcSubscriptions
9
.slotsUpdatesNotifications()
10
.subscribe({ abortSignal: abortController.signal });
11
12
try {
13
for await (const notification of slotsUpdatesNotification) {
14
console.log('type:', notification.type);
15
console.log('slot:', notification.slot);
16
console.log('timestamp:', notification.timestamp);
17
}
18
} catch (e) {
19
console.error(e);
20
} finally {
21
abortController.abort();
22
console.log('Unsubscribed from slot updates');
23
}
24
}
25
26
main();
27
1
import { createSolanaRpcSubscriptions_UNSTABLE } from '@solana/kit';
2
3
const rpcSubscriptions = createSolanaRpcSubscriptions_UNSTABLE('');
4
5
async function main() {
6
const abortController = new AbortController();
7
8
const slotsUpdatesNotification = await rpcSubscriptions
9
.slotsUpdatesNotifications()
10
.subscribe({ abortSignal: abortController.signal });
11
12
try {
13
for await (const notification of slotsUpdatesNotification) {
14
console.log('type:', notification.type);
15
console.log('slot:', notification.slot);
16
console.log('timestamp:', notification.timestamp);
17
}
18
} catch (e) {
19
console.error(e);
20
} finally {
21
abortController.abort();
22
console.log('Unsubscribed from slot updates');
23
}
24
}
25
26
main();
27
Response
1
{
2
"jsonrpc": "2.0",
3
"result": 0,
4
"id": 1
5
}
1
{
2
"jsonrpc": "2.0",
3
"result": 0,
4
"id": 1
5
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free