Understand headers to avoid IP BAN

Hello everyone,

I have some doubt about response header in order to avoid an IP ban, I’m reading the documentation at https://docs.moralis.io/misc/rate-limit#rate-limits-when-calling-web3-api-using-http but the headers returned by the service are not corresponding with the doc.

So, let suppose that we are calling the api /ipfs/uploadFolder with a free account, and I receive these headers:

So if I understand well the meaning of header are (for second):
x-rate-limit-limit -> The rate limit
x-rate-limit-weight -> The weight for the api
x-rate-limit-used -> The rate limit already used
x-rate-limit-ip-used -> The rate limit already used for that specific IP address
x-rate-limit-remaining-ttl -> ???
x-rate-limit-remaining-ip-ttl -> ???

If I understand well in this way I can call the api just one time for second, but in some test I called the api twice in less than a second and got a positive answer. If I call the same api for example 200 time in less than a minute, will I reach the rate limit for minute and get banned?

So the questions are:
How can I know how much time I’ve to wait to avoid rate limit?
What is the meaning for ttl?
How many request can do for minute for a single api?


There is no limit per minute now, only per second.

There is a endpoint in web3api that provides the info for every other endpoint about rate limit cost per second.

Hi @cryptokid yes I read the documentation and also called the api that you suggest but there is no indication about ip ban, how it works? Is a very sensitive topic about our project and there is no indication in the documentation, so following the example that I provided If I call the api 200 time in a minute Will I get banned? And if yes for how much time? And what ttl stand for? there aren’t any kind of indication in the doc either in the api.

You shouldn’t get banned, if you get banned it will be a ban from cloudflare that could be for one hour.

Ok @cryptokid but if I have to be honest that β€œshouldn’t” is not so encouraging however do you know how can we avoid to get banned by cloudflare? And the ttl in header what stand for?

That ttl will be 1 now because the rate limit is per second. Id you get an error you shouldn’t make thousands of requests per second, eventually you will get banned by cloudflare if you do that.