'Request on how to use Metamask RPC API

I'm trying to get the balance of these two coins from Metamask using Metamask RPC API, but I can't find any info on how to do that... So, do you know any way to get something like a Map where the key is the coin name and the value is how much of it I have in the wallet? My Metamask Wallet



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source