slotsUpdatesSubscribe

WSSSubscriptionsOperator+

Streams fine-grained per-slot lifecycle events (unstable; shape may change without notice).

WSSwss://ws-newyork.constant-k.com:1337/ws?api-key=YOUR_API_KEY

Where slotSubscribe gives one message when a slot starts processing, slotsUpdatesSubscribe gives one message for each lifecycle transition a slot passes through on the way to being rooted — first shred received, bank created, frozen (with block-production stats attached), optimistically confirmed, rooted, or dead — distinguished by the notification's type field.

Agave documents this subscription as unstable: the set of type values and the fields attached to each one have changed before and may change again without a deprecation cycle. It serves as a debugging/observability aid rather than a base for commitment-sensitive logic; slotSubscribe, rootSubscribe, or signatureSubscribe cover that instead.

PlansOperator and above
FreeNot included
OperatorIncluded
Blade RunnerIncluded
NexusIncluded

Parameters

This method takes no parameters.

Result

resultinteger

The subscription id, returned once in the initial RPC response. Passed to slotsUpdatesUnsubscribe, it cancels the stream.

Notifications

Updates arrive as slotsUpdatesNotification messages on the same socket. Every variant carries slot and a millisecond timestamp. frozen additionally carries a stats object (numTransactionEntries, numSuccessfulTransactions, numFailedTransactions, maxTransactionsPerEntry); createdBank additionally carries parent; dead additionally carries err describing why the slot was abandoned. firstShredReceived, completed, optimisticConfirmation, and root carry no extra fields beyond slot and timestamp.

params.resultobject

Notification payload.

Show one ofOne of
Option 1object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

timestampinteger

Unix timestamp in milliseconds.

Option 2object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

timestampinteger

Unix timestamp in milliseconds.

Option 3object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

parentinteger

Parent slot.

timestampinteger

Unix timestamp in milliseconds.

Option 4object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

timestampinteger

Unix timestamp in milliseconds.

statsobject

Block-production statistics for this slot.

Show propertiesProperties
numTransactionEntriesinteger

Number of transaction entries in the slot.

numSuccessfulTransactionsinteger

Number of transactions that executed successfully.

numFailedTransactionsinteger

Number of transactions that failed.

maxTransactionsPerEntryinteger

Highest number of transactions packed into a single entry.

Option 5object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

timestampinteger

Unix timestamp in milliseconds.

errstring

Human-readable reason the slot was abandoned instead of being replayed successfully.

Option 6object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

timestampinteger

Unix timestamp in milliseconds.

Option 7object
Show propertiesProperties
typestring

Discriminator naming which kind of update this notification carries.

slotinteger

Slot number this applies to.

timestampinteger

Unix timestamp in milliseconds.

Unsubscribe

slotsUpdatesUnsubscribe, called with the subscription id, stops the notifications and returns true once the subscription is removed.

slotsUpdatesUnsubscribe request
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "slotsUpdatesUnsubscribe",
  "params": [11071870]
}

Notes

  • WebSocket access is included on the Operator plan and above; it is not available on Free.
  • Concurrent connections are capped per API key: 10 on Operator, 50 on Blade Runner, 100 on Nexus.
  • Subscribe and unsubscribe calls draw from the same global per-plan request-rate limit as HTTP calls: 50 req/s on Operator, 200 req/s on Blade Runner, 500 req/s on Nexus.
  • Only subscription methods (the *Subscribe / *Unsubscribe family) are accepted on the WebSocket endpoint; standard request/response RPC methods must go over HTTPS instead.
  • A getHealth request sent over the open socket on a regular interval serves as a keepalive; connections that go quiet can be dropped by intermediate load balancers.
  • Each region has its own WebSocket hostname, for example wss://ws-newyork.constant-k.com:1337/ws?api-key=YOUR_API_KEY; every region is listed on the Endpoints page.
  • Captured live from wss://api.mainnet-beta.solana.com; frozen is shown here because it carries the richest payload. The same connection also produced, moments apart:
{"type":"completed","slot":447946412,"timestamp":1789696067983}
{"type":"root","slot":447946380,"timestamp":1789696067990}
  • This subscription is unstable upstream: quoting Agave's own documentation, "the format may change in the future and may not always be supported."