opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

How to get more then 10k listings or listings for all the assets in a collection from the listings api

Open dpenacton opened this issue 4 years ago • 7 comments

There are 2 apis to get orders info:

  1. https://docs.opensea.io/reference/reference-getting-started
  2. https://docs.opensea.io/reference/asset-listings

Both requires contract_address + token id

With the first one, at least it is possible to get more then one asset listing.

Is there any way to get listings for all the assets in a collection?

Also the first one uses offset based pagination. Not the cursor one.

dpenacton avatar Mar 21 '22 06:03 dpenacton

Check this out: https://docs.opensea.io/reference/getting-assets

esteban-OpenSea avatar Apr 08 '22 15:04 esteban-OpenSea

Pagination past 10k is not yet supported. We are aware of this and will make note of this feature request

esteban-OpenSea avatar Jun 16 '22 19:06 esteban-OpenSea

For anyone reading this:

you can get 20K by flipping the order and getting 10K at front and 10K from back.

emorling avatar Jun 16 '22 20:06 emorling

Is there still no way to get all current listings of a collection instead of specifying token id(s)? I can get all the assets and see if there are listings but this is very inefficient and makes pagination/sorting extremely challenging

octavien-han avatar Jul 14 '22 19:07 octavien-han

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar May 24 '23 04:05 github-actions[bot]

Do not close this issue. 🙏

gsmachado avatar May 25 '23 09:05 gsmachado

you can now use:

  • https://docs.opensea.io/reference/retrieve-all-listings
  • https://docs.opensea.io/reference/retrieve-all-offers

please open a new issue with details on how to reproduce if you are still having issues

ryanio avatar Jun 09 '23 01:06 ryanio