getAccountInfo
Solana node API
getAccountInfo | Solana
The Solana getAccountInfo method returns all the account data for a given public key. Available on Solana via Chainstack JSON-RPC nodes.
POST
getAccountInfo
The Solana
getAccountInfo method returns all the account data for a given public key.
This method provides detailed information about the account, including the account’s current balance, owner, and executable state. It is useful for retrieving the state of an account at a specific commitment level.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
pubkey(string, required) — the base-58 encoded public key of the account to query.config(object, optional) — configuration object containing:commitment(string) — the level of commitment desired:processed— the node has processed the block and the block may be on a fork.confirmed— the block is confirmed by the cluster as not being on a fork.finalized— the block is finalized by the cluster.
encoding(string) — encoding for the account data. Values:base64— raw bytes as a base64 string (default).base58— raw bytes as a base58 string (slow for large data).base64+zstd— zstd-compressed base64.jsonParsed— returns parsed JSON for known account types (token accounts, nonce accounts, vote accounts, stake accounts, etc.). Falls back tobase64for unknown programs.
dataSlice(object) — request a slice of the account’s data. Containsoffset(byte offset) andlength(number of bytes). Only available for non-jsonParsedencodings.minContextSlot(integer) — the minimum slot at which the request can be evaluated.
Response
context— an object containingslotandapiVersion.value— the account information (null if the account does not exist):lamports(u64) — the account’s current balance in lamports.owner(string) — the base-58 encoded public key of the program that owns the account.executable(boolean) — whether the account is marked as executable.rentEpoch(u64) — the epoch at which this account will next owe rent.data— the account’s data in the requested encoding:- Default:
[data, encoding]tuple (e.g.,["base64data...", "base64"]). - With
jsonParsed: a{program, parsed, space}object. Theprogramfield identifies the owning program (spl-token,spl-token-2022,nonce,stake,vote, etc.) andparsedcontains the decoded account state.
- Default:
space(u64) — the data size of the account in bytes.
Use case
A practical use case forgetAccountInfo is to retrieve the current state of any Solana account — balances, token account data, program state, or nonce accounts. Using jsonParsed encoding is especially useful for token accounts, as it returns the mint, owner, balance, delegate, and state without manual deserialization.Last modified on May 18, 2026