tokenByStatus

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 number of tokens by metadataId and statuses: burned, unburned, listed.

tokenById({metadataId: string, ownedBy?: string, network?: "testnet" | "mainnet"})

This is an example of a data api method.

Example:

queryNftsByStore.ts

import { tokensByStatus } from  '@mintbase-js/data'

const props = {
  metadataId: 'dogeflower.mintbase1.near%3A5ef2d9b0651172d90dc173af0726b5fc',
  ownedBy: 'maxknivets.near',
  network: 'mainnet'
}

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

if (error) {console.log('error', error)}

console.log(data.listedTokens) // => 1

Last updated