Recover info from Metamask and Crypto.com by Deep API

Dear All,
I’m working to my own DAPP and I’m using Deep API successfully.
In particular I’m using:

$url = “https://deep-index.moralis.io/api/v2/” . $walletid . “/erc20?chain=” . $coin_chain;

Where $walletid is the hex number of the Wallet and $coin_chain is “eth” or “bsc” at moment.

I tried to make scan of my TrustWallet and everything works well: I have as output the list of token holdings and the value of amount for each ones, so I easily calculate the value of the wallet.

When I use, as $walletid, the hex number of the metamask wallet or crypto.com I didn’t receive any info from API and I cannot understan why, because if I try with both ethscan and bscscan web sites, I can see all token on ETH or BSC networks.

Is there a way to do it? Am I making some mistake or misunderstanding something?
Thanks in advance
Massimo

Hey @maxbarbato

Could you send me in DM example of a wallet you trying to scan?

No problem to make it in public message. All information are already public:

Here hex of TrustWallet tracking (working well):
https://deep-index.moralis.io/api/v2/0x2f1a61d2968617E262F07f15d82aB3b7B00d9466/erc20?chain=eth
The response is the content of the wallet.

Here hex of Metamask 0x0d7B8B2d1E809e6d657EA4B2ba9655D28D30eca0
The response is VOID for eth network, instead if you try with Etherscan you will find 200$ more or less.

Why?

Same negative result is with hex of Cryptocom wallet, but here I’m thinking I have to use directly API of Cryptocom

Massimo

Hi,
I think that you also have to take the native balance with:

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/0x0d7B8B2d1E809e6d657EA4B2ba9655D28D30eca0/balance?chain=eth' \
  -H 'accept: application/json' \
  -H 'X-API-Key: API_KEY'

Yes right, but this is only the total balance of the wallet and not the token holding with amount value.

This (https://deep-index.moralis.io/api/v2/0x0d7B8B2d1E809e6d657EA4B2ba9655D28D30eca0/balance?chain=eth) is only the native balance, that is not an erc20 token and you’ll have to treat it separately.

1 Like