getMultipleCompressedAccounts

Returns multiple compressed accounts with the given addresses or hashes.

post
Body
idstring · enumrequired

An ID to identify the request.

Options: test-account
jsonrpcstring · enumrequired

The version of the JSON-RPC protocol.

Options: 2.0
methodstring · enumrequired

The name of the method to invoke.

Options: getMultipleCompressedAccounts
paramsobject · default: {"addresses":null,"hashes":["1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM","1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh"]}required

Request for compressed account data

Example: {"addresses":null,"hashes":["1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM","1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh"]}

Responses
curl -L \
  --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=<api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "test-account",
    "jsonrpc": "2.0",
    "method": "getMultipleCompressedAccounts",
    "params": {
      "addresses": null,
      "hashes": [
        "1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM",
        "1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh"
      ]
    }
  }'
{
  "context": {
    "slot": 100
  },
  "value": {
    "items": [
      {
        "address": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
        "data": {
          "data": "SGVsbG8sIFdvcmxkIQ==",
          "dataHash": "11111117SQekjmcMtR25wEPPiL6m1Mb5586NkLL4X",
          "discriminator": 100
        },
        "hash": "11111117SQekjmcMtR25wEPPiL6m1Mb5586NkLL4X",
        "lamports": 100,
        "leafIndex": 100,
        "owner": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
        "seq": 100,
        "slotCreated": 100,
        "tree": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB"
      }
    ]
  }
}

Last updated

Was this helpful?