latestBlockSubscribe
Subscribe to receive notifications on the latest block SolanaStreaming has processed.
This is useful for determining how up to date our node is and for basic connection checking.
All plans can receive an unlimited number of messages from this subscription.
Subscriptions are limited to 1 per connection.
This latestBlock stream does not count towards your websocket messages quota.
Request Parameters
NoneResponse Fields
-
subscription_id
unsigned integer
The subscription id which can be used to unsubscribe and associate websocket messages with the subscription.
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "latestBlockSubscribe"
}
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"subscription_id": 1
}
}
latestBlockNotification
These are the notifications you will receive when latestBlockSubscribe is called successfully. Notifications do not typically conform to jsonrpc.
Notification Fields
-
subscription_id
unsigned integer
The subscription id which was returned when creating the subscription. This can be used to unsubscribe with the newPairUnsubscribe method. -
method
string
The name of the notification. -
params
latestBlockObject
latestBlockObject
-
block
unsigned integer
The number of the block that has been processed by SolanaStreaming. -
blockTime
unsigned integer
The unix timestamp of the associated block.
Notification Example
{
"block": 323424580,
"blockTime": 1740655743
}