getAccountInfo
Returns all information associated with the account of provided Pubkey.
https://api.1inch.com/web3/501
Supported on: Solana
Parameters
Pubkey (required)
Pubkey
* string Pubkey of account to query, as base-58 encoded string
Configuration
Configuration
object commitment
string (Enum)The commitment describes how finalized a block is at that point in time
processed
confirmed
finalized
encoding
string (Enum)base58
base64
base64+zstd
jsonParsed
dataSlice
object offset
* integer length
* integer additionalProperties
none minContextSlot
integer The minimum slot that the request can be evaluated at
additionalProperties
none Request
Request
object jsonrpc
* string (Enum)JSON-RPC version
2.0
method
* string The method to call
params
array Method parameters
items
any oneOf[0]
string Pubkey of account to query, as base-58 encoded string
oneOf[1]
object commitment
string (Enum)The commitment describes how finalized a block is at that point in time
processed
confirmed
finalized
encoding
string (Enum)base58
base64
base64+zstd
jsonParsed
dataSlice
object offset
* integer length
* integer additionalProperties
none minContextSlot
integer The minimum slot that the request can be evaluated at
additionalProperties
none id
* number Request ID
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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: 'getAccountInfo',
params: [
'string',
{
commitment: 'processed',
encoding: 'base58',
dataSlice: {
offset: 0,
length: 0,
},
minContextSlot: 0,
},
],
id: 1,
}),
});
const data = await response.json();
console.log(data);
Response
Account Info Response
Account Info 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
* any oneOf[0]
null oneOf[1]
object data
* array items
any executable
* boolean Boolean indicating if the account contains a program
lamports
* integer Number of lamports assigned to this account
owner
* string Base-58 encoded Pubkey of the program this account has been assigned to
rentEpoch
* integer The epoch at which this account will next owe rent
space
* integer Number of bytes allocated to the account data
additionalProperties
none additionalProperties
none JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"context": {
"slot": 1
},
"value": {
"data": ["", "base58"],
"executable": false,
"lamports": 1000000000,
"owner": "11111111111111111111111111111111",
"rentEpoch": 2
}
}