Returns the total supply of tokens for a given SPL token mint address.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenSupply",
"params": ["Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"]
}
Parameters
Base-58 encoded public key of the token mint to query.
Commitment level for the query. One of processed, confirmed, or finalized.
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": { "slot": 1114 },
"value": {
"amount": "100000",
"decimals": 2,
"uiAmount": 1000.0,
"uiAmountString": "1000"
}
}
}
Total supply as a string, without decimal adjustment.
Number of decimal places for this token.
Total supply as a float, adjusted for decimals. May be null if the value overflows a float.
Total supply as a string, adjusted for decimals.
Example
curl "https://rpc.solami.fast/sol?api_key=YOUR_API_KEY" \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenSupply",
"params": ["Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"]
}'