Skip to main content

API consumption limit (rate limit)

The BTG Pactual Empresas APIs impose a per-minute request limit on their APIs.

To let the integrating system identify whether it is approaching the limit, this information is provided via headers in the response of all APIs.

HeaderDescription
X-RateLimit-LimitRequest limit per minute within the window
X-RateLimit-RemainingRemaining requests in the request window
X-RateLimit-ResetUnix timestamp for the request window reset

Consumption is calculated per clientId making the request. In other words, if your system consumes a very high volume and has only 1 clientId, it is essential to implement a flow that checks these values.

Consumption occurs regardless of whether the API response returns success or error.

Once the limit is reached, our system returns the 429 code with the following payload:

{
"limit":120, //Quota of calls per minute
"reset_in_seconds":4, //Time in seconds until the quota resets
"identifier":"1a4b0f90-9e5a-4b51-a097-c88660c19ad4",
"message":"Too many requests. Please try again later."
}