Skip to main content

Why are limit headers not always showing on a request?

The reason why response headers are not always present in the API responses is that, in some cases, we are unaware of their specific usage or requirements. To ensure that we promptly respond to your API calls and avoid unnecessary delays, we choose to provide a response without including the response headers. This decision is made with the intention of optimizing the operation of our API. By selectively excluding the inclusion of response headers in every request, we can enhance the overall performance and efficiency of the API.

It takes a while to verify the current usage as for the very first call for a given client we do not have a rate limit then yet. Once the request is made, we start the rate limit verification process In the background. We may then in the meantime process many requests for this client and at some point we append the result of current usage to the header. All requests that were made during that process are also included in the limit after some time.

For example (each bullet point representing a request made):

  • Request (no info about clients usage)
  • What's the usage? Starting the verification
  • Request
  • Request
  • 5 requests used today (those 3 above are not counted yet), appended to the header
  • Request (5 used)
  • Request (5 used)
  • Request (5 used)
  • Request (5 used)
  • Request (10 requests used today)

To provide clarity and transparency regarding the absence of response headers, we have documented this behavior on our official documentation page, which can be found at https://docs.coinapi.io/market-data/rest-api#request-limit--apikey