Price check fails on Rinkeby network

I am having difficulty getting the price for a token I have created on Rinkeby testnet. I have about 2 Eth in the tokens liquidity in Uniswap. I am getting the error:

{code: 141, error: ‘No valid exchange found for the provided chain and/or to_block’}

Here is my code.

options = {
     address: "0x08B1437D5758C31f2bC3a00E73F0C202c6B34f39",
     exchange_name: "Uniswapv2",


Is it possible to get a custom token’s price of Rinkeby? How much liquidity does it take to get a price? Any ideas what I am doing wrong?


I don’t think that Moralis.Web3API.token.getTokenPrice works on rinkeby

Yes @cryptokid is right, getTokenPrice fetch token price data from mainnet exchanges directly, so you should specify the chain to some mainnet, otherwise you will not be able to get the token price from these DEXs

Do you know how much liquidity would be required to accurately get the price?

The price will be more accurate with more liquidity. If the liquidity is below $100 most probably the price can fluctuate a lot and not be accurate.