Supply & Inflation
getLargestAccounts
Returns the 20 largest accounts, by lamport balance
Parameters
Configuration object containing the following optional fields:
Response
Code Examples
Basic Request
Request with Filter
Using web3.js
Notes
- Returns the top 20 accounts by lamport balance
- Results are sorted in descending order by balance
- Circulating accounts are those not owned by the system program
- Non-circulating accounts are typically owned by the system program
- The response is immediate as it reads from the current state
Best Practices
- Use appropriate commitment level based on your needs:
processed
for UI updatesconfirmed
for most operationsfinalized
for critical operations
- Use the
filter
parameter to focus on relevant accounts - Convert lamports to SOL by dividing by 1e9 when displaying to users
- Consider caching results for UI updates to reduce RPC load
Common Errors
Code | Message | Solution |
---|---|---|
-32602 | Invalid param: Invalid filter | Use either ‘circulating’ or ‘nonCirculating’ |
-32601 | Method not found | Verify you’re connected to a Solana RPC node |
-32007 | Account information unavailable | Node may be bootstrapping or syncing |
Use Cases
-
Network Analysis
-
Token Distribution Monitoring
-
Whale Watching