Get Active Bids of a Wallet
Illustrates how we can get active NFT Bids for a single wallet on Tensor using GraphQl
In the Tensor marketplace, users can bid on both NFTs and cNFTs. Tensor has two different programs that keep track of these bids.
The bids on cNFTs are managed and stored in the bidState account of the Tensor_CNFT program
The bids on NFTs are handled by the bidState account of the Tensor_bid program.
Cross program query is possible here. You can query both programs in a single graphQl call.
With SHYFTâs SuperIndexer we can query both of these programs in a single query, while also applying the where filter on the bidder field of the bidState field of Tensor_bid program and the owner field of the Tensor_CNFT program . This would give us all the bids by one particular bidder wallet.
The target field of the Tensor_CNFT program can have two possible keys, assetId and whitelist. 'assetId' indicates the bid is on a single NFT, and 'whitelist' indicates the bid is on a whitelist account equivalent to a collection.
Active bids for a wallet on Tensor Bid (Non-compressed NFTs)
Active bids for a wallet on Tensor CNFTs (Compressed NFTs)
Last updated