NFT not returning transfer history
I am using this endpoint (https://docs.alchemy.com/reference/getnftsales) to query the transfer history of NFTs for a wallet that I am building. It works fine with one of my NFTs, but with the other two it just returns an empty array. I was wondering what might cause this. The one that works is from "Down Market Ducks" and the two that don't work are from "OpenStore." Any help with this would be appreciated. I can provide any additional info that would help. I'll at least include my function that returns the data below.
```
export const getNFTSalesHistory = async (contractAddress, tokenId) => {
const apiKey = '<my-key>';
const url = `https://eth-mainnet.g.alchemy.com/nft/v2/${apiKey}/getNFTSales?fromBlock=0&toBlock=latest&order=desc&contractAddress=${contractAddress}&tokenId=${tokenId}`;
const options = {
method: 'GET',
headers: {
accept: 'application/json',
}
}
const salesData = await fetch(url, options);
const salesJsonData = await salesData.json();
return salesJsonData;
}
```
Posted by [email protected] about 1 year ago
How to get date of NFT Sale
I am using the method outlined here (https://docs.alchemy.com/reference/getnftsales) to access all sales of a specific NFT. However, the data returned does not give the time or date that the transaction occurred. How would I use this data or this method to also get the date of each transaction?
Posted by [email protected] about 1 year ago