Information about API rate limits and how to handle them
The OneBalance API implements rate limiting to ensure fair usage and availability of the service for all users. Rate limits are applied on a per-API key basis.
User Type | Request Rate Limit | Concurrent Connections |
---|---|---|
Public API Key | 60 requests per minute | 1 per IP address |
Authenticated Users | Custom rate limits | Custom limits |
Authenticated users receive higher rate limits based on their specific needs. Please contact our team if you require increased limits for your production application.
Once you exceed your limit, your requests will be temporarily rejected until the rate limit window resets.
The rate limiting information is included in the response headers of each request:
Header | Description |
---|---|
x-ratelimit-limit | The maximum number of requests you’re permitted to make per minute |
x-ratelimit-remaining | The number of requests remaining in the current rate limit window |
x-ratelimit-reset | The time at which the current rate limit window resets in Unix epoch seconds |
As long as the x-ratelimit-remaining
count is above zero, you’ll be able to make additional requests.
Each request contributes toward your rate limit count for one complete minute. This means that the entire rate limit doesn’t reset at once. Rather, each request expires individually one minute after it was made.
The value of the x-ratelimit-reset
header indicates when the oldest request will expire and no longer count toward your limit.
If you exceed the rate limit, the API will return a 429 Too Many Requests
status code. We recommend implementing the following strategies to handle rate limits effectively:
Some endpoints may have special rate limit requirements that are independent of the general limits defined above.