Skip to main content

getTokenLargestAccounts RPC Method

Returns the 20 largest accounts of a particular SPL Token type.

params

string required Pubkey of account owner to query, as base-58 encoded string object required A JSON object with one of the following fields:

commitment

The commitment describes how finalized a block is at that point in time. See Configuring State Commitment.

result

array An array of JSON objects containing:

address

The address of the token account

amount

The raw token account balance without decimals, a string representation of u64

decimals

Number of base 10 digits to the right of the decimal place

uiAmount

The token account balance, using mint-prescribed decimals DEPRECATED

uiAmountString

The token account balance as a string, using mint-prescribed decimals

cURL

curl https://us-seattle.openverse.network/api -s -X \
POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenLargestAccounts",
"params": [
"3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E"
]
}
'

Response

{
"jsonrpc": "2.0",
"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"
}
]
},
"id": 1
}