2

I see platforms like zerion io able to get nft data from only a public ethereum address. But how are they doing this? I dont see a clear path of getting this type of data from etherscan as an nft purchase from a place like OpenSea looks like an outgoing transaction only in the main page. If an nft is purchased from OpenSea it has the from address sending the eth out, and it going to opensea, but no transaction coming in with the nft transfer. But looking at Zerion.io you can add your public eth address and they can get the nfts a address owns and display them.

Can you get this data somehow with etherscan and web3?

2

1 Answer 1

2

As referenced in this answer, one super easy way is to use the Alchemy SDK and NFT API:

npm install @alch/alchemy-sdk

and then in your code:

// Initializing the alchemy config object
import { initializeAlchemy, getNftsForOwner } from '@alch/alchemy-sdk';

const alchemy = initializeAlchemy(); // using default settings - pass in a settings object to specify your API key and network

getNftsForOwner(alchemy, '0xshah.eth').then(console.log);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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