Token metadata is one of the most important tools that developers can use to provide a rich and engaging experience for end users. From wallets to NFT marketplaces, many applications need to query metadata for a specific asset (like its image, attributes, rarity, etc). With this in mind, we created a Token Metadata API that indexes metadata for all fungible, non-fungible, and semi-fungible tokens in the Stacks blockchain and exposes it using three JSON REST API endpoints.
These three endpoints give developers more optionality when using our API services while also providing a more efficient way for us at Hiro to maintain and scale our back-end infrastructure.
What This Means For You
Without metadata, wallets can only display the name of a token contract, along with which token IDs are held by that particular address. These new endpoints let you display information like the picture, name and traits associated with a specific NFT. For wallets and NFT marketplaces, these endpoints make it easier to pull rich data into their applications.
How It Works
The new Token Metadata API will support the following token metadata standards:
First, the API scans the entire Stacks blockchain for all tokens that have ever existed, and it adds all of the corresponding metadata to a local database for quick retrieval. After this processing, all data will be exposed through easy to use REST JSON endpoints for external services to consume. This translates to a faster and more reliable performance for our users. For more details, check out our documentation, the feature guide, and Github.
We are thrilled to roll out the first microservice associated with the Stacks API, and we have more planned in the future to deliver faster response times and better scalability for our services.