Solana
Solana
Solana
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
getSupply returns a snapshot of the SOL supply on Solana — how much of the native token exists and how much of it is actually in circulation. Because SOL is continuously minted through staking inflation, the supply moves over time, and this method gives you the current figures. POST a JSON-RPC 2.0 request to https://solana.therpc.io/YOUR_API_KEY and the node returns an RpcResponse whose value holds total (all SOL in existence), circulating (the freely transferable portion), nonCirculating (locked or reserved SOL), and nonCirculatingAccounts (the list of accounts counted as non-circulating). All amounts are reported in lamports.
value.circulating from lamports to SOL and multiplying by a price feed — the right denominator for market-cap math rather than total supply.circulating and nonCirculating SOL over time to monitor how much of the supply is locked or reserved versus liquid.value.total as the replacement for the legacy getTotalSupply method, which no longer exists; the total SOL figure now lives inside this response.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | config | object | No | Options: commitment, excludeNonCirculatingAccountsList (bool). |
| Tipo | Descripción |
|---|---|
| object | RpcResponse wrapping { total, circulating, nonCirculating, nonCirculatingAccounts }. |
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
total, circulating, and nonCirculating — is in lamports. Divide by 1,000,000,000 (1e9) to get SOL, and use a big-integer or decimal type so you do not lose precision on these large numbers.nonCirculatingAccounts list can be long and bloat the response. Pass excludeNonCirculatingAccountsList: true in the config object when you only need the supply totals, to return an empty list and lighten the payload.