getSupply RPC method provides information about the current supply of SOL on the Solana network. It details the total supply, circulating supply, non-circulating supply, and can optionally list non-circulating accounts.
Common Use Cases
- Understanding SOL Tokenomics: Get a snapshot of the current distribution of SOL.
- Economic Analysis: Track changes in supply metrics over time.
- Displaying Network Statistics: Provide users with up-to-date information on SOL supply in dashboards or explorers.
- Inflation Monitoring: Although
getInflationRateandgetInflationGovernorprovide more direct inflation data,getSupplycan offer a broader context.
Request Parameters
ThegetSupply method accepts an optional configuration object with the following fields:
commitment(string, optional): Specifies the commitment level for the query. If omitted, the default commitment of the RPC node is used.excludeNonCirculatingAccountsList(boolean, optional): If set totrue, thenonCirculatingAccountsarray will be excluded from the response. Defaults tofalse. This can be useful to reduce response size if the list of individual non-circulating accounts is not needed.
Response Structure
The response is a JSON object with the following fields:value: An object containing the supply information:total(u64): The total SOL supply in lamports.circulating(u64): The circulating SOL supply in lamports.nonCirculating(u64): The non-circulating SOL supply in lamports.nonCirculatingAccounts(array of strings, optional): An array of public keys (as base58 encoded strings) of accounts holding non-circulating SOL. This field is omitted ifexcludeNonCirculatingAccountsListwas set totruein the request.
context: An object containing:slot(u64): The slot at which the information was retrieved.
excludeNonCirculatingAccountsList: false):
excludeNonCirculatingAccountsList: true):
Code Examples
Developer Tips
- Lamports vs. SOL: The amounts are returned in lamports. Remember to divide by
1,000,000,000(1 SOL = 10^9 lamports) to convert to SOL. - Data Freshness: The data reflects the state at the slot indicated in the
contextobject and based on the commitment level used. excludeNonCirculatingAccountsList: Use this option if you only need the aggregate supply numbers to optimize the response size and processing time, especially if the list of non-circulating accounts is very long.- Dynamic Values: The supply figures can change frequently due to token issuance (inflation) and burning mechanisms.
getSupply RPC method to query Solana’s supply data.
Related Methods
getInflationRate
Get the current inflation rate
getInflationGovernor
Get inflation governance parameters