0

We are using getAssetTransfer to get all the transfers from and to a wallet for a specific NFT contract, similar to this https://docs.alchemy.com/docs/how-to-get-the-transfer-history-of-an-nft.

We are trying to figure out how to get the value of each transfer as the getAssetTransfer returns value: null for erc-721. It can be done by getting the relevant transaction of the transfer but we run into an issue when there are multiple transfers from the same transactions so we can identify the value of each transfer. How can this be done using the Alchemy API?

1 Answer 1

0

You are on the right track with using the getAssetTransfer API endpoint.

However, it only returns information about the transfer of an asset, such as an NFT, on Ethereum, but it does not include the value of the transfer.

This is because the value of an NFT transfer is not stored on the blockchain, so it is not possible to retrieve it directly using an API like Alchemy. Therefore you will need to use a third party that records the value of the NFTs transfers.

You can try to use a NFT marketplace's API, such as the Opensea API to fetch the value of a specific NFT.

They have an enpoint called getAsset, so you can retrieve metadat information about the NFT, including the current price, sale history, etc.

https://docs.opensea.io/reference/retrieving-a-single-asset

I hope this helps!

2
  • Thanks Anon. I was checking the retrieve a single asset but seems also doesn't include the transfers. I think I have to use docs.opensea.io/reference/retrieving-asset-events but I can't test that without an Opensea API key and still waiting for approval. Can you confirm this or am I missing something? Dec 23, 2022 at 6:08
  • Yes with OpenSea you will need to request an API key from them.
    – Anon.eth
    Dec 24, 2022 at 13:35

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.