Quickstart
Get started with Helius data streaming in minutes.
Overview
This guide will help you get started with Helius data streaming using standard WebSockets. It includes basic examples for the most common use cases.
Prerequisites
- A Helius API key (sign up on the Helius dashboard if you don’t have one)
- Basic knowledge of JavaScript and WebSockets
Setting Up a WebSocket Connection
First, let’s set up a basic WebSocket connection to Helius:
Replace YOUR_API_KEY
with your actual Helius API key.
Subscribing to Account Updates
To receive updates whenever an account changes:
Subscribing to Program Updates
To receive notifications when any account owned by a program changes:
Subscribing to Transaction Signatures
To track the status of a specific transaction:
Subscribing to Log Messages
To receive log messages that match specific filters:
Unsubscribing
To stop receiving updates for a subscription:
Next Steps
This quickstart covers the basics of using Helius data streaming with standard WebSockets. For more advanced streaming capabilities, consider:
- LaserStream - Our premium streaming solution with historical replay and multiple protocol options
- Enhanced WebSockets - Faster WebSockets with additional subscription methods
- gRPC Streaming - High-performance binary protocol for backend applications
For a complete reference of all WebSocket methods, see the WebSocket documentation.