Skip to main content
Returns all on-chain data for a single account identified by its public key. Returns null in value if the account does not exist.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAccountInfo",
  "params": [
    "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
    { "encoding": "base64" }
  ]
}

Parameters

pubkey
string
required
Base-58 encoded public key of the account to query.
commitment
string
Commitment level for the query. One of processed, confirmed, or finalized.
encoding
string
Encoding for the account data field. One of base58, base64, base64+zstd, or jsonParsed. Defaults to base64.

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": { "slot": 341197053 },
    "value": {
      "data": ["", "base64"],
      "executable": false,
      "lamports": 88849814690250,
      "owner": "11111111111111111111111111111111",
      "rentEpoch": 18446744073709551615,
      "space": 0
    }
  }
}
value
object | null
The account object, or null if the account does not exist.
value.lamports
number
Account balance in lamports (1 SOL = 1,000,000,000 lamports).
value.owner
string
Base-58 encoded public key of the program that owns this account.
value.executable
boolean
Whether this account contains a program and is strictly read-only.
value.data
array | object
Account data encoded per the requested encoding. For jsonParsed, this is an object.
value.rentEpoch
number
The epoch at which this account will next owe rent.
value.space
number
The data size of the account in bytes.

Example

curl "https://rpc.solami.fast/sol?api_key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAccountInfo",
    "params": [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      { "encoding": "base64" }
    ]
  }'