slotsUpdatesSubscribe
Subscribe to receive a notification from the validator on a variety of updates on every slot
Parameters
None
No parameters are required for this method.
Result
Returns an <integer>
representing the subscription ID. This ID is required to unsubscribe.
Code Sample
Request Example:
Response Example:
Notification Format
The notification is an object with the following fields:
err
(string | undefined
): The error message. Present only if the update type is"dead"
.parent
(u64 | undefined
): The parent slot. Present only if the update type is"createdBank"
.slot
(u64
): The updated slot.stats
(object | undefined
): Present only if the update type is"frozen"
. Contains the following fields:maxTransactionsPerEntry
(u64
)numFailedTransactions
(u64
)numSuccessfulTransactions
(u64
)numTransactionEntries
(u64
)timestamp
(i64
): The Unix timestamp of the update in milliseconds.
type
(string
): The type of update. Possible values:"firstShredReceived"
"completed"
"createdBank"
"frozen"
"dead"
"optimisticConfirmation"
"root"
Example Notification
Last updated