Yellowstone gRPC - Account Subscriptions
Monitor account changes in real time with Yellowstone gRPC account subscriptions for balances, token accounts, and program state.
Unsupported Field
We don't support the txn_signature field in account subscriptions. It will always return empty.
Filter Fields
account repeated string
Filter by specific account public keys
owner repeated string
Filter by account owner (program ID). Monitors all accounts owned by a program.
memcmp MemcmpFilter
Match byte patterns at specific offsets in account data. Supports bytes, base58, and base64 encoding.
datasize uint64
Filter accounts by their data size in bytes
token_account_state bool
Filter only for SPL token accounts
lamports LamportsFilter
Filter by lamport balance using comparison operators: eq, ne, lt, gt
nonempty_txn_signature optional bool
Only receive updates associated with a transaction
Filter Definition
Request Filter Protobuf
message SubscribeRequestFilterAccounts {
repeated string account = 2;
repeated string owner = 3;
repeated SubscribeRequestFilterAccountsFilter filters = 4;
optional bool nonempty_txn_signature = 5;
}
message SubscribeRequestFilterAccountsFilter {
oneof filter {
SubscribeRequestFilterAccountsFilterMemcmp memcmp = 1;
uint64 datasize = 2;
bool token_account_state = 3;
SubscribeRequestFilterAccountsFilterLamports lamports = 4;
}
}
Response Structure
Response Protobuf
message SubscribeUpdateAccount {
SubscribeUpdateAccountInfo account = 1;
uint64 slot = 2;
bool is_startup = 3;
}
message SubscribeUpdateAccountInfo {
bytes pubkey = 1;
uint64 lamports = 2;
bytes owner = 3;
bool executable = 4;
uint64 rent_epoch = 5;
bytes data = 6;
uint64 write_version = 7;
optional bytes txn_signature = 8; // Not supported -- will return empty
}
Example
Stream token accounts for a specific mint Rust
SubscribeRequest {
accounts: HashMap::from([(
"token_accounts_by_mint".to_string(),
SubscribeRequestFilterAccounts {
filters: vec![
// Filter for SPL token accounts
SubscribeRequestFilterAccountsFilter {
filter: Some(Filter::TokenAccountState(true)),
},
// Match specific mint at offset 0
SubscribeRequestFilterAccountsFilter {
filter: Some(Filter::Memcmp(
SubscribeRequestFilterAccountsFilterMemcmp {
offset: 0,
data: Some(Data::Base58(
"<MINT_ADDRESS>".to_string(),
)),
}
)),
},
],
..Default::default()
},
)]),
commitment: Some(CommitmentLevel::Confirmed as i32),
..Default::default()
}
Open the section overview for the broader context, live navigation, and interactive code examples.
Continue in this section
- Yellowstone gRPC - Compressed Filters — Update Yellowstone account subscriptions without re-sending the full key list using a compressed Cuckoo filter on FluxRPC.
- Yellowstone gRPC - Transaction Subscriptions — Stream confirmed transactions filtered by accounts, signatures, or program involvement using Yellowstone gRPC on FluxRPC.
- Yellowstone gRPC - Block Subscriptions — Receive full block data including transactions, rewards, and metadata with Yellowstone gRPC block subscriptions.
- Yellowstone gRPC - Slot Subscriptions — Track slot progression and chain state with Yellowstone gRPC slot subscriptions for confirmation-aware applications.
- Yellowstone gRPC - Python Guide — Python guide for Yellowstone gRPC on FluxRPC. Generate protocol bindings and connect to streaming data with gRPC tools.
- Yellowstone gRPC - Protocol Reference — Protocol reference for Yellowstone gRPC on FluxRPC, including service definitions and Protocol Buffer message structures.