Can't see my MATIC balance

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.

https://optimistic.etherscan.io/token/0x4200000000000000000000000000000000000042?a=0x4200000000000000000000000000000000000042