Transaction subscriptions allow you to monitor Solana transactions in real-time. This is crucial for DEX integrations, wallet monitoring, program event tracking, and transaction-based analytics.
Transaction subscriptions provide real-time updates for transactions matching your filter criteria. You can filter by:
- Transactions involving specific accounts
- Transactions calling specific programs
- Vote vs non-vote transactions
- Failed vs successful transactions
- Complex account inclusion/exclusion rules
message SubscribeRequestFilterTransactions {
optional bool vote = 1;
optional bool failed = 2;
optional string signature = 3;
repeated string account_include = 4;
repeated string account_exclude = 5;
repeated string account_required = 6;
}Control whether to include vote transactions (validator voting).
Field: vote
Type: optional bool
Values:
true- Only vote transactionsfalse- Only non-vote transactionsnull(unset) - Both vote and non-vote transactions
Use Cases:
- Set to
falsefor most application use cases (excludes validator voting spam) - Set to
trueonly for validator monitoring or consensus analytics
Control whether to include failed transactions.
Field: failed
Type: optional bool
Values:
true- Only failed transactionsfalse- Only successful transactionsnull(unset) - Both successful and failed transactions
Use Cases:
- Set to
falseto monitor only successful transactions - Set to
trueto analyze failure patterns - Leave unset to see all transaction attempts
Filter for a specific transaction signature.
Field: signature
Type: optional string
Use Cases:
- Track a specific transaction through confirmation stages
- Monitor a transaction you just submitted
- Verify transaction inclusion
Note: This filter is rarely used in streaming contexts because you must know the transaction signature ahead of time.
If you want to track the confirmation status of a transaction you are about to send (for example, a payment or program interaction), you can set up a subscription for the expected signature before submitting the transaction. This way, you will receive real-time updates as soon as the transaction is processed by the network.
Receive transactions involving any of these accounts.
Field: account_include
Type: repeated string
Behavior: Transaction matches if it involves any of the specified accounts.
Use Cases:
- Monitor a user's wallet for any activity
- Track transactions for a set of token accounts
- Watch multiple DEX programs
Exclude transactions involving these accounts.
Field: account_exclude
Type: repeated string
Behavior: Transaction is excluded if it involves any of these accounts.
Use Cases:
- Exclude noise from specific accounts
- Filter out unwanted program interactions
- Remove specific token account activity
Require all of these accounts to be present.
Field: account_required
Type: repeated string
Behavior: Transaction matches only if it involves all specified accounts.
Use Cases:
- Match specific program interactions (program + user account)
- Find transactions involving multiple specific accounts
- Narrow down to very specific transaction patterns
Account filters work together:
- Transaction must include at least one
account_include(if specified) - Transaction must not include any
account_exclude(if specified) - Transaction must include all
account_required(if specified)
Example Logic:
if account_include is set:
must match at least one
if account_exclude is set:
must match none
if account_required is set:
must match allTransaction updates arrive as SubscribeUpdateTransaction messages:
message SubscribeUpdateTransaction {
SubscribeUpdateTransactionInfo transaction = 1;
uint64 slot = 2;
}
message SubscribeUpdateTransactionInfo {
bytes signature = 1;
bool is_vote = 2;
solana.storage.ConfirmedBlock.Transaction transaction = 3;
solana.storage.ConfirmedBlock.TransactionStatusMeta meta = 4;
uint64 index = 5;
}signature: Transaction signature (unique identifier)
is_vote: Whether this is a vote transaction
meta: Transaction metadata including status, fees, logs, and account changes
transaction: The full transaction data including instructions
slot: Slot number where transaction was included
index: Transaction index within the block