curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
"method": "getTokenSupply",
"params": [
"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
]
}
'{
"jsonrpc": "2.0",
"id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "100000",
"decimals": 2,
"uiAmount": 1000,
"uiAmountString": "1000"
}
}
}Returns the total supply of an SPL Token type
curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
"method": "getTokenSupply",
"params": [
"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
]
}
'{
"jsonrpc": "2.0",
"id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "100000",
"decimals": 2,
"uiAmount": 1000,
"uiAmountString": "1000"
}
}
}The JSON-RPC protocol version.
2.0 "2.0"
A unique identifier for the request.
"1"
The name of the RPC method to invoke.
getTokenSupply "getTokenSupply"
Parameters for querying the token supply.
Solana token mint address to retrieve supply metrics for (SPL token's unique identifier).
"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
Successfully retrieved the token supply.
The JSON-RPC protocol version.
2.0 "2.0"
Identifier matching the request.
"1"
Context and token supply details.
Show child attributes
Token supply details.
Show child attributes
The raw total Solana token supply as a precise integer string without decimal formatting.
"100000"
Number of decimal places defined by the token for accurate supply representation.
2
The human-readable token supply with proper decimal formatting (deprecated).
1000
The canonical string representation of the total token supply with correct decimal places.
"1000"
Was this page helpful?