Handling errors

Our API employs standard HTTP status codes to communicate the nature of errors. These codes help you quickly identify the source of the problem and take corrective actions.

Client-Side Errors (4xx)

  • General Rule

    Any error code starting with '4' indicates an issue with the client-side request. This typically means there was an error in how the query was constructed or sent.

  • Error Details

    Each error response includes an error field for a human-readable description and, when applicable, a path field pinpointing the invalid argument to guide you towards resolution.

Example output
# Invalid API key
{
    "error": "Invalid API key."
}
# Passing invalid argument
{
    "error": "This value is not a valid currency.",
    "path":"base"
}

Server-Side Errors (5xx)

  • General Rule

    Error codes starting with '5' signify server-side issues. These are problems on our end.

  • Error Details

    Due to the diverse nature of these errors, they are not always easy to predict. However, we will do our best to provide a human-readable description of the issue in the 'error' field.

  • HTTP 503 (Service Unavailable)

    This can occur during scheduled maintenance.

Rate Limiting and Error 429

  • Exceeding Plan Allowance

    If you exceed your plan's allowance, you might receive an HTTP 429 error. This means that you have reached your plan's limit and will be temporarily blocked from making further requests.

  • Temporary Cooldown

    This error can also indicate a temporary cooldown to prevent service abuse.

  • Retry-After Header

    If you receive this error, please check the "Retry-After" header in the response. This header will indicate the number of seconds you need to wait before making another request.