Solana
Solana
Solana
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
On Solana — the high-throughput chain whose native token is SOL — getTokenSupply returns the total supply of a token mint, summed across every account that holds it. The figure comes straight from the SPL Token (or Token-2022) mint account, so it reflects all mints and burns recorded on chain. Send a JSON-RPC 2.0 request with positional params to https://solana.therpc.io/YOUR_API_KEY, passing the mint address, and you get back the raw amount, the mint's decimals, and a uiAmountString.
finalized commitment for stable numbers.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | mint | string | Ja | Base-58 token mint address. |
| 2 | config | object | Nein | Options: commitment. |
| Typ | Beschreibung |
|---|---|
| object | RpcResponse wrapping { amount, decimals, uiAmount, uiAmountString }. |
| Code | Meldung | Ursache |
|---|---|---|
-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. |
amount is a raw integer string in the mint's smallest unit — divide by 10 to the power of decimals, or just read uiAmountString, to get the human figure.