⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
sol
Solana (SOL)

Method: POST getTokenSupply

dropdown

# getTokenSupply example for Solana (SOL)

POST getTokenSupply

Returns the total supply of an SPL Token type.

Parameters

Pubkey - string

Pubkey of token Mint to query, as base-58 encoded string

commitment - object

Optional.

Commitment.

Request

curl --location --request POST 'https://sol.getblock.io/mainnet' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "getTokenSupply",
"params": ["3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E", null],
"id": "getblock.io"}'


Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "context": {
            "slot": 1114
        },
        "value": {
            "amount": "100000",
            "decimals": 2,
            "uiAmount": 1000,
            "uiAmountString": "1000"
        }
    }
}