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

coins coins coins coins
sol
Solana (SOL)

Method: POST getTokenLargestAccounts

dropdown

# getTokenLargestAccounts example for Solana (SOL)

POST getTokenLargestAccounts

Returns the 20 largest accounts of a particular 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": "getTokenLargestAccounts",
"params": ["3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E", null],
"id": "getblock.io"}'


Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "context": {
            "slot": 1114
        },
        "value": [
            {
                "address": "FYjHNoFtSQ5uijKrZFyYAxvEr87hsKXkXcxkcmkBAf4r",
                "amount": "771",
                "decimals": 2,
                "uiAmount": 7.71,
                "uiAmountString": "7.71"
            },
            {
                "address": "BnsywxTcaYeNUtzrPxQUvzAWxfzZe3ZLUJ4wMMuLESnu",
                "amount": "229",
                "decimals": 2,
                "uiAmount": 2.29,
                "uiAmountString": "2.29"
            }
        ]
    }
}