Fetch active listings for a collection across multiple marketplaces in a single call.
In order to query active listings for a collection, we would first need a mint list (list of addresses of all NFTs belonging to that collection). We can save it before hand or fetch it through DAS. For this example we will be fetching the data through DAS.
GraphQL API also allows you to add multiple filters, along with checks for a range of values for particular fields. Suppose, we are filtering the nftMint, or the owner field, we can check if the nftMint or owner, belongs to a range (array) of values instead of just one particular value.
So to achieve the above objective, we will be requiring two simple steps
We will get a list of all mint addresses for a collection using DAS.
We will then use the array of mint addresses to filter the listing across the three marketplaces.
You can also use our MintList tool to get a collection's mint list.
Please note that, like filtering we can also limit the number of results we want in the response. In the above case we have limited the listings from each marketplace to 1, however this can be removed to fetch more listings for that particular collection from the marketplaces.