Skip to main content

NFTs Tracking Across Chains

Check a wallet's NFT holdings on several chains in one call.

GraphQL aliases let one request query several networks at once. The query below returns the NFT collections held by 0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03 on BNB Chain, Ethereum, Arbitrum and Optimism, with the number of NFTs held in each collection. Replace it with the wallet you need.

It uses the Balances cube, which returns the current balance per collection directly. Balances reports how many NFTs an address holds in a collection, not the individual token IDs. For token IDs, use the NFT ownership API.

query MyQuery {
binance: EVM(network: bsc, dataset: combined) {
Balances(
limit: { count: 10 }
orderBy: { descending: Balance_Amount }
where: {
Balance: { Address: { is: "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03" } }
Currency: { Fungible: false }
}
) {
Currency {
Fungible
Symbol
SmartContract
Name
}
Balance {
Address
Amount(selectWhere: { gt: "0" })
}
}
}
eth: EVM(network: eth, dataset: combined) {
Balances(
limit: { count: 10 }
orderBy: { descending: Balance_Amount }
where: {
Balance: { Address: { is: "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03" } }
Currency: { Fungible: false }
}
) {
Currency {
Fungible
Symbol
SmartContract
Name
}
Balance {
Address
Amount(selectWhere: { gt: "0" })
}
}
}
arbitrum: EVM(network: arbitrum, dataset: combined) {
Balances(
limit: { count: 10 }
orderBy: { descending: Balance_Amount }
where: {
Balance: { Address: { is: "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03" } }
Currency: { Fungible: false }
}
) {
Currency {
Fungible
Symbol
SmartContract
Name
}
Balance {
Address
Amount(selectWhere: { gt: "0" })
}
}
}
optimism: EVM(network: optimism, dataset: combined) {
Balances(
limit: { count: 10 }
orderBy: { descending: Balance_Amount }
where: {
Balance: { Address: { is: "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03" } }
Currency: { Fungible: false }
}
) {
Currency {
Fungible
Symbol
SmartContract
Name
}
Balance {
Address
Amount(selectWhere: { gt: "0" })
}
}
}
}
Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.