Carpool
WebsiteTwitter
  • 👋Welcome
    • 🚘What is Carpool?
    • ☕Getting Started
  • 📘Guides
    • 🔖Onboarding Programs
    • ❓Querying
    • 🚨Alerting
    • 📖Organization Management
  • ⚙️API Reference
    • 📚About our Query API
    • 📝Instructions
      • LIST_INSTRUCTIONS
      • GET_INSTRUCTION
      • GET_INSTRUCTIONS_IN_TRANSACTION
      • GET_INSTRUCTIONS_INVOLVING_ACCOUNT
      • SEARCH_INSTRUCTION_LOGS
      • SEARCH_INSTRUCTIONS
      • COUNT_INSTRUCTIONS
      • FIELD_STATISTIC_INSTRUCTION
      • MOST_COMMON_VALUES_INSTRUCTION
      • MOST_COMMON_ACCOUNTS_INSTRUCTION
    • 🗄️Accounts
      • LIST_ACCOUNTS
      • GET_ACCOUNT
      • GET_ACCOUNTS_WITH_LAMPORTS
      • SEARCH_ACCOUNTS
      • COUNT_ACCOUNTS
      • FIELD_STATISTIC_ACCOUNT
      • MOST_COMMON_VALUES_ACCOUNT
    • ⏳Account Archive
      • GET_ACCOUNT_SNAPSHOT
      • GET_ACCOUNT_SNAPSHOT_AT_SLOT
      • LIST_ACCOUNT_SNAPSHOTS
    • 🗃️Filters
      • 👓Instruction Filters
      • 🎛️Account Filters
  • ❔Resources
    • 🔗Links
    • 📄Blog Posts
Powered by GitBook
On this page
  1. API Reference
  2. Account Archive

LIST_ACCOUNT_SNAPSHOTS

Return a list of account snapshots within the provided slot range

PreviousGET_ACCOUNT_SNAPSHOT_AT_SLOTNextFilters

Last updated 1 year ago

Overview

This method returns a list of snapshot accounts within the provided slot range.

Example

Program - Candy Machine

Description - Return a list of snapshots of the CandyMachine account: Avax...wh8K for the given slot range. Only include the following fields in the response body: slot, writeVersion, owner, pubKey, data.

Javascript

var myHeaders = new Headers();
myHeaders.append("x-api-key", "<API_KEY>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "type": "LIST_ACCOUNT_SNAPSHOTS",
  "query": {
    "programId": "CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR",
    "accountName": "CandyMachine",
    "accountPubKey": "AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K",
    "slotRange": {
      "before": 206312643,
      "after": 202424643
    },
    "limit": 10,
    "fields": [
      "slot",
      "writeVersion",
      "owner",
      "pubKey",
      "data"
    ],
    "pagination": {
      "offset": 0,
      "limit": 20
    }
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://mainnet.carpool.dev/query/solana", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

cURL

curl --location 'https://mainnet.carpool.dev/query/solana' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
    "type": "LIST_ACCOUNT_SNAPSHOTS",
    "query": {
        "programId": "CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR",
        "accountName": "CandyMachine",
        "accountPubKey": "AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K",
        "slotRange": {
            "before": 206312643,
            "after": 202424643
        },
        "limit": 10,
        "fields": ["slot", "writeVersion", "owner", "pubKey", "data"],
        "pagination": {
            "offset": 0,
            "limit": 20
        }
    }
}'
⚙️
⏳
  • Overview
  • POSTLIST_ACCOUNT_SNAPSHOTS
  • Example

LIST_ACCOUNT_SNAPSHOTS

post

Return a list of account snapshots within the provided slot range

Header parameters
x-api-keystringRequired

the API key

Body
typestringRequired

should be set to 'LIST_ACCOUNT_SNAPSHOTS' This is the type of query you want to perform.

Example: LIST_ACCOUNT_SNAPSHOTS
Responses
200
Successful Response
application/json
post
POST /query/solana HTTP/1.1
Host: mainnet.carpool.dev
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 305

{
  "type": "LIST_ACCOUNT_SNAPSHOTS",
  "query": {
    "programId": "CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR",
    "accountName": "CandyMachine",
    "accountPubKey": "AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K",
    "slotRange": {
      "before": 206312643,
      "after": 202424643
    },
    "limit": 10,
    "fields": [],
    "pagination": {
      "offset": 1,
      "limit": 10
    }
  }
}
200

Successful Response

{
  "response": {
    "accounts": [
      {
        "slot": 206312643,
        "writeVersion": 787853784805,
        "owner": "CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR",
        "pubKey": "AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K",
        "data": {
          "version": {
            "v2": {}
          },
          "tokenStandard": 0,
          "features": [
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "authority": "DVPhVwgssaskEevaQa71VpUR9mzdp7XRZUMRnvtiVbDe",
          "mintAuthority": "DVPhVwgssaskEevaQa71VpUR9mzdp7XRZUMRnvtiVbDe",
          "collectionMint": "HqsBdYeGWbedthx5ggk7sPsHvQwmeMFxkrL4nbKyTD24",
          "itemsRedeemed": 0,
          "data": {
            "itemsAvailable": 5,
            "symbol": "KOBE",
            "sellerFeeBasisPoints": 0,
            "maxSupply": 0,
            "isMutable": false,
            "creators": [
              {
                "address": "KoBEBG6SncLYGhi5Cxim2NHJ8rDJWFV6ZsbbWE5xyiM",
                "verified": false,
                "percentageShare": 100
              }
            ],
            "configLineSettings": {
              "prefixName": "KOBE 10",
              "nameLength": 1,
              "prefixUri": "https://bafkreiaskqjguc7b2m4nt2xs6b7ekvkjhtjcmodtais2nwoippql3gmqlq.ipfs.nftstorage.link/",
              "uriLength": 0,
              "isSequential": false
            },
            "hiddenSettings": {}
          }
        }
      }
    ]
  }
}