Source
program_subscribeParameters
Pubkey of the
program_id, as base-58 encoded stringOptional configuration object.
Show propertiesHide properties
Show propertiesHide properties
Values:
processed, confirmed, finalizedThe commitment describes how finalized a block is at that point in time. See
Configuring State Commitment.Filter results using up to 4 filter objects. See
Filtering. All filters must match for a given
account to be included.
The node validates and optimizes the supplied filters before the subscription
is created.
Values:
base58, base64, base64+zstd, binary, jsonParsedEncoding format for account data.base58is slow.jsonParsedencoding attempts to use program-specific state parsers to return more human-readable and explicit account state data.- If
jsonParsedis requested but no parser is available, the RPC node falls back to[data, "base64"]. binaryis a deprecated legacy alias for base58 data returned as a plain string.
Request a slice of each returned account’s data.
| Field | Type | Description |
|---|---|---|
offset | usize | Byte offset from which to start reading account data. |
length | usize | Number of bytes to return. |
Data slicing is only available for
base58, base64, base64+zstd, and
binary encodings.base58 and binary use base-58 encoding and fail if the selected payload is
more than 128 bytes after slicing. Use base64 for larger accounts.Values:
true, falseAccepted for compatibility.Unlike getProgramAccounts,
programNotification messages already include context. withContext,
minContextSlot, and sortResults are accepted for compatibility, but PubSub
subscriptions do not currently change behavior based on those fields.Result
Subscription id. Pass this to
programUnsubscribe.
Notification format
Notifications are delivered asprogramNotification.
{
"jsonrpc": "2.0",
"method": "programNotification",
"params": {
"result": {
"context": {
"slot": 583
},
"value": {
"pubkey": "BpdYYo2Vw1NVbzE2DqJxCX2xEfr42xvMYFU2dKd1CW57",
"account": {
"lamports": 499997095000,
"data": ["", "base64"],
"owner": "11111111111111111111111111111111",
"executable": false,
"rentEpoch": 18446744073709551615,
"space": 0
}
}
},
"subscription": 11
}
}
Always
"2.0".Always
"programNotification".Notification wrapper with a single matching account and the subscription id.
Show propertiesHide properties
Show propertiesHide properties
Notification result object with
context and value. For PubSub notifications,
context includes slot and omits apiVersion.Show propertiesHide properties
Show propertiesHide properties
Context for the bank slot that produced the notification.
Show propertiesHide properties
Show propertiesHide properties
Slot associated with the notification.
Single matching account returned for the subscription.
Show propertiesHide properties
Show propertiesHide properties
Address of the matching account, as a base-58 encoded string.
Account data using the same structure documented in
Account Data.
Subscription id that produced this notification.