Good news!
Moralis automatically updates metadata.
Update 2022-05-27
Only metadata for token uri that points to IPFS gets updated automatically now.
We will come with updates for non IPFS metadata.
Here is how it works
Whenever you request a token using the endpoints below if will be queued for refresh.
/nft/{address}/{token_id}
/nft/{address}/{token_id}/owners
/nft/{address}/{token_id}/transfers
In a few days we will also add that no matter which endpoint you call - if that endpoint returns any NFTs they will all be scheduled for refresh. That will include the following endpoints:
/{address}/nft
/nft/{address}
/nft/{address}/transfers
/{address}/nft/transfers
/nft/{address}/trades
The goal is that whenever an NFT token is requested by anyone using Moralis through any endpoint - that token will be scheduled for refresh.
Cool-Off Period
Refreshing metadata is resource intensive - therefore we have a cool-off period during which the same token canโt be refreshed more than once.
If the token_uri
points to IPFS - we allow refreshing every 10 minutes for each individual token.
If the token_uri
doesnโt point to IPFS but to a third party server - we allow refreshing every 1 hour for each individual token.