---
description: Get a snapshot of an account at a specific slot
---

# GET\_ACCOUNT\_SNAPSHOT\_AT\_SLOT

## Overview

_This method returns a snapshot account data for a program based on a specific slot_

{% openapi src="https://2513171703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE1gzfwcjB542lI2VR9XI%2Fuploads%2FoQBnz8f5VxpTlsgLJAXN%2FCarpool_dev-GET_ACCOUNT_SNAPSHOT_AT_SLOT-0.1-resolved.json?alt=media&token=3ad6fadd-d483-4faa-9ac9-40e5ce2db7bd" path="/query/solana" method="post" %}
[Carpool_dev-GET_ACCOUNT_SNAPSHOT_AT_SLOT-0.1-resolved.json](https://2513171703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE1gzfwcjB542lI2VR9XI%2Fuploads%2FoQBnz8f5VxpTlsgLJAXN%2FCarpool_dev-GET_ACCOUNT_SNAPSHOT_AT_SLOT-0.1-resolved.json?alt=media&token=3ad6fadd-d483-4faa-9ac9-40e5ce2db7bd)
{% endopenapi %}

## Example

**Program** - _Candy Machine_

**Description** _- Return a snapshot of the CandyMachine account: Avax...wh8K at slot_ 204584643. Return all fields in the post body.

#### Javascript

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

var raw = JSON.stringify({
  "type": "GET_ACCOUNT_SNAPSHOT_AT_SLOT",
  "query": {
    "programId": "CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR",
    "accountName": "CandyMachine",
    "accountPubKey": "AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K",
    "slot": 204584643,
    "fields": []
  }
});

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": "GET_ACCOUNT_SNAPSHOT_AT_SLOT",
  "query": {
    "programId": "CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR",
    "accountName": "CandyMachine",
    "accountPubKey": "AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K",
    "slot": 204584643,
    "fields": []
  }
}'
```
