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

Filter assets by traits?

Open jahvi opened this issue 5 years ago • 7 comments

Is it possible to use the library to filter assets by traits like you do on the website by using the filters?

I found a "search" parameter in the AssetsQuery type which looks similar to the attribute that is used on the website to handle filtering but this expects a string instead of an array so I haven't been able to use it for this: https://github.com/ProjectOpenSea/opensea-js/blob/84a4e811e020e98945749157075514047079bc72/lib/types.d.ts#L478

jahvi avatar Aug 11 '21 10:08 jahvi

I am also looking for this feature. @jahvi any luck?

simonare avatar Jan 04 '22 18:01 simonare

I am interested in this feature too ...

mihir-mehta avatar Mar 31 '22 21:03 mihir-mehta

Check this out: https://docs.opensea.io/reference/asset-object

Is your specific request having parameters in the retrieving asset option to filter by trait?

esteban-OpenSea avatar Apr 19 '22 16:04 esteban-OpenSea

I need this feature too ...

ahjohnwon avatar Jul 06 '22 14:07 ahjohnwon

Check this out: https://docs.opensea.io/reference/asset-object

Is your specific request having parameters in the retrieving asset option to filter by trait?

@esteban-OpenSea I think @jahvi feature request is similar to what people requested in this Reddit post and #670. Namely a way to retrieve all the NFTs with specific traits from a collection. @jahvi Please correct me if I'm wrong.

rickstaa avatar Sep 23 '22 14:09 rickstaa

@rickstaa Yes that's it 😄

jahvi avatar Oct 03 '22 19:10 jahvi

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 00:05 github-actions[bot]