Skip to main content

Get NFT transfers by collection

GEThttps://mainnet-aptos-api.moralis.io/nfts/transfers/collections/:collection_data_id_hash

Get NFT transfers for a given collection.

PATH PARAMS
collection_data_id_hashstringrequired
The collection data id hash of the token
QUERY PARAMS
limitnumberrequired
The number of results to return
offsetnumber
The number of results to skip
cursorstring
The cursor to use for getting the next page
wallet_whitelistarray
The addresses of the wallets to whitelist
wallet_blacklistarray
The addresses of the wallets to blacklist
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.nfts.getNFTTransfersByCollection({
"limit": 5,
"collectionDataIdHash": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301",
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
{
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4",
"hasNextPage": true,
"result": {
"coin_amount": "2",
"collection_data_id_hash": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d",
"collection_name": "Topaz Troopers",
"creator_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac",
"event_account_address": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd",
"event_creation_number": "2",
"event_sequence_number": "2",
"from_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac",
"name": "Topaz Troopers 123",
"property_version": "1",
"to_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac",
"token_amount": "2",
"token_data_id_hash": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1",
"transaction_timestamp": "2022-09-17T22:03:32.000000Z",
"transaction_version": "210373856",
"transfer_type": "0x3::token::DepositEvent"
}
}