Skip to main content

Rate Limiting

When using the Ethereum JSON-RPC APIs, Advanced APIs, and NFT APIs, the number of allowed requests are limited by a rate limit, measured in "request-units". Currently, for the Node projects each API request is 1 unit, therefore 1 API call uses 1 request-unit.

info

The number of request units per API request is subject to change in the future as more APIs are released.

Rate limitsFree planScale plan
Daily120k request-units per day300k request-units per day
Burst20 request-units per second50 request-units per second

The burst limit of request-units/second refers to a set of requests made concurrently. Making more concurrent requests than the plan's burst limit will result in hitting a rate limit, even if you are under the daily request limit.

Rate limit error code

If you exceed your daily or burst rate limit, your requests will return with error code 429: too many requests.

Retrying

If you're getting 429 errors from hitting your burst limit, but haven't hit your daily limit yet, the best thing to do is to retry your API call. Retrying failed API calls is an effective strategy in making your dapp more robust and ensuring a good user experience.

A couple popular strategies for retrying API calls are simple retries and exponential backoff.

Simple retries

Simple retrying is the easiest strategy for retrying API calls that failed due to hitting the burst rate limit. To implement a simple retry:

  1. Receive 429 response from API call
  2. Wait a random interval between 1000 and 1250 milliseconds (since burst rate limiting is per second)
  3. Send the request again
  4. Repeat until success or or you hit some maximum number of retries

Exponential backoff

Exponential backoff is a more sophisticated version of simple retrying. To implement the simplest version of exponential backoff:

  1. Receive 429 response from API call
  2. Wait 500 ms before retrying request
  3. Receive 429 response from API call
  4. Wait 1000 ms before retrying request
  5. Repeat until success, doubling the wait time after each retry, until you hit some maximum wait time

Rate limit indicator

To see your remaining request units for the day, navigate to your project dashboard in the Coinbase Cloud console.

Rate limit indicator UX

As you use request units throughout the day, usage will appear on the indicator bar. When the bar is full, you should expect your requests to be rate-limited.

info

Rate limits reset every UTC 00:00.

Was this helpful?