Alchemy API

Enterprise Grade API for Ethereum

Jumpstart your Ethereum development with Alchemy!
Instead of running your own nodes and building your own architecture,
just plug into our API and get back to focusing on developing
your application.

Get Started

Rate Limits

What Is A Rate Limit

Your plan has a certain capacity for the number of requests per second your application can make. If your application exceeds this capacity then your requests get rate limited. For most cases this is totally fine and as long as you handle them properly will not affect your users at all.

Check out the rest of this page and if you have any questions, reach out to us! We're here to help you out!

How To Handle

For the majority of cases, your app probably just had a momentary spike in requests that can easily be handled by implementing retries. Having retries is a best practice to ensure a great user experience even if you aren't hitting rate limits.

If you notice that more than 20-40% of your requests are getting rate limited for more than a couple hours, reach out to us and we'll help you upgrade your capacity!

Some Technical Details

Rate Limit Types
There are two types of rate limits:

  • Requests per second
  • Concurrent requests

These may seem like the same thing, but most requests take a few milliseconds so your app's requests per second will be significantly higher than its concurrent requests.

Response

When you exceed your capacity, you will receive a rate limit response. This response will be different depending on whether you are connecting to Alchemy using HTTP or WebSockets.

HTTP

You will receive an HTTP 429 (Too Many Requests) response status code.

WebSockets

You will receive a JSON-RPC error response with error code 429. For example, the response might appear

{
  "jsonrpc": "2.0",
  "error": {
    "code": 429,
    "message": "Too many concurrent requests"
  }
}

Retries

All you need to do to easily handle rate limits is to retry the request with an exponential backoff. This is a great idea to ensure great user experiences with any API even if you aren't hitting rate limits as often the internet just randomly drops requests in transit.

Option 1: Alchemy.js
If you're using Web3.js, just use the Alchemy.js wrapper for Web3. We handle all of the retry logic for you!

Option 2: Implement Retries
When you see a 429 response, retry the request with a small delay. We suggest waiting a random interval between 1000 and 1250 milliseconds and sending the request again, up to some maximum number of attempts you are willing to wait.

Final Tips

Use a different key for each part of your project (ex: frontend, backend, development). As a bonus, you now get to see analytics segmented by each app!

We're here to help! If you have any questions reach out to us!!

Updated 5 months ago

Rate Limits


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.