{
"code": 141,
"error": "No pools found with enough liquidity, to calculate the price"
}
I got this error when I am trying to fetch the USD price for AVAX. I am using the Avalanche C-Chain main-net and I have enough AVAX on my account. but I keep getting this error.
Here is my input
import { useTokenPrice } from "react-moralis";
const TokenPrice = () => {
const { fetchTokenPrice, data: formattedData, error, isLoading, isFetching } = useTokenPrice({ address: "0x05e332209afcc94ec6ecaa0f19ca721cf5b67f69", chain: "0xa86a" });
return (
<div>
{error && <>{JSON.stringify(error)}</>}
<button onClick={() => fetchTokenPrice({ params: { address: "0x05e332209afcc94ec6ecaa0f19ca721cf5b67f69", chain: "0xa86a" } })}>Refetch</button>
<pre>{JSON.stringify(formattedData, null, 2)}</pre>
</div>
);
}