Tokens API Examples
Get all meta data about the BAYC NFT collection including a summary of the traits distribution
query QB1 {
Tokens(input: {filter: {address: {_eq: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"}}, blockchain: ethereum}) {
Token {
address
baseURI
chainId
contractMetaDataURI
decimals
id
lastTransferBlock
lastTransferHash
lastTransferTimestamp
name
rawContractMetaData
symbol
tokenBalances {
owner {
addresses
}
amount
}
tokenNfts {
id
tokenId
tokenURI
metaData {
name
}
contentValue {
image {
large
medium
original
small
extraSmall
}
}
}
tokenTraits
totalSupply
type
}
pageInfo {
nextCursor
prevCursor
}
}
}
For the Moonbirds NFT collection, get the holders, the holderâs ENS names, and their Farcaster profile names if they have one
query Moonbirds_ENS_FC {
Tokens(
input: {filter: {address: {_eq: "0x23581767a106ae21c074b2276d25e5c3e136a68b"}}, blockchain: ethereum}
) {
Token {
address
baseURI
chainId
contractMetaDataURI
# currentHolderCount - being fixed
decimals
id
symbol
name
tokenBalances {
owner {
addresses
identity
socials {
profileName
}
domains {
name
}
}
}
}
pageInfo {
nextCursor
prevCursor
}
}
}
Get the contract information for the Matic token
{
Token(
input: {address: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", blockchain: ethereum}
) {
name
symbol
decimals
totalSupply
lastTransferBlock
lastTransferTimestamp
}
}
Last updated