Skip to main content
This guide documents the open Yellowstone gRPC protocol. For the LaserStream-flavored version with the helius-laserstream SDK, see LaserStream → Transaction Monitoring.

Overview

Transaction monitoring enables you to track transaction execution, success/failure status, program interactions, and token balance changes across Solana in real-time. This guide covers filtering strategies and practical implementations for different transaction monitoring use cases.
Prerequisites: This guide assumes you’ve completed the Yellowstone gRPC Quickstart and have a working stream setup.

Transaction Filtering Options

Monitor transactions involving specific programsTrack all transactions that interact with your programs:
Best for: Program-specific monitoring, DeFi protocol tracking, smart contract interactions

Practical Examples

Example 1: Monitor DEX Transactions

Track all transactions involving popular DEX programs:

Example 2: Monitor Failed Transactions

Track failed transactions to identify issues:

Example 3: Monitor High-Value Transactions

Track transactions with significant SOL transfers:

Transaction Data Structure

Understanding the transaction data structure helps extract relevant information:
Core transaction data:
Token balance structure:
Program instruction structure:

Filter Logic Reference

Include Logic (OR)

accountInclude: Transaction must involve ANY of these accountsExample: ["A", "B"] matches transactions involving account A OR account B

Required Logic (AND)

accountRequired: Transaction must involve ALL of these accountsExample: ["A", "B"] matches transactions involving account A AND account B

Exclude Logic (NOT)

accountExclude: Transaction must NOT involve any of these accountsExample: ["A", "B"] excludes transactions involving account A or account B

Combined Logic

Final filter: (accountInclude OR empty) AND (accountRequired AND all) AND NOT (accountExclude OR any)

Performance Considerations

Transaction streams can be high-volume
  • Start with specific program filters
  • Use commitment levels appropriately
  • Monitor your processing capacity
  • Implement backpressure handling

Error Handling

Common transaction monitoring errors and solutions:
Error: Overwhelming transaction volumeSolutions:
  • Add more specific filters (accountRequired, accountExclude)
  • Use higher commitment levels to reduce volume
  • Implement sampling or rate limiting
  • Process transactions asynchronously
Error: Expected transactions not appearingSolutions:
  • Verify program addresses are correct
  • Check if transactions actually occur
  • Try PROCESSED commitment for faster updates
  • Ensure filters aren’t too restrictive
Error: Cannot parse transaction dataSolutions:
  • Handle missing fields gracefully
  • Validate data structure before processing
  • Log problematic transactions for debugging
  • Use try-catch blocks around parsing logic

Next Steps

Slot & Block Monitoring

Learn to monitor network consensus and block production

Advanced Patterns

Real-world example: monitoring Pump AMM data