How to triangulate an incorrect price

I’m checking the price of a coin on Polygon:

Here’s the response:

  "nativePrice": {
    "value": "45052026303068763650",
    "decimals": 18,
    "name": "Matic Token",
    "symbol": "MATIC"
  "usdPrice": 148918.39841653185,
  "exchangeAddress": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",
  "exchangeName": "Quickswap"

So the API says the value is ~$148k when the correct value is around $0.04 according to CoinGecko:

I have three questions:

  1. What’s up with this wrong price? I checked the pair reserves and it looks like there’s plenty of liquidity on quickswap.
  2. Can I change the exchange from quickswap to something else on polygon? The way you have multiple exchanges on eth?
  3. How do I interpret the the nativePrice “value”: “45052026303068763650” in the response? How do I convert this string into a number that makes sense? How do I reconcile this number against the usd price? For example, I tried nativePrice.value / 10^18 * usd price of matic as of that block == usd price. But this equation did not work.

@jswift24 testing out the API, give me a moment

@jswift24 i have reported the price issue to the team, will keep you updated

@jswift24 for this token i can see liquidity only on quickswap for polygon network, btw you can change the exchange by using the liquidity pair address

try converting value from wei : and then multiply by USD price

Using Moralis.Units.FromWei() will help with that. The value in the native object is the price of the token in the native token which is Matic in this case

It’s working fine. You can check again