OpenInfra.sh is now live - Solana infrastructure, included with every server. LEARN MORE HERE >

OpenInfra.shopeninfra.sh

getTokenLargestAccounts

Returns the 20 largest token accounts for an SPL Token mint.

Request

{  "jsonrpc": "2.0",  "id": 1,  "method": "getTokenLargestAccounts",  "params": [    "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",    {      "commitment": "finalized"    }  ]}

Parameters

ParameterTypeRequiredDescription
pubkeystringYesPubkey of the token Mint to query, as a base-58 encoded string.
commitmentstringNoDesired commitment level. One of processed, confirmed, or finalized. Defaults to finalized.

Commitment levels

ValueDescription
processedReturn data from the highest slot this node has processed on the fork it currently considers best. This is the newest view, but it can still change if the cluster switches forks.
confirmedReturn data from the highest slot that at least two-thirds of active stake has directly voted to confirm. More stable than processed, but a weaker guarantee than finalized.
finalizedReturn data from the highest slot that the cluster recognizes as finalized. The slot has reached maximum vote lockout in validators' vote towers and is recognized by at least two-thirds of active stake. This is the strongest commitment level.

Response

{  "jsonrpc": "2.0",  "result": {    "context": { "apiVersion": "3.1.8", "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}

context

Slot and API version the node used to answer this request.

FieldTypeDescription
slotu64Slot at which the node evaluated this request.
apiVersionstringRPC API version reported by the node. This field may be omitted by older nodes.

value

Array of up to 20 token-balance objects, sorted by descending balance. Each element combines a token-account address with the standard uiTokenAmount fields.

FieldTypeDescription
addressstringToken-account address, as a base-58 encoded string.
amountstringRaw token balance as a base-10 integer string with no decimal point.
decimalsu8Number of decimal places configured on the mint.
uiAmountnumber | nullDecimal-scaled token balance as a floating-point number. Deprecated — prefer uiAmountString.
uiAmountStringstringDecimal-scaled token balance as a string.