tokenOwnersByMetadataId

This is a work in progress, please reach out to us on Telegram for support. For the most reliable data, reference our existing graphql docs.

Returns token owners by metadataId with limit and offset pagination..

tokenOwnersByMetadataId({metadataId: string, pagination?: Pagination, network?: "testnet" | "mainnet"})

This is an example of a data api method.

Example:

queryTokens.ts
import { tokenOwnersByMetadataId } from "@mintbase-js/data";

const props = {
  metadataId: "teammintbase.mintbase1.near:0fd038b1fc7d86de6f8c816d5669accc",
  pagination: { limit:10, offset: 0},
  network: "mainnet",
}

const { data, error } = await tokenOwnersByMetadataId(props);

if (error) {
  console.log("error", error);
}

console.log(data.mb_views_nft_tokens) // => token data with token_id and owner
console.log(data.mb_views_nft_tokens_aggregate.aggregate.count) // => token counter

Last updated