Skip to main content
Returns all information associated with the account of provided public key.

Parameters

string
required
The public key of the account to query (base-58 encoded string)
object
Configuration object containing the following optional fields:

Response

object | null
If the requested account doesn’t exist, returns null. Otherwise, returns an object containing:

Code Examples

Basic Request

Response

Request with Data Slice

Using web3.js

Notes

  1. The jsonParsed encoding is only available for certain account types:
    • Stake account
    • Token account
    • Token mint
    • Token metadata
  2. When using dataSlice, the data field will be limited to the requested slice only.
  3. The account data may be encoded differently based on the program that owns the account.

Common Errors