getAccountInfo

All the specifications for getAccountInfo RPC Method on Solana

Returns all information associated with the account of provided Pubkey

Parameters required for this RPC call

  • The account address for which we are fetching the account info. This is usually provided as a string.

  • configuration object: This contains the following methods.

    • commitment: The commitment describes how finalized a block is at that point in time.

    • encoding: The encoding format of the account data. The options can be base58, base64, base64+zstd, jsonParsed.

    • dataSlice: Requests a part of the account data instead of the full account data. This also has two parameters: length: <usize> - number of bytes to return & offset: <usize> - byte offset from which to start reading.

    • minContextSlot: The minimum slot that the request can be evaluated at.

curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
  POST -H "Content-Type: application/json" -d ' 
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAccountInfo",
    "params": [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      {
        "commitment": "finalized",
        "encoding": "base58"
      }
    ]
  }
'

Last updated

Was this helpful?