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!