When a request fails, the Currencylayer API returns a JSON object with "success": false and an error object containing a numeric code and a plain-text info message explaining what went wrong.
Error Response Format
{
"success": false,
"error": {
"code": 104,
"info": "Your monthly usage limit has been reached. Please upgrade your subscription plan."
}
}
Always check the success field before processing the response. When success is false, read the error.code and error.info fields to determine the cause.
General Errors (1xx)
| Code | Meaning | What to Do |
|---|---|---|
| 101 | Missing or invalid access key | Check that you are passing a valid access_key parameter. Verify it matches your Dashboard key. |
| 102 | Account inactive | Your account has been deactivated. Contact [email protected]. |
| 103 | Invalid API function | The endpoint you requested does not exist. Check the URL path (e.g., /live, /historical). |
| 104 | Monthly request limit reached | You have exceeded your plan's monthly API request quota. Upgrade your plan or wait for the next billing cycle. |
| 105 | Feature not available on current plan | The endpoint or parameter you requested requires a higher subscription tier. See the plan comparison table. |
| 106 | No results returned | Your query returned no data. This can happen when requesting rates for a date before the API's data begins (1999). |
Currency Errors (2xx)
| Code | Meaning | What to Do |
|---|---|---|
| 201 | Invalid source currency | The source currency code is not recognized. Use a valid 3-letter ISO 4217 code (e.g., USD, EUR, GBP). |
| 202 | Invalid currency code(s) | One or more currency codes in your currencies parameter are invalid. Check for typos and verify codes via the /list endpoint. |
Date Errors (3xx) — Historical Endpoint
| Code | Meaning | What to Do |
|---|---|---|
| 301 | No date specified | The /historical endpoint requires a date parameter in YYYY-MM-DD format. |
| 302 | Invalid date format | The date you entered is not valid. Use the format YYYY-MM-DD (e.g., 2024-06-15). |
Conversion Errors (4xx) — Convert Endpoint
| Code | Meaning | What to Do |
|---|---|---|
| 401 | Invalid "from" currency | The from currency code is not recognized. Use a valid 3-letter ISO 4217 code. |
| 402 | Invalid "to" currency | The to currency code is not recognized. Use a valid 3-letter ISO 4217 code. |
| 403 | Missing or invalid amount | The amount parameter is missing or not a valid number. Pass a positive numeric value. |
Time-Frame Errors (5xx) — Timeframe & Change Endpoints
| Code | Meaning | What to Do |
|---|---|---|
| 501 | No time-frame specified | You must provide both start_date and end_date parameters. |
| 502 | Invalid start_date | The start_date is not a valid date. Use YYYY-MM-DD format. |
| 503 | Invalid end_date | The end_date is not a valid date. Use YYYY-MM-DD format. |
| 504 | Invalid time-frame | The end_date is before the start_date, or the dates are otherwise invalid as a range. |
| 505 | Time-frame exceeds 365 days | The /timeframe endpoint supports a maximum range of 365 days. Narrow your date range. |
HTTP Status Codes
In addition to the API-specific error codes above, the server may return standard HTTP status codes:
| HTTP Status | Meaning |
|---|---|
| 200 | Success — the response body contains the requested data. |
| 404 | Not Found — the requested resource or URL does not exist. |
Best Practices
1. Always check the success field in every response before processing data.
2. Implement retry logic with exponential backoff for transient errors (HTTP 429, 500, 503).
3. Validate currency codes against the /list endpoint before making conversion or rate requests.
4. Monitor your monthly usage via the Dashboard to avoid hitting the 104 limit unexpectedly.
5. Log error codes and info messages to help diagnose integration issues quickly