EDIT:
I think I may have figured it out. The app blasts out all of the getTokenPrice
requests all at once, via map technique:
prices = await Promise.all(results.map(async (e) => await Moralis.Web3API.token.getTokenPrice({chain:chn, address: e.get("token_address")})
So I did an experiment and instead serialized the requests, waiting for a response from each before sending the next request. Viola, no more 141 Rate Limit errors. (Although itâs now painfully slow.)
The rate limit page mentions 3000 requests/minute. Does that also mean 50/sec? Because it was well within the 3000/min, even taking into account the â3 requests per requestâ below.
And it states 3 ârequestsâ per each /erc20/{address}/price
fetch. So maybe an app should somehow impose self-rate-limiting to the tune of 16.67 getTokenPrice
per second?