Get semi-fungible token metadata
Retrieves information about semi-fungible tokens.
Path Parameters
principalSemi-Fungible Token Contract Principal
SIP-013 compliant smart contract principal
Pattern
"^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41}\\.[a-zA-Z]([a-zA-Z0-9]|[-_]){0,39}$"
token_idToken ID
Token ID to retrieve
Query Parameters
locale?Localization
Metadata localization to retrieve
Response Body
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
token_uri?string
URI for this token's metadata JSON
Format
"uri"
decimals?integer
total_supply?string
metadata?Metadata
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
errorstring
Value in
"Contract not found"
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
errorstring
Value in
"Token error"
messagestring
curl -X GET "https://api.hiro.so//metadata/v1/sft/SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.key-alex-autoalex-v1/35?locale=string"
fetch("https://api.hiro.so//metadata/v1/sft/SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.key-alex-autoalex-v1/35?locale=string")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so//metadata/v1/sft/SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.key-alex-autoalex-v1/35?locale=string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.hiro.so//metadata/v1/sft/SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.key-alex-autoalex-v1/35?locale=string"
response = requests.request("GET", url)
print(response.text)
{
"token_uri": "ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json",
"decimals": 6,
"total_supply": "250",
"metadata": {
"sip": 16,
"name": "Satoshi's Team #12200",
"description": "Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets",
"image": "ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png",
"cached_image": "https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png",
"cached_thumbnail_image": "https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png",
"attributes": [
{
"trait_type": "Background",
"display_type": "string",
"value": "value"
}
],
"properties": {
"collection": "Foo Collection",
"total_supply": "10000"
},
"localization": {
"uri": "http://token.com/metadata?hl={locale}",
"default": "en",
"locales": [
"en",
"jp"
]
}
}
}
{
"error": "Token not found"
}
{
"error": "Token metadata fetch in progress"
}