getAccountInfo - Solana

getAccountInfo. Retrieves detailed information about a specific account on the Solana blockchain

getAccountInfo - solana [Value: 10CU]
Retrieves detailed information about a specific account on the Solana blockchain.
Use cases

Use cases

  • Monitor account balance changes for Solana applications
  • Verify ownership details of a Solana account
  • Retrieve account state for application-specific data
Constraints

Constraints

  • Requires valid Solana account public key
  • Network latency can affect response time
  • Program-specific data structures may vary significantly
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --location --request POST 'https://solana.drpc.org' \
--header 'Content-Type: application/json' \
--data-raw '  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAccountInfo",
    "params": [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      {
        "encoding": "base58"
      }
    ]
  }'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 84768334
    },
    "value": {
      "data": {
        "parsed": {
          "info": {
            "owner": "11111111111111111111111111111111",
            "lamports": 1000000000,
            "rentEpoch": 23,
            "data": []
          },
          "type": "account"
        },
        "program": "system",
        "space": 0
      },
      "executable": false,
      "lamports": 1000000000,
      "owner": "11111111111111111111111111111111",
      "rentEpoch": 23
    }
  },
  "id": 1
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
accountPublicKeystring
The public key of the account to query.
encodingstring
Specifies the data encoding for the returned account information
dataSliceobject
Limits the returned account data based on the specified offset and length fields. Available only for "base58", "base64", or "base64+zstd" encodings.
configobject
Configuration object containing optional parameters:
array
encodingstring
Specifies the data encoding for the returned account information
dataSliceobject
Limits the returned account data based on the specified offset and length fields. Available only for "base58", "base64", or "base64+zstd" encodings.

Response

200
Contains detailed information about the account

Response params

object
idinteger
jsonrpcstring
resultstring
object
slotint64
valueobject
object
lamportsint64
The number of lamports (smallest unit of SOL) assigned to this account.
ownerstring
Base-58 encoded public key of the program assigned to this account
datastring
Data associated with the account, either as encoded binary data or in JSON format, depending on the specified encoding. Format: [data, encoding] or JSON object
executablestring
dicates if the account contains a program and is read-only.
rentEpochstring
The epoch at which this account will next owe rent.