Node reference
Account subscribe
Stream account changes
Account subscribe listens for changes to one Solana account. Use it when a workflow should react to new account data rather than repeatedly reading a snapshot.
Try it step by step#
- Enter an account address on the selected network and keep the default encoding for the first run.
- Connect a Variable or Code node to inspect each notification. Start the workflow and wait for a change to the account.
- Inspect account and context.slot, then stop the workflow when you finish observing.
What to expect#
Each notification identifies the address, slot, and account data. An unchanged account can produce no output during your observation period.
Things to check#
- Encoding affects account.data. Base64 is encoded bytes; it is not automatically decoded into token or program fields.
- The RPC route must support subscriptions. An HTTP read working does not establish that a subscription is available.
- Timeout 0 allows the listener to wait until it is stopped.
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 |
|---|---|---|
| Account address | — | Public address to read or observe on the selected Solana network. |
| 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 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 account change notification. |
out fields#
| Field | Type |
|---|---|
address | 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 |