Getting Data
How to get accounts
Learn how to fetch Solana account data using Helius APIs
Solana accounts store all raw data on the blockchain. This guide demonstrates how to efficiently retrieve account data using Helius APIs.
Using RPC Methods
The most direct way to read account data is through Solana RPC methods:
API Reference
getAccountInfo
Common Parameters
encoding
: Choose frombase58
,base64
, orjsonParsed
(recommended)commitment
: Data consistency level (processed
,confirmed
, orfinalized
)dataSlice
: Fetch only a specific portion of the account data
Getting Multiple Accounts
For batch retrieval, use getMultipleAccounts
:
API Reference
getMultipleAccounts
Best Practices
- Use account subscriptions via WebSockets for real-time updates
- For large-scale data needs, consider using the Helius DAS API or LaserStream
- Cache account data when appropriate to reduce API calls