getSupply
https://api.triport.io/v1/solReturns information about the current supply of SOL, broken down into circulating and non-circulating lamports.
getSupply reports the total supply of SOL on the cluster, split into the
circulating and non-circulating portions. All amounts are returned in
lamports (1 SOL = 1,000,000,000 lamports), so divide each figure by 1e9
to display a SOL amount.
The supply is reported relative to a particular slot, returned in the context
object. Use the optional commitment config to control how finalized that slot
must be.
By default the response also includes nonCirculatingAccounts — the list of
account public keys whose balances make up the non-circulating supply. This list
can be large; set excludeNonCirculatingAccountsList: true to suppress it and
return an empty array, which keeps the response small when you only need the
aggregate totals.
Parameters
JSON-RPC params is a positional array with a single optional element:
[config?].
configobjectoptionalcommitmentstringoptionalprocessed, confirmed, or finalized.excludeNonCirculatingAccountsListbooleanoptionaltrue, omit the nonCirculatingAccounts list from the response (returned as an empty array).Response
Response fields
| Field | Type | Description |
|---|---|---|
result | object | SupplyResponse envelope. |
result.context | object | The context the response was evaluated against. |
result.context.slot | integer | The slot at which the supply was read. |
result.context.apiVersion | string | The node software version that served the request. |
result.value | object | The supply breakdown. |
result.value.circulating | integer | Circulating supply, in lamports. |
result.value.nonCirculating | integer | Non-circulating supply, in lamports. |
result.value.nonCirculatingAccounts | array of string | Public keys of the non-circulating accounts. Empty when excludeNonCirculatingAccountsList is true. |
result.value.total | integer | Total supply, in lamports (circulating + nonCirculating). |
Errors
Errors are returned in the standard JSON-RPC error envelope. See the shared errors reference for the full envelope shape and shared codes.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | config is malformed (e.g. commitment is not a known level). |
-32003 | Rate limited | More than your tier's RPS for sol_read_rpc (20 / 60 / 200 / 600). Returned with HTTP 429. |
401 | Unauthorized | Missing or invalid Authorization: Bearer key. |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/sol", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getSupply",
params: [{ commitment: "finalized", excludeNonCirculatingAccountsList: true }],
}),
});
const { result } = await res.json();
console.log(`Total supply: ${result.value.total / 1e9} SOL`);
console.log(`Circulating: ${result.value.circulating / 1e9} SOL`);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY });
const { context, value } = await client.solana.getSupply({
commitment: "finalized",
excludeNonCirculatingAccountsList: true,
});
console.log(`Total supply: ${value.total / 1e9} SOL (slot ${context.slot})`);Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
result = client.solana.get_supply(
commitment="finalized",
exclude_non_circulating_accounts_list=True,
)
value = result["value"]
print(f"Total supply: {value['total'] / 1e9} SOL")
print(f"Circulating: {value['circulating'] / 1e9} SOL")Notes
- Lamports, not SOL: every amount (
circulating,nonCirculating,total) is an integer count of lamports. Divide by1e9for a SOL figure. - Trim large payloads: the
nonCirculatingAccountslist can contain many entries. PassexcludeNonCirculatingAccountsList: truewhen you only need the aggregate totals — the field is then returned as an empty array. - Commitment defaults: when
commitmentis omitted, the node's default commitment applies. Passfinalizedfor the strongest consistency guarantee. - Related methods: use
getBalanceto read a single account's lamport balance, andgetEpochInfo/getInflationRatefor epoch- and inflation-level context around supply changes.