Skip to main content

Get ERC20 token balance by wallet

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

Get token balances for a specific wallet address.

PATH PARAMS
addressstringrequired
The address from which token balances will be checked
QUERY PARAMS
chainstring
The chain to query
to_blocknumber
The block number from which the balances should be checked
token_addressesarray
The addresses to get balances for (optional)
Responses
API KEY
import Moralis  from 'moralis';
import { EvmChain } from '@moralisweb3/evm-utils';

try {
const address = '0x1234567890123456789012345678901234567890';

const chain = EvmChain.ETHEREUM;

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

const response = await Moralis.EvmApi.token.getWalletTokenBalances({
address,
chain,
});

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