Too many requests error#
About#
Contains a too many requests error message and data. The error occurs if more requests are made within a certain period than the application allows. The HTTP response contains the Retry-After header, which indicates when it is recommended to repeat the request for its successful completion. See more Rate limiting
Fields#
Name | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Error id |
error | string | Yes | Error name |
message | string | Yes | Error description |
metadata | object | Yes | Additional information about error. See below |
Metadata#
Name | Type | Required | Description |
---|---|---|---|
periodInSeconds | integer | Yes | rate limiting period in seconds |
creditsAvailable | integer | Yes | available credits for period |
creditsUsed | integer | Yes | used credits for period |
creditsRequired | integer | Yes | required credits for request |
recommendedRetryTime | datetime | Yes | recommended time to retry request |
Example#
{
"id": 1,
"error": "TooManyRequestsError",
"message": "The getAccountInformation API allows 1000 cpu credits per 1s to avoid overloading our servers. Please wait some time and retry your request or contact support to extend your quota. For more information see https://metaapi.cloud/docs/client/rateLimiting/",
"metadata": {
"total": 1000,
"available": 0,
"needed": 50,
"resourceId": 'user:userId',
"multiplierId": 'accountCount:userId',
"exceededConfig": 'perUser',
"exceededPeriod": '1s',
"recommendedRetryTime": "2022-05-31T09:00:52.361Z",
"method": "getAccountInformation"
}
}
Usages#
All responses of REST API