Fantom Price Fetch Error | Returns Empty Object

Hello, You Marvelous Moralians!,

The Problem:

When trying to acquire the price of token using the testing endpoint shown in the attached screenshot, it returns an empty object.

The specific (and random) Fantom token I am trying to get price data on is this:
https://www.dextools.io/app/fantom/pair-explorer/0x1d4acefaefe40d8295367bb7585ad58a4ed9f7de

How to Reproduce the Problem:

  • Go to the appropriate testing endpoint in your Moralis Admin console (UI & endpoint name shown in attached screenshot).

  • Fill out the fields as follows:
    – Set the “chain” field to “fantom”
    – Set the “exchange” field to “SpookySwap”
    – Set the “address” field to “0xba92dba29d76a5dffdeda840ad4cbf5fe2f2ddae”

  • Click the “Execute” button.
    – Now, if the error is occurring, it should return an empty object. Ideally, when things are working correctly, it should return an object with various token data, one item of which is the current price of the token.

Attempted Solutions:

  • I have tried changing the aforementioned “exchange” field to:
    – “spookyswap”
    – “SPOOKYSWAP”
    – “SpookySwap”

  • I have tried changing the aforementioned “address” field to:
    – “0xba92dba29d76a5dffdeda840ad4cbf5fe2f2ddae” (this is the token’s contract address).
    – “0x1d4acefaefe40d8295367bb7585ad58a4ed9f7de” (this is the token’s pair address).

Closing Appreciation & Gratitude:

Thank you in advance for reading this and taking the time to formulate your thoughts, and not to mention help out the community. Cheers!

In the meantime I am using an alternative solution (that’s not quite optimal, but it works!) that I posted here, to a similar price-acquisition issue (for BSC tokens. Simply change the network to Fantom and boom, now it works with the Fantom network):

P.S. I know of a way to acquire the price of this token using other methods, but they are not nearly as simple as the Moralis price API endpoint. They are also somewhat complex compared to the concise, reliable and elegant Moralis solution. I would much rather use Moralis over other data providers!

I’ll get back when we’ll add token price api to Fantom chain, no ETA now

1 Like

Thank you @cryptokid . :100: