ProjectOpenSea / opensea-js

TypeScript SDK for the OpenSea marketplace
https://docs.opensea.io/reference
MIT License
2.28k stars 956 forks source link

List all "buy now" from a contract #459

Closed Philigane closed 2 years ago

Philigane commented 2 years ago

Hello,

I am facing a problem. I am trying to list all "buy now" NFTs from a contract (or a collection) but i am not sure my approach is good.

I list all tokens id via Moralis API (to not overcharger Opensea API). Then i get orders from each token and i consider that if there is an order which can be paid in ETH it's the buy now. Then i complete the order.

This method works but occurs many many useless request and i am not even sure of it.

Is there any other solution ?

Philigane commented 2 years ago

i have refactored my code by doing this.

But damn it souldn't be like that ... In OS interface you can easily list all "buy now" now under a certain price. Here i have to do many useless request and taking the risk of getting the "request limit" exception.

I have a third option is to use a pupeeter for getting all assets that fill my needs and get their token id and their order ...

esteban-OpenSea commented 2 years ago

We appreciate your feedback! We have a similar ticket open for this, check here: https://github.com/ProjectOpenSea/opensea-js/issues/475

Please follow that ticket for the latest updates. I will close this to avoid confusion.