getSupply – Solana
The getSupply JSON-RPC method retrieves information about the current supply of Solana (SOL), including total, circulating, and non-circulating supplies.
The getSupply RPC Solana method provides details on the current supply distribution in the Solana blockchain.
It supports an optional parameters object for customizing the request, such as excluding non-circulating account details for performance optimization.
This method is useful for developers building dashboards, analytics tools, and financial services that rely on accurate blockchain supply data via Solana's Core API.
Supported Networks
This method is available on the following API endpoints:
Mainnet
Devnet
Parameters
Optional Parameters
object (optional): A configuration object containing:
commitment (string, optional): Defines the level of finality for the request.
excludeNonCirculatingAccountsList (bool, optional): If set to true, excludes the list of non-circulating accounts from the response.
Result
The response returns an RpcResponse object containing:
context (object): Contextual information about the slot.
slot (u64): The slot number when the supply data was retrieved.
value (object):
total (u64): Total supply of SOL in lamports.
circulating (u64): Circulating supply in lamports.
nonCirculating (u64): Non-circulating supply in lamports.
nonCirculatingAccounts (array): An array of account addresses holding non-circulating supply.
Request Example
API Endpoints
cURL Example
Response
A successful request returns the current supply information.
Example Response
Error Handling
Common getSupply error scenarios:
Invalid parameters: If the request contains malformed or incorrect parameters.
Network errors: Connectivity issues with the Solana JSON-RPC API endpoints.
Example Error Response
Use Cases
The Solana getSupply method is useful for:
Validators and node operators: Monitoring total and circulating supply.
Wallet applications: Displaying supply metrics to users.
Web3 analytics tools: Analyzing supply trends and distributions.
Blockchain explorers: Displaying real-time supply statistics.
Code getSupply Example – Web3 Integration
Integration with Web3
By integrating Web3 getSupply into Solana’s Core API, developers can track blockchain supply metrics, analyze transaction activity, and monitor circulating and non-circulating supply dynamics. This JSON-RPC method is essential for applications that need accurate supply information for financial reporting and analytics.
Last updated