GET_ACCOUNT_SNAPSHOT_AT_SLOT
Get a snapshot of an account at a specific slot
Overview
This method returns a snapshot account data for a program based on a specific slot
Get a snapshot of an account at a specific slot
Header parameters
x-api-keystringRequired
the API key
Body
typestringRequiredExample:
Should be set to 'GET_ACCOUNT_SNAPSHOT_AT_SLOT'. This is the type of query you want to perform.
GET_ACCOUNT_SNAPSHOT_AT_SLOT
Responses
200
Successful Response
application/json; charset=utf-8
post
POST /query/solana HTTP/1.1
Host: mainnet.carpool.dev
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 305
"{\n \"type\": \"GET_ACCOUNT_SNAPSHOT_AT_SLOT\",\n \"query\": {\n \"programId\": \"CndyV3LdqHUfDLmE5naZjVN8rBZz4tqhdefbAnjHG3JR\",\n \"accountName\": \"CandyMachine\",\n \"accountPubKey\": \"AvAx5oEWscpGudFSrWKPqsGypfeKGM1DriUXSRc7wh8K\",\n \"slot\": 204584643\n }\n}"
200
Successful Response
{
"response": {
"account": {
"slot": 204584643,
"writeVersion": 773978115822,
"timestamp": 1689017859133,
"lamports": 7015680,
"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": null
}
}
}
}
}
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
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": []
}
}'
Last updated