Supply & Inflation
getSupply
Returns the current supply of SOL
Parameters
Response
Code Examples
Basic Request
Using web3.js
Notes
- Returns the current supply of SOL in lamports
- The supply is broken down into total, circulating, and non-circulating amounts
- The response is immediate as it reads from the current state
- The supply can change with network activity and inflation
- Non-circulating accounts are typically controlled by the Solana Foundation
Best Practices
- Use appropriate commitment level based on your needs
- Cache results when appropriate to reduce RPC load
- Monitor for changes in the supply
- Consider using websocket subscription for real-time updates
- Handle network errors and retry when appropriate
Common Errors
Code | Message | Solution |
---|---|---|
-32601 | Method not found | Verify you’re connected to a Solana RPC node |
-32602 | Invalid params | Check configuration parameters |
-32007 | Supply information unavailable | Node may be bootstrapping or syncing |
Use Cases
-
Supply Analysis
-
Supply Monitoring
-
Supply Planning