/erc20/{address}/price Web3 API sometimes returns undefined results

/erc20/{address}/price Web3 API sometimes returns undefined result.

Is it due to rate limit is hit?
This api consume 3 reqs/call. rate limited with 25 reqs/sec.

do you get more info on that result?

like some headers, or an error message, or a status code?

Error: Request failed with status code 500.
headers: {
Accept: ‘application/json’,
‘X-API-Key’: ‘***’,
responseType: ‘json’,
method: ‘get’,
url: ‘https://deep-index.moralis.io/api/v2/erc20/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c/price?chain=bsc&exchange=0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73’,
data: undefined

It happens very rarely. I’m confused if it’s caused by a rate limit middleware, or other!

it looks like it is not related to rate limit, you can retry when you get that error

I run an automated app, token prices (in usd and bnb) are requested in some methods. It’s not for only one request.

I mean that if you get an error for a request, you can retry it after a delay, in general you could do that

Great idea :slight_smile: Thank you @cryptokid ^^