How can I get user token balance and display it?

Hello guys. I am newbie for coding. Tring to understand how can I get balance of the user and display it on the right top corner of my app?

I already made transfer functions one account to another. But I wanna display the userโ€™s balance.
I use Avax for testing purposes.

You can use getNativeBalance to get avax balance.

const options = {
  chain: "avalanche"
};
const balance = await Moralis.Web3API.account.getNativeBalance(options);
1 Like