getTokenLargestAccounts
Returns the 20 largest accounts of a particular SPL Token type.
https://api.1inch.com/web3/501
Supported on: Solana
Request
Request
object jsonrpc
* string (Enum)JSON-RPC version
2.0
method
* string The method to call
params
array Method parameters
items
any id
* number Request ID
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const response = await fetch('https://api.1inch.com/web3/501', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${API_KEY}`,
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'getTokenLargestAccounts',
params: [],
id: 1,
}),
});
const data = await response.json();
console.log(data);
Response
Token Largest Accounts Response
Token Largest Accounts Response
object context
* object slot
* integer The slot this response corresponds to
apiVersion
string The current solana versions running on the node
additionalProperties
none value
* array items
object address
* string Token account address
amount
* string Raw token amount as string
decimals
* integer Number of decimal places
uiAmount
* any oneOf[0]
null oneOf[1]
number Formatted token amount
uiAmountString
* string Formatted token amount as string
additionalProperties
none additionalProperties
none JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"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"
}
]
}