Errors and Limits

When a request fails, the Quentrade API returns an error object with a relevant HTTP response code and additional information to help identify and resolve the issue.

HTTP Status Codes

Errors generally return a 4xx response code (client error) or 5xx (server error):

4XX

Malformed requests (issue is on the sender's side).

401

Authentication failed. Possible causes: invalid or expired API key, invalid request signature, or request from a non-whitelisted IP address.

403

Access denied. Two possible causes: (1) the API key does not have the required permission enabled (e.g. BOTS_READ) — check the key's permission settings in your Quentrade account; (2) the operation is not allowed for this resource in its current state (e.g. deal cannot be cancelled or active subscription is required).

404

Resource not found. The requested endpoint or record ID does not exist.

429

Request rate limit exceeded. You must slow down requests to avoid IP banning.

418

IP auto-banned for continuing to send requests after receiving 429 codes.

5XX

Internal errors (issue is on Quentrade's side).

504

Gateway timeout, indicating the API couldn't get a timely response.

2XX

Success responses return a 2xx status code.

Attributes

errorstring required

Specific error codes and messages defined for the API.

error_descriptionstring

Localized, extended human-readable description of the error.

error_attributesobject

Lists fields that did not pass validation with specific constraint messages.

Error Object

When an error occurs, the API returns an error object instead of a data object or array. Error responses have the following payload format:

error_response.json
Error Schema
{
  "error": "record_invalid",
  "error_description": "Invalid parameters",
  "error_attributes": {
    "api_key": ["is too short (minimum is 5 characters)"],
    "secret": ["is too short (minimum is 5 characters)"],
    "name": ["is too short (minimum is 2 characters)"]
  }
}

Rate Limits

General Rules

Our REST API enforces a maximum of 100 requests per minute.

If the rate limit is exceeded, the API will respond with an HTTP status code 429 Too Many Requests, and access will be temporarily restricted for a mitigation period of 300 seconds.

Rate limits for specific endpoints

GET/api/v1/bots/dca
120 requests per minuteMitigation period: 60 seconds
GET/api/v1/smarttrade
60 requests per minuteMitigation period: 30 seconds
GET/api/v1/terminal/orders
120 requests per minuteMitigation period: 60 seconds
POST/api/v1/terminal/order
30 requests per minuteMitigation period: 30 seconds

Important Notice on Rate Limits & IP Bans

After receiving a 429 Too Many Requests status code, you must reduce the frequency of your requests. Repeated violations or failure to slow down after a 429 response may result in an automatic IP ban (HTTP status 418).

IP bans are tracked and increase in duration for repeated violations, ranging from 2 minutes to 3 days.