Skip to main content
Version: 2.2

Get ERC20 token metadata by contract

GEThttps://deep-index.moralis.io/api/v2.2/erc20/metadata

Get the metadata for a given token contract address (name, symbol, decimals, logo).

QUERY PARAMS
chainstring
The chain to query
addressesarrayrequired
The addresses to get metadata for
Responses
200 Get the metadata for a given ERC20 token contract address (name, symbol, decimals, logo).array
addressstring
The address of the token contract
namestring
The name of the token contract
symbolstring
The symbol of the NFT contract
decimalsstring
The number of decimals on the token
logostring
The logo of the token
logo_hashstring
The logo hash
thumbnailstring
The thumbnail of the logo
block_numberstring
The block number when the token was created or last updated
validatedstring
Indicates if the token details have been validated
possible_spamboolean
Indicates if a contract is possibly a spam contract
verified_collectionboolean
Indicates if a contract is verified
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.token.getTokenMetadata({
"chain": "0x1"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
[
{
"address": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09",
"name": "Kylin Network",
"symbol": "KYL",
"decimals": "18",
"logo": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png",
"logo_hash": "ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d",
"thumbnail": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png",
"block_number": "12526958",
"validated": "true",
"possible_spam": false,
"verified_collection": false
}
]