JSON RPC Error: error code: 1020

Hi there,

I’m trying to make calls to my bsc rpc archive node.
It used to work properly, but now I’m getting the following error.

Invalid JSON RPC response: "error code: 1020"

Any ideas what I’m doing wrong or how to correct it?
I’m afraid it might be the way I’m making calls, I’ve been trying to make a couple of hundred thousand requests in the past two hours.

I’m basically just making calls to a pancakeSwap contract to retrieve balances at certain blockheights.
await Contract.methods.balanceOf(FOUNDATION_BSC_ADDRESS).call({}, blockheight)

await Contract.methods.totalSupply().call({}, blockheight)

There is a limit of how many requests you can make per minute, 3600 requests per minute for the free version. I don’t know exactly if this is the problem but it could be.

Thanks, I’ll build in a request limiter. see if that helps

Any place where I can browse through the error codes that can be produced for the rpc?

Where can I see how much of my limit I’ve already used?

I sent you a DM on forum to ask for more information.

Hi @cryptokid, I am currently encountering this issue as well while trying moralis IPFS gateway. Can you help me with this?
I believe the my requests didnt reach thousands per minute

Hi @ali
Hopefully this will help: https://docs.moralis.io/misc/rate-limit#abuse-prevention-cloudflare-1020-error

did it happen that you are trying to access urls that start with /ipfs/baf prefix?