I used the web3 (REST) api endpoints /{wallet_address}/erc20?chain=bsc to get the balances of all the tokens a particular wallet address is holding and I convert the balances from WEI to ETH using the token’s decimal
I then used /erc20/{contract_address}/price to get the price of each token the wallet address is holding
Now, to get the USD balance of each contract address on the wallet, I multiply the USD price of the token by the amount the wallet address is holding (after converting from WEI). The USD balance works well for most tokens
But there are some (scam) coins that I think do not have enough liquidity, converting them brings a lot of balance (but on exchange like pancakeswap, it is able to bring out the withdrawable balance)
For example
On pancakeswap and Moralis,
1 ShibaVerse = $0.00023492882615548
3000000 ShibaVerse should be = $704.78647846644
but on pancakeswap, 3000000 ShibaVerse = $0.00179018
ShibaVerse contract address is 0xbb92b9d18db99c3695bc820bf2c876d4b1527fa5
you can please test on pancakeswap
My question is how can I get the accurate conversion (with respect to the liquidity of the token, to get the accurate conversion like pancakeswap exchange does so as not to have the available USD balance exaggerated
Thanks