Subscribe to a program to receive notifications when the lamports or data for an account owned by the given program changes.
On ThorNode
Send over the complete wss:// URL copied from the dashboard. Each active subscription counts toward the per-token cap; over the cap the request is answered with -32005 subscription limit exceeded and not forwarded. Frames pass through unchanged.
Parameters
Pubkey of the program_id, as base-58 encoded string.
Configuration object containing the following fields: The commitment level for the subscription. Can be finalized, confirmed, or processed.
Array of filter objects to apply.
Encoding format for account data. Can be base58, base64, base64+zstd, or jsonParsed.
base58 is slow
jsonParsed encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data
If jsonParsed is requested but a parser cannot be found, the field falls back to binary encoding, detectable when the data field is type string.
Deprecated — no-op as of Agave 4.2. Setting notifyOn has no effect. The field will be removed at a later date.
The notification format is a single program account object as seen in the getProgramAccounts RPC HTTP method.
Response
Subscription id (needed to unsubscribe)