Discussions
NFT image CDN inconsistencies within a collection
I've noticed an inconsistency whereby some tokens are missing both nft-cdn.alchemy.com and cloudinary links, and images are ipfs only.
Even within a single collection, some tokens include the CDNs, and some not, I've pasted an example below.
Is there anything an end user can do via the api to trigger Alchemy's servers to correct for this?
Also, if stuck with ipfs only, can one expect the performance of https://alchemy.mypinata.cloud/ would be faster than https://ipfs.io/ as a gateway, in general?
Example: "girlies-nft" = "0x4f7e2a72a99d45f4fd5a2fc211f8dc5c36a049bd"
"tokenId": "8",
...
"media": [
{
"raw": "ipfs://QmaBvtjsTC52cJLtccS5vg7odGqJ9pniBTGd7FiV2QPHwi/8.png",
"gateway": "https://ipfs.io/ipfs/QmaBvtjsTC52cJLtccS5vg7odGqJ9pniBTGd7FiV2QPHwi/8.png"
}
]
"tokenId": "7",
...
"media": [
{
"raw": "ipfs://QmaBvtjsTC52cJLtccS5vg7odGqJ9pniBTGd7FiV2QPHwi/7.png",
"gateway": "https://nft-cdn.alchemy.com/eth-mainnet/efcbabbec2d58642f969e6acdc6b736a",
"thumbnail": "https://res.cloudinary.com/alchemyapi/image/upload/thumbnail/eth-mainnet/efcbabbec2d58642f969e6acdc6b736a",
"format": "png",
"bytes": 2459511
}
]
And there are hundreds of tokens like #8 that are ipfs only.
Posted by BR 2 months ago
Is it possible to keep a watch on contract creation on ETH chain?
Wanted to see if it's possible to keep a watch on the contract creation to figure out if a contract is an NFT contract and then provide users ability to mint the collection as soon as the contract is created and then keep a watch on the contract to see how many are being minted in real time?
something like mint.fun
Posted by Devesh B 3 months ago
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] 3 months ago
tokenType is Unknown in Alchemy NFT API response
Hi,
I am trying to query the `getContractMetadata` function for a certain NFT collection address but I keep seeing `tokenType`:`UNKNOWN` in the response even though it is an ERC721 collection.
What is the reason and what can I do to fix this?
Posted by Aniket 4 months 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] 4 months ago
When I fetch NFTs from the Alchemy SDK using "alchemy.nft.getNftsForOwner(address)", I get the error "IPFS gateway timed out"
Code is -
```
const getUserEthNFTs = async () => {
console.log(address!);
return await alchemy.nft.getNftsForOwner(address!);
};
```
It returns error "IPFS gateway timed out" for some NFTs.
Posted by Meet 4 months ago
need good sample on how to show different types of NFTs
Can you provide an example on how to display different types of NFTs retrieved via your API? a good example... there many types of NFT types... yet all examples show JPEG... not video or html or what else
so how about you provide a good reference on how to display all type of different NFTs?
Appreciate it!
Posted by web5metake 4 months ago
how to get 2x from faucet using NFT API?
how to get 2x from faucet using NFT API?
Posted by nemo 4 months ago
getNFTsForCollection should return 404 or other error code when no more NFTs to be found
Thanks for the great API for NFTs! One thing I'm finding challenging is the lack of a proper HTTP error code when no more NFTs are to be found for a contract. If you're looping through pages, the API will return success codes for NFTs that do not exist.
It would be more helpful to return a proper status code when you've gone over the limit of NFTs on a contract.
Posted by Faces 4 months ago