Additional guidance

Errors & Exceptions

Xe uses conventional HTTP response codes to indicate the success or failure of an API request, in general:

  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an error that failed given the information provided.
  • Codes in the 5xx range indicate an error with Xe's platform.

HTTP Status Code Summary

HTTP Error CodeDescription
200 — OKEverything worked.
400 — Bad RequestThe request was not accepted, often due to validation or missing parameters.
401 — UnauthorizedUsername/password not valid.
404 — Not FoundThe requested resource does not exist.
429 — Throttle ErrorOver 900 requests per 15 minutes.
500 — Server ErrorsSomething went wrong on Xe's platform.

Examples of API errors

ScenarioDetailsMessage
Authentication Invalid CredentialsXECD API will return 401 Unauthorized Message{ code: 1, message: Bad credentials, documentation_url: https://developers.xe.com/docs/currency-data-api }
Monthly Rate Request Limit ExceededOccurs when the account has exceeded allotted rate requests for the month.{ code: 3, message: Monthly rate limit exceeded., documentation_url: https://developers.xe.com/docs/currency-data-api }
No Rates for Requested Currency and DateNo Rates for Requested Currency and Date{ code: 7, message: No {0} found on {1}, documentation_url: https://developers.xe.com/docs/currency-data-api }, where {0} is the currency and {1} is the date/time in the format yyyy-MM-dd'T'HH: mm: ssZ
Free Trial EndedOccurs when a user attempts to access XECD API with an account where the free trial period has ended{ code: 9, message: Free trial ended, documentation_url: https://developers.xe.com/docs/currency-data-api }
No Rates Available on requested datesThis alert will be returned when there are no rates available for the requested range of date/times.{ code: 10, message: No rates available between {0} and {1}, documentation_url: https://developers.xe.com/docs/currency-data-api }, where {0} and {1} are replaced by the start and end date/times in the format yyyy-MM-dd'T'HH: mm: ssZ
Invalid YearOccurs when an invalid year is specified{ code: 14, message: Year {0} is invalid, documentation_url: https://developers.xe.com/docs/currency-data-api }

On this page

Get help