Tokens Meta API
The Meta API provides information about various entities in the Yearn ecosystem. This includes information about the strategies, vaults, tokens and protocols.
Because metadata files are difficult to put on-chain, they are stored in meta-files
which are updated by the yTeam. This API provides a way to access this information.
Here are the paths for the tokens meta API:
[GET - `{chainID}/meta/tokens`]: List the meta for the tokens for a specific chain.
[GET - `{chainID}/meta/tokens/{address}`]: Get a specific meta for a token for a specific chain.
[GET - `{chainID}/meta/token/{address}`]: Get a specific meta for a token for a specific chain. Alias for `{chainID}/meta/tokens/{address}`.
[GET - `api/{chainID}/tokens/all`]: List the meta for the tokens for a specific chain, as it was on the legacy Meta Repository/API.
[GET - `api/{chainID}/tokens/{address}`]: Get a specific meta for a token for a specific chain, as it was on the legacy Meta Repository/API.
GET:chainID/meta/tokens Get All Tokens
Get all Tokens: REST API endpoint to get all the tokens meta for a specific chain.
This route has 1 alias:
-
GETapi/:chainID/tokens/all
Request
Params
- chainID: The chainID of the chain you want to get the tokens for. Must be provided in the URL, and must be one of the supported chains.
Query arguments
loc: Indicate the localization system to use (aka the language). If a supported language is provided, the values will be returned respecting the language. If the specific `all` key is used, all the localization will be returned.
?loc=en # default
Response
Valid request
type TTokenFromMeta struct {
Address common.Address `json:"address"`
Name string `json:"name"`
Symbol string `json:"symbol"`
Description string `json:"description"`
Website string `json:"website"`
Categories []string `json:"categories"`
Localization struct {
En TLocalizationDetails `json:"en"`
Fr TLocalizationDetails `json:"fr"`
Es TLocalizationDetails `json:"es"`
De TLocalizationDetails `json:"de"`
Pt TLocalizationDetails `json:"pt"`
El TLocalizationDetails `json:"el"`
Tr TLocalizationDetails `json:"tr"`
Vi TLocalizationDetails `json:"vi"`
Zh TLocalizationDetails `json:"zh"`
Hi TLocalizationDetails `json:"hi"`
Ja TLocalizationDetails `json:"ja"`
Id TLocalizationDetails `json:"id"`
Ru TLocalizationDetails `json:"ru"`
} `json:"localization,omitempty"`
}[]
// https://ydaemon.yearn.finance/api/250/tokens/all?loc=en
[{
"address": "0x321162Cd933E2Be498Cd2267a90534A804051b11",
"name": "",
"symbol": "BTC",
"description": "Wrapped Bitcoin is a tokenized version of Bitcoin (BTC) that runs on the Ethereum blockchain. The Wrapped Tokens project, of which WBTC is a part, was founded as a joint project of three organizations: BitGo, Kyber Network and Ren. BitGo also serves as the entity that holds WBTC tokens and the keys needed to mint more of them. WBTC is backed by Bitcoin at a 1:1 ratio via a network of automatically monitored merchants and custodians.",
"website": "https://www.wbtc.network/",
"categories": [
"Wrapped or Synthetic Assets"
]
}]
Invalid request
400 - invalid chainID
: The provided chainID is not supported.404 - no data available
: no data is available for the provided chainID.
GET:chainID/meta/tokens/:address Get One Token
Get One Token: REST API endpoint to get the metadata about one specific token for a specific chain.
This route has 2 aliases:
-
GET:chainID/meta/token/:address
-
GETapi/:chainID/tokens/:address
Request
Params
- chainID: The chainID of the chain you want to get the token for. Must be provided in the URL, and must be one of the supported chains.
- address: The address of the token you want to get the information for.
Query arguments
loc: Indicate the localization system to use (aka the language). If a supported language is provided, the values will be returned respecting the language. If the specific `all` key is used, all the localization will be returned.
?loc=en # default
Response
Valid request
type TTokenFromMeta struct {
Address common.Address `json:"address"`
Name string `json:"name"`
Symbol string `json:"symbol"`
Description string `json:"description"`
Website string `json:"website"`
Categories []string `json:"categories"`
Localization struct {
En TLocalizationDetails `json:"en"`
Fr TLocalizationDetails `json:"fr"`
Es TLocalizationDetails `json:"es"`
De TLocalizationDetails `json:"de"`
Pt TLocalizationDetails `json:"pt"`
El TLocalizationDetails `json:"el"`
Tr TLocalizationDetails `json:"tr"`
Vi TLocalizationDetails `json:"vi"`
Zh TLocalizationDetails `json:"zh"`
Hi TLocalizationDetails `json:"hi"`
Ja TLocalizationDetails `json:"ja"`
Id TLocalizationDetails `json:"id"`
Ru TLocalizationDetails `json:"ru"`
} `json:"localization,omitempty"`
}
// https://ydaemon.yearn.finance/250/meta/tokens/0x321162Cd933E2Be498Cd2267a90534A804051b11
{
"address": "0x321162Cd933E2Be498Cd2267a90534A804051b11",
"name": "",
"symbol": "BTC",
"description": "Wrapped Bitcoin is a tokenized version of Bitcoin (BTC) that runs on the Ethereum blockchain. The Wrapped Tokens project, of which WBTC is a part, was founded as a joint project of three organizations: BitGo, Kyber Network and Ren. BitGo also serves as the entity that holds WBTC tokens and the keys needed to mint more of them. WBTC is backed by Bitcoin at a 1:1 ratio via a network of automatically monitored merchants and custodians.",
"website": "https://www.wbtc.network/",
"categories": [
"Wrapped or Synthetic Assets"
]
}
Invalid request
400 - invalid chainID
: The provided chainID is not supported.400 - invalid address
: The provided token address is not a valid Ethereum address or is blacklisted for this network.404 - no data available
: no data is available for the provided chainID.