No way to access all assets listed for sale from a given contract?
I need to list all the tokens for sale from a given contract - both individual tokens and bundles. Has anyone built something similar through the opensea api ?
I have done a couple of unsuccessful attempts:
- the /assets endpoint doesn't allow to filter for assets for sale, only the /bundles endpoint does
- the /orders endpoint only works for a specific token, not for the entire contract tokens
Have you managed to list all assets for a specific contract address?
I tried the /assats endpoint, but sadly Offset cannot exceed 10000..
I tried incrementing the token_id, but sadly not all collections have counting token_ids.
@brandsimon is correct as far as I can tell, there is no way to access all information whether it be Assets or Collections ("Offset cannot exceed 50000")
This is pretty critical as it makes it impossible to get all assets for many projects with > 10,000 items as well as to gather information on any collection without knowing the asset_owner once 49,999 collections have been created after said collection
Hello @AlxDfy I have gone through your above comments. But still, I want to know that how to use the offset parameter to get data more than 10000 NFT via Opensea API ? OR there is no way to fatch more the 10k NFTs from Opensea API ?
You can use the ID parameter to get all assets in a collection but for collection, the 50,000 cap is a hard limit as far as I've seen.
REALLY annoying @alexanderatallah
Thanks for the Reply @AlxDfy
So, Considering Offset 10,000 AND capped 50 means 50K will be the Max limit to get NFTs from Opensea API?
Correct me If I am wrong @AlxDfy @alexanderatallah
If you're talking assets, you can increment indefinitely by token_ids but if the project numbered the assets differently it would mess up your scraping. Otherwise, the offset is capped at 10k. I believe it is the same for events.
If you're talking collections, the offset is capped at 50k,
Linking this issue to https://github.com/ProjectOpenSea/opensea-js/issues/255 😄
@TechforceG You can use the sorting parameters to get more than 10k results. The default is desc where you will get 10k; do the same with asc and you will get another 10k (if there are at least 20k results). You can then use sale_date, sale_count and sale_price with both desc and asc. It's not a perfect solution but it will help to get more than 10k results. I hope this helps
Seriously, this is such a quick implementation on their API's side and it's appalling nobody even cares about addressing any issue. Can we get this resolved? Querying (even with a limit) a collection's assets and sorting the result by current fixed sale price has to be a must for so many projects.
We hear your feedback and working on improving it!
it would be great if we can move this API to cursor based pagination + accepting a collection slug instead of contract_address + token_id
its really painful to sync the asset orders currently
+1 any news ?
+1 , I'm currently looking at writing a scraper here to get all listed prices now bc this functionality does not exist on the current API, or trying to figure out how to access the graphql endpoint. This has to be a need by so many people trying to integrate with OS.
+1 , I'm currently looking at writing a scraper here to get all listed prices now bc this functionality does not exist on the current API, or trying to figure out how to access the graphql endpoint. This has to be a need by so many people trying to integrate with OS.
If i can help you my workaround is this one : Do a first check with a puppeter for getting all listed assets with your requirements.
Then start a thread which check events endpoint to see if there is any listing.
+1
+1, would be great to just get the list of all active listings, which can be ordered by timestamp or id
+1 , I'm currently looking at writing a scraper here to get all listed prices now bc this functionality does not exist on the current API, or trying to figure out how to access the graphql endpoint. This has to be a need by so many people trying to integrate with OS.
If i can help you my workaround is this one : Do a first check with a puppeter for getting all listed assets with your requirements.
Then start a thread which check events endpoint to see if there is any listing.
I wrote a scraper but scraping OS is a little tricky do to how items dynamically load to the page on scrolls. @dnilosek I'll share some code when I get home if you need insight.
+1 , I'm currently looking at writing a scraper here to get all listed prices now bc this functionality does not exist on the current API, or trying to figure out how to access the graphql endpoint. This has to be a need by so many people trying to integrate with OS.
If i can help you my workaround is this one : Do a first check with a puppeter for getting all listed assets with your requirements. Then start a thread which check events endpoint to see if there is any listing.
I wrote a scraper but scraping OS is a little tricky do to how items dynamically load to the page on scrolls. @dnilosek I'll share some code when I get home if you need insight.
@krjii would be great if you could!
Pagination past 10k is not yet supported
I will go ahead and close this issue since it's a duplicate. Please follow this ticket for the latest updates on this issue: https://github.com/ProjectOpenSea/opensea-js/issues/438