Hi everyone.
Iβm trying to fetch my Polygon balance with moralis API and I get nothing.
At the same time, on polygonscan I can clearly see my balance.
Can someone please explain me, what am I doing wrong?
Hi everyone.
Iβm trying to fetch my Polygon balance with moralis API and I get nothing.
At the same time, on polygonscan I can clearly see my balance.
Can someone please explain me, what am I doing wrong?
Hi @yury, for Matic on Polygon chain (Native), you would need to use this endpoint https://docs.moralis.io/web3-data-api/evm/reference/get-native-balance?address=0xDC24316b9AE028F1497c275EB9192a3Ea0f67022&chain=polygon
Same goes for all native balances on other chains.
Thank you. Now, I can see the balance.
But why it works differently for OP coin? OP is also a native coin for Optimism network, but I can get itβs ballance through this endpoint.
Hi @yury It can be expected response as it is an L2 chain. On the block explorer you can see that it is an ERC20 token address. The native balance will be matching with the token balance.