getAccountInfo
POST
Returns all information associated with the account of provided Pubkey
param[0]
pubkeystringrequired
Pubkey of account to query, as base-58 encoded string.param[1]
configurationObjectobjectrequired
commitmentstring
The commitment describes how finalized a block is at that point in time.- finalized - the node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
- confirmed - the node will query the most recent block that has been voted on by supermajority of the cluster.
- processed - the node will query its most recent block. Note that the block may still be skipped by the cluster.
encodingstring
Encoding format for Account data.base58 is slow and limited to less than 129 bytes of Account data.base64 will return base64 encoded data for Account data of any size.base64+zstd compresses the Account data using Zstandard and base64-encodes the result.jsonParsed encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data.If jsonParsed is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when the data field is type string.dataSliceobject
Request a slice of the account's data. Data slicing is only available for base58, base64, or base64+zstd encodings.offsetinteger
number of bytes to returnlengthinteger
byte offset from which to start readingminContextSlotstring
The minimum slot that the request can be evaluated at.Responses
idinteger
The request IDjsonrpcstring
The JSON-RPC versionIf the requested account doesn't exist result will be null. Otherwise, an object containing:1. context2. value
An object containing metadata about the current state of the Solana network at the time of the request.
apiVersionstring
The API version used for the requestslotinteger
The slot number at which the request was evaluateddataoneOf
Data associated with the account, either as encoded binary data or JSON format {<program>: <state>} - depending on encoding parameterexecutableboolean
Boolean indicating if the account contains a program (and is strictly read-only)lamportsinteger
Number of lamports assigned to this accountownerstring
base-58 encoded Pubkey of the program this account has been assigned torentEpochinteger
The epoch at which this account will next owe rent, as u64spaceinteger
The data size of the accountcodestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Bad Request"}
cURL
curl -X POST 'https://solana-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "getAccountInfo","params": ["3fJ7AiixCoHhaYzaNn1nNoLZMQnrGSMDNmMN4ZNUMpEa",{"commitment": "processed","encoding": "base58","dataSlice": {"offset": 0,"length": 100},"minContextSlot": "1234567890"}]}'