Hey there.
I just found about the Moralis and I love it! It’s basically everything I was looking for past 3 months to have something like this and be able to build quickly apps.
I have a problem tho.
When it comes to the prices for the token it seems there is a big Discrepancy for the tokens that have a Hight supply and low price per token.
All is good when the price is no less than 0.00001 I guess but everything lower seems to bring a big discrepancy.
For example, given the Baby Doge token prices
Current price :
0.00000000194071
(taken from PooCoin)
0.000000001
(taken from Moralis API)
0.0000000019356
(taken from my own Price Calculation)
As U can see there Is aaa big difference between the Price and impact on calculations it implies.
Consider this transaction
73,530,000,000 ($139.71)
- BSC SCAN
73,530,000,000 ($142.70) (0.00000000194071 * 73530000000)
- PooCoin
73,530,000,000 ($73.53) (0.000000001* 73530000000)
- Moralis API
73,530,000,000 ($142.32) (0.0000000019356* 73530000000)
- MyOwn
As U can see there is almost a 50% ~difference in Price for MORALIS!!!
I had the same issue with my API and what I could suggest is to either increase the decimals up to the price is calculated for or expose a parameter for flexibility that user could define how many decimal places should be taken into consideration for price calculation
Currently seems Moralis is restricted to the Token Decimals price calculation which in this case is 9 decimals. If I would be able to define in parameter for the API CALL for example 13 decimals the price calculation would be closer to what It should be.
This is a big flaw to me currently which restricts me from using Moralis APIs in its full potential and I need to sitck to my own solutions.
Until this is somehow fixed I can’t fully use Moralis the way I would like to
P.S.
Also good idea would be to think about priceUSD type representation. Currently it seems it doesn’t handle big numbers so low prices like 0.00000000012312 are represented as 1e-8 for example instead of the number. Maybe worth considering would be an option to represent numbers as strings like bignumber.js does.