Log in

Quotas

To ensure maximum availability of the service, we put limits on API requests per second/minute/hour from users:

  • Restriction on the number of requests from an IP:
    • 100 requests per second
    • 1000 requests per minute
  • Restriction on the number of requests from an authorized user (API User ID):
    • 10 requests per second
    • 100 requests per minute
    • 1000 requests per hour
  • Restriction on the number of request errors from an authorized user:
    • 60 requests per minute

    The system temporarily blocks the API access if requests contain errors. The restriction remains valid even when the determined errors are fixed.

  • Restriction on the number of requests from an unauthorized user:
    • 10 requests per second

    An unauthorized user is a user who, while accessing the API, did not pass the signature or passed the incorrect signature. Users are considered unauthorized if MyTracker cannot identify them.

Some API sections are assigned with additional limit types and request rates.

Request quotas can change during the time. We will update this article accordingly.

Review quotas

You can retrieve information about quotas by sending the GET request, where quotas returns information on the number of quotas.

https://tracker.my.com/api/open/user/v1/quotas/get.json

Exceed quotas

The quota limit check performs according to the following algorithm — first, quotas for IP, then quotas for an authorized user, and after that quotas for request errors. The number of quotas is checked for each time interval based on each type of restrictions. When the quota limit is reached, the system blocks access to the API until the end of the corresponding time interval.

For example, if a user sent 1000 requests in less than an hour, the system restricts the sending of further requests until the end of this hour because the user exceeded the provided quota.

After one of the quotas is exceeded, the API returns a response with HTTP status 429 (Too Many Requests). The message will contain the following information about the restriction type:

  • quota name;
  • current quota value;
  • limit quota value;
  • timestamp when the quota resets;
  • the number of seconds until the quota resets;
  • quota status.

The following example shows the response to a request that exceeded a minute quota:

{
  "code": 429,
  "message": "Too Many Requests",
  "data": {
    "error": {
      "info": {
        "quotas": [
          {
            "name": "RequestsByUserPerSecond",
            "count": 3,
            "limit": 10,
            "resetTime": 1500000291,
            "resetInSecond": 1,
            "exceeded": false
          },
          {
            "name": "RequestsByUserPerMinute",
            "count": 127,
            "limit": 100,
            "resetTime": 1500000320,
            "resetInSecond": 30,
            "exceeded": true
          },
          {
            "name": "RequestsByUserPerHour",
            "count": 100,
            "limit": 1000,
            "resetTime": 1500000800,
            "resetInSecond": 510,
            "exceeded": false
          }
        ]
      }
    }
  }
}

The response can include more than one quota and quotas that have not yet been exceeded. It can help you to know when you will be unblocked and what the request rate should be.

Increase quotas

If needed, upon request, the MyTracker support team can increase quotas for IP or authorized user (App User ID).

Contact the MyTracker support team in any way convenient for you.

Was this article helpful?