Overview
Account messages contain information about Solana account updates. These messages are sent when accounts matching your subscription filters are modified.SubscribeUpdateAccount
Wrapper message for account updates in the subscription stream.Fields
The detailed account information including pubkey, data, owner, and other metadata.
The slot number when this account update occurred.
Indicates whether this update is from the initial startup load. If true, this account state existed before your subscription started. If false, this is a new update that occurred during your subscription.Useful for distinguishing between:
- Historical state (loaded during startup)
- Real-time updates (occurred after subscription)
Example
SubscribeUpdateAccountInfo
Detailed account information.Fields
The public key (address) of the account as 32 bytes. Convert to base58 for the familiar Solana address format.
The account’s lamport balance. 1 SOL = 1,000,000,000 lamports.
The public key of the program that owns this account, as 32 bytes. This program has write access to the account’s data.Common owners:
11111111111111111111111111111111- System Program (regular wallets)TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA- SPL Token ProgramATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL- Associated Token Account Program
Whether this account contains executable program code. True for program accounts, false for data accounts.
The epoch at which this account will next owe rent. Most accounts are now rent-exempt.
The raw account data as bytes. The structure of this data depends on the owning program.
- For token accounts: Contains mint address, owner, and balance
- For program accounts: Contains executable code
- For custom programs: Contains program-specific state
accounts_data_slice in your subscription request.An incrementing version number that increases each time the account is modified. Useful for:
- Detecting concurrent modifications
- Ordering updates
- Implementing optimistic locking
Optional transaction signature (64 bytes) of the transaction that caused this account update. Only present for updates caused by transactions, not for startup loads.This field helps you:
- Link account changes to specific transactions
- Filter out startup account loads (when null)
- Track the origin of state changes
Example: Token Account
Example: System Account (Wallet)
Example: Program Account
Data Slicing
You can request only portions of account data usingaccounts_data_slice in your SubscribeRequest:
Processing Account Updates
Filtering Startup vs Real-Time Updates
Tracking Transaction Origins
Decoding Token Account Data
For SPL token accounts, the data field contains:- Bytes 0-31: Mint address
- Bytes 32-63: Owner address
- Bytes 64-71: Amount (uint64, little-endian)
- Byte 72: Delegate option
- Bytes 73-104: Delegate address (if present)
- Byte 105: State (0=Uninitialized, 1=Initialized, 2=Frozen)
- And more…
Related
- Filter Messages - Account filter configuration
- SubscribeRequest - How to subscribe to account updates
- SubscribeUpdate - Parent message containing account updates