Skip to main content
Tesouro uses rate limiting to protect against spikes of incoming traffic that can put our systems at risk. These limits help us ensure that Tesouro remains stable and usable for everyone. If you exceed the rate limit, you will receive a 429 Too Many Requests HTTP response. When this happens, wait before retrying the request.

Rate limiting details in GraphQL responses

Rate limiting details are included in the extensions field of a GraphQL response:
FieldDescription
rateLimit.requestRateThe current rate of requests
rateLimit.remainingThe remaining number of requests before reset
rateLimit.retryAfterMsHow long to wait (in ms) before retrying a request
rateLimit.resetAfterMsHow long (in ms) until the rate limit resets

Example response

{
  "data": {
    /* query result here */
  },
  "extensions": {
    "rateLimit": {
      "requestRate": 1,
      "remaining": 48,
      "retryAfterMs": 0,
      "resetAfterMs": 20
    }
  }
}

Handling rate limits

  1. Check the extensions field: Examine the extensions field for rate limiting information. If remaining is zero, you have exceeded the rate limit and need to back off.
  2. Implement a backoff strategy: If rate limits are exceeded, wait for the resetAfterMs duration before retrying the request. Consider using exponential backoff for retries.
If the current rate limiting levels are not satisfactory for your integration, please contact your Account Manager at Tesouro to request an adjustment.