Node reference
Program subscribe
Stream program account changes
Program subscribe listens for changes to accounts owned by a Solana program. Use filters to limit the account data your workflow receives.
Try it step by step#
- Enter the program ID you want to observe on the selected network.
- Add a Filters JSON array only when you know that program’s account layout. dataSize filters account size; memcmp matches bytes at an offset.
- Run and inspect accountId, account, and context.slot for a matching account change.
What to expect#
Notifications identify the changed account in accountId. It will usually differ from the programId that owns the account.
Things to check#
- A program subscription observes account changes, not a decoded list of business events.
- Incorrect size or byte filters can silently match no accounts. Start with a known account layout.
- Use Logs subscribe if you need transaction log messages instead.
Keep learning#
Network setup: This node uses solana. See connections for RPC setup and Test mode for network selection.
Parameters#
| Setting | Default | What it does |
|---|---|---|
| Program ID | — | Program whose owned accounts should be observed. |
| Account filters | (empty) | Optional JSON array of dataSize or memcmp filters. |
| Account data | base64 | How account data is encoded in notifications. Base64 returns encoded bytes. |
| Commitment | confirmed | How far a Solana block must be confirmed before its data is used. |
| RPC URL | {{global.chains.solana.rpcUrl}} | Configured for Solana in workspace RPC settings. |
| Timeout (seconds) | 0 | Use 0 to wait until a matching notification arrives or the workflow is stopped. |
| On failure | stop | Choose whether a failed execution stops the workflow or only ends this path. |
| Retry attempts | 5 | How many times to reconnect after the subscription connection fails. |
Account filters: Available under More options.
Account data: Choices: Base64 (base64), Base58 (base58), Base64 + zstd (base64+zstd), JSON parsed (jsonParsed). Available under More options.
Commitment: Choices: Processed (processed), Confirmed (confirmed), Finalized (finalized). Available under More options.
RPC URL: Available under More options.
Timeout (seconds): Available under More options.
On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.
Retry attempts: Available under More options. Limits: minimum 0.
Inputs#
| Port | Value |
|---|---|
in | any |
Outputs#
| Port | Value | Description |
|---|---|---|
out | object | The next changed account owned by the program. |
out fields#
| Field | Type |
|---|---|
programId | string |
accountId | string |
context.slot | number |
account.lamports | string |
account.lamportsNumber | number |
account.owner | string |
account.executable | boolean |
account.rentEpoch | number |
account.space | number |
account.data | any |
account.dataEncoding | string |