# Request Status Codes
For all requests, we will return an HTTP status code that indicates a success or the problem that has led to the failure.
A successful request will be returned with status code 200
Error responses contain a JSON body with a human-readable message and, for 403, 404 (no-data) and 422 errors
returned by the API endpoints, an info field linking to the relevant documentation. Validation errors (422)
additionally contain an errors object that maps each parameter name to an array of validation messages.
# API Error Codes
# 401
Invalid authentication credentials
# 403
You are not allowed to use this endpoint, please upgrade your plan (opens new window).
This happens when your plan does not include the convert (opens new window) or
range (opens new window) endpoint, when you request a range accuracy above your plan, or when your
plan limits range requests to a single currency and you request more than one.
# 404
A requested endpoint does not exist.
The rates endpoints also return a 404 when there is no data for your requested timeframe and accuracy:
"We sadly do not have any data in this timeframe for the selected accuracy."
# 422
Validation error, please check the list of validation errors: here
# 429
You have hit your rate limit or your monthly limit. For more requests please upgrade your plan (opens new window).
If you prefer to wait instead, retry after the period has reset: at the start of the next minute for the rate limit, or at the start of the next month for the monthly quota.
# 500
Internal Server Error - let us know: support@fxapi.com
# Validation errors
# Invalid currencies
One of the selected currencies is invalid, to get a full list of all currencies you can use the currencies endpoint.
# Invalid base_currency
The selected base_currency is invalid, to get a full list of all currencies you can use the currencies endpoint.
# Invalid date
The date is not a valid date. Please use the following format: YYYY-MM-DD
# Wrong format: value
The value must be a number.
# Chronological order issue: datetime_start
The datetime_start must be a date before or equal to datetime_end
# Invalid datetime_start
The datetime_start is not a valid date.
Datetime for the start of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime)
# Chronological order issue: datetime_end
The datetime_end must be a date after or equal to datetime_start
# Invalid datetime_end
The datetime_end is not a valid date.
Datetime for the end of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime)
# Invalid accuracy
The selected accuracy is invalid.
Possible Values: day, hour, quarter_hour, minute Default: day
# Invalid type
The selected type is invalid.
Possible Values: fiat, metal, crypto