Whenever you setup an existing NFT (minted outside of OpenSea) and use the "Sell" button, I assume the network will know it is up for sale. However, if you'd need to sell a bunch of NFTs at once, it will be a lot of wasted time. So how could I achieve the same thing programatically? I am on the Polygon network if that makes a difference. I am also using JavaScript with Hardhat

Short: How could I programatically sell a bunch of NFTs I own on OpenSea?

To clarify: The NFTs are already minted and can be found on OpenSea, I just need to sell them.

1 Answer 1


You can create o loop with all the NFT address you would like to sell, you can use truffle CLI. There are other options.

  • Could you please add a link to documentation that might point me in the right direction, or add a code snippet? Thanks Aug 19, 2021 at 12:05
  • trufflesuite.com/docs/truffle/reference/truffle-commands You can interact programmatically with any contract function through truffle console. Or you can use web3, check their documentation. Aug 19, 2021 at 12:13
  • All you need is have the phrases of the ownerOF() the contract. Aug 19, 2021 at 12:14
  • I have the keyphrase and own all NFTs, but I cannot find anything on Truffle for selling in a way that it shows up on OpenSea Aug 19, 2021 at 13:43
  • Problably because you don't know how to call and send function on web3. You should start from the begining. You need to call allowBuy() in an array of address of your NFT contracts. Aug 20, 2021 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.