[solved] Hi guys, me again :) prices again are failing PLEASE FIX

This is for new tokens, maybe you guys did an update recently and forgot to reset or something to start picking up tokens that launched after your update. All tokens that launched yesterday or about 12hrs ago are being fetched for such as this one and many older ones

import Moralis from 'moralis';
import snakeToCamelCase from '@site/utils/snakeToCamelCase.mts';
{
  "tokenName": "Infinite Money Glitch",
  "tokenSymbol": "GLITCH",
  "tokenLogo": null,
  "tokenDecimals": "9",
  "nativePrice": {
    "value": "376704844",
    "decimals": 18,
    "name": "Ether",
    "symbol": "ETH",
    "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
  },
  "usdPrice": 6.805851457944863e-7,
  "exchangeAddress": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
  "exchangeName": "Uniswap v2",
  "tokenAddress": "0x1b10df8d02a8ab6d363a01202ef31a4390773c1f"
}

But for the new ones such as this one, its not being fetched

import Moralis from 'moralis';
import snakeToCamelCase from '@site/utils/snakeToCamelCase.mts';

try {
  await Moralis.start({
    apiKey: "YOUR_API_KEY"
  });

  const response = await Moralis.EvmApi.token.getTokenPrice({
    "chain": "0x1",
    "exchange": "uniswap-v2",
    "address": "0x10affebaa3a5f28ab502fa73488070b73f0428e3"
  });

  console.log(response.raw);
} catch (e) {
  console.error(e);
}
1 Like

I’ll send this to the devs, thanks for reporting

1 Like

also, you guys do fetch reserves for them, so you do have the needed data to get the prices, i would calculate them myself using the reserves and eth price but the issue is it gets a bit complicated since i have to replace the forumula in 5 different pages and also have to modify to get the price history in reserves, just too much of a headache, your api is great to save time, but it does seem to crash once per week :slight_smile: otherwise, keep up the great work

there is an endpoint specific for reserves

yes i know, i use it, but only to get reserves, i use the price api to get historical prices

it should be fixed in 5-10 minutes

1 Like

you are amazing, though i noticed that many apps are having issues with marketCap too, dextools isnt showing marketCap for the same tokens we arent getting prices for. Not sure if this was Moralis error, looks to be more uniswap issue possibly

its working already, we can mark this solved, thank you again for being so quick

2 Likes