Enriched Requests

Documentation for the Enriched ExchangeRate-API endpoint.

To use our Enriched endpoint make the three substitutions explained below and then send a GET request.

• Substitute `YOUR-API-KEY` with the API key displayed in your dashboard.

• Substitute `GBP` with the code you want to use as a base currency.

• Substitute `JPY` with the code you want to use as a target currency.

We use ISO 4217 Three Letter Currency Codes - e.g. USD for US Dollars, EUR for Euro etc. Here are the codes we support.

GET https://prime.exchangerate-api.com/v5/YOUR-API-KEY/enriched/GBP/JPY

This will return the exchange rate from your base code to the target code, as well as extra data for the target currency:

{
	"result": "success",
	"documentation": "https://www.exchangerate-api.com/docs",
	"terms_of_use": "https://www.exchangerate-api.com/terms",
	"time_zone": "UTC",
	"time_last_update": 1580947200,
	"time_next_update": 1580950860,
	"base": "GBP",
	"target": "JPY",
	"rate": 142.0543,
	"target_data": {
		"locale": "Japan",
		"two_letter_code": "JP",
		"currency_name": "Japanese Yen",
		"currency_name_short": "Yen",
		"display_symbol": "a5",
		"flag_url": "https://www.exchangerate-api.com/img/docs/JP.gif"
	}
}

NOTE: How to Use Currency Display Symbols

We supply a comma delimited list of unicode hex references for use in your HTML. You will need to separate and then wrap these hex codes with &#x and ; as follows:

"43b,432"

would become

лв

yielding лв.

Note that sometimes just a single hex reference will be returned, i.e. without any commas. For instance just "24", which when wrapped as

$

will display the $ symbol.


Error Responses

{
	"result": "error",
	"error": "unknown-code"
}

Where "error" can be any of the following:

  • "unknown-code" if we don't support the supplied currency code (see supported currencies...)
  • "malformed-request" when some part of your request doesn't follow the structure shown above
  • "invalid-key" when your API key is not valid
  • "quota-reached" when your account has reached the the number of requests allowed by your plan
  • "not-supported-on-plan" if your plan level doesn't support this type of request

If you have any questions about this documentation please contact us!