What You’ll Build
By the end of this guide, you’ll have a working gRPC stream that monitors Solana account updates in real-time with automatic reconnection and error handling.1
Choose Your Access Method
Select how you want to access Yellowstone gRPC:
LaserStream
Recommended for most users
- Multi-tenant, highly available
- Automatic failover and backfill
- Quick setup with API key
- Developer+ plan required (devnet), Professional+ (mainnet)
Dedicated Nodes
2
Set Up Your Environment
Create a new project and install dependencies:
3
Get Your Credentials
Obtain your gRPC endpoint and authentication:
- Sign up for Developer+ plan (devnet) or Professional plan (mainnet) at dashboard.helius.dev
- Get your API key from the dashboard
- Choose your regional endpoint:
- US East:
https://laserstream-mainnet-ewr.helius-rpc.com
- US West:
https://laserstream-mainnet-slc.helius-rpc.com
- Europe:
https://laserstream-mainnet-fra.helius-rpc.com
- Asia:
https://laserstream-mainnet-tyo.helius-rpc.com
https://laserstream-devnet-ewr.helius-rpc.com
4
Create Your First Stream
Create a robust stream manager with the following complete example:
Create Create Run your stream:
stream-manager.ts
:main.ts
:5
Test Your Stream
Run your application and verify it’s working:
- Start your stream using the command for your language
- Look for connection confirmation in the console
- Wait for account updates - you should see periodic updates to the USDC mint account
- Test reconnection by temporarily disconnecting your internet
- Verify keepalive by watching for pong messages every 30 seconds
What’s Next?
Now that you have a working gRPC stream, explore these monitoring guides:Account Monitoring
Advanced account filtering and data slicing techniques
Transaction Monitoring
Stream transactions with program filtering and execution details
Slot & Block Monitoring
Monitor network consensus and block production
Stream Pump AMM Data
Real-world example: monitor DeFi protocol data
Troubleshooting
Connection Issues
Connection Issues
Symptoms: Connection timeouts, authentication errorsSolutions:
- Verify your endpoint URL and API key
- Check if your plan includes gRPC access
- Ensure you’re using the correct port (typically 2053 for Dedicated Nodes)
- For LaserStream, make sure you have at least a Developer plan (devnet) or Professional plan (mainnet)
No Data Received
No Data Received
Symptoms: Stream connects but no account updates appearSolutions:
- USDC mint updates are infrequent - try monitoring a more active account
- Check your commitment level (try
PROCESSED
for more frequent updates) - Verify your account filter configuration
- Monitor a token account instead of the mint for more activity
Stream Disconnections
Stream Disconnections
Symptoms: Frequent disconnections, reconnection loopsSolutions:
- Implement exponential backoff (included in examples above)
- Check network stability
- Ensure keepalive pings are working (every 30 seconds)
- Monitor server-side rate limits
Best Practices
Production Readiness Checklist:
- ✅ Implement exponential backoff for reconnections
- ✅ Use keepalive pings every 30 seconds
- ✅ Handle all stream events (data, error, end, close)
- ✅ Process data asynchronously to avoid blocking
- ✅ Monitor connection health and alert on failures
- ✅ Use appropriate commitment levels for your use case
- ✅ Filter data as specifically as possible to reduce bandwidth