Skip to main content

Get ERC20 token metadata by contract

GEThttps://deep-index.moralis.io/api/v2/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
API KEY
import Moralis  from 'moralis';
import { EvmChain } from '@moralisweb3/evm-utils';

try {
const chain = EvmChain.ETHEREUM;

const addresses = ['0x1234567890123456789012345678901234567890'];

await Moralis.start({
apiKey: 'YOUR_API_KEY',
// ...and any other configuration
});

const response = await Moralis.EvmApi.token.getTokenMetadata({
addresses,
chain,
});

console.log(response?.result);
} catch (e) {
console.error(e);
}

Response Example
Empty