NFT API
Get NFT Collection Holders

Get NFT Collection Holders

Overview

The Get NFT Collection Holders endpoint obtains data on all holders owning NFTs from a specific collection by providing its smart contract, which is a required path parameter. Additionally, metadata and sale_price can be included by setting their field values to true.

A successful request to the endpoint will return a JSON response with data on all holders owning NFTs from the chosen collection, labeled as items. These items will include their id, token_id, and transfer data, along with metadata and sale_price if you opt to include them in your response. The transfer data will feature the following fields: owner, block_number, block_timestamp, and transaction_hash.

Usage

In this example, we receive data on all holders owning NFTs from a specific collection with the contract 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D.

import * as Parsiq from '@parsiq/parsiq.js';
 
const client = Parsiq.createClient(process.env.API_KEY, Parsiq.ChainId.ETH_MAINNET);
 
const collectionHolders = client.nft.getCollectionHolders(
    `0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D`,
    {sale_price: false, metadata: true},
    {limit: 1}
);
 
for await (const holder of collectionHolders) {
    console.log(holder);
}

Output:

{
  id: '0000000000bbab27-00a7-00000001-00000',
  token_id: '30',
  transfer: {
    owner: '0xf7801b8115f3fe46ac55f8c0fdb5243726bdb66a',
    block_number: 12299047,
    block_timestamp: 1619214971,
    tx_hash: '0xeb144bd886f3ffcbcd6be12c660dbce1595caa2461a28f042963c2534fa340b7'
  },
  metadata: {
    content: {
      image: 'ipfs://QmcgoedsGRM4tzEZnSQX3RQ2SWTggATqUKQq1gfhhkzpfs',
      attributes: [Array]
    },
    is_json: true,
    token_uri: 'ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/30'
  },
  sale_price: null
}

Parameters

Path params
chainId
string
REQUIRED
version
string
REQUIRED
contract
string
REQUIRED
Query params
metadata
boolean
sale_price
boolean
offset
string
limit
number
estimate_cu
boolean