Convert Exchange Rates
On this page, we’ll dive into the convert exchange rates endpoint you can use to directly convert a value to another currency's value.
The convert endpoint is not available on the free plan — it is included in all paid plans (>= small). On plans without it, the API responds with a 403: "You are not allowed to use the convert endpoint, please upgrade your plan".
Convert Exchange Rates
Returns calculated values for today or any given date for all currencies.
Required attributes
- Name
value- Type
- number
- Description
The value you want to convert. Must be greater than 0
Optional attributes
- Name
date- Type
- string
- Description
Date to convert against historical rates (format: 2021-12-31) Must be at least one day in the past; omit for the latest rates
- Name
base_currency- Type
- string
- Description
The base currency to which all results are behaving relative to By default all values are based on USD
- Name
currencies- Type
- string
- Description
A list of comma separated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown
- Name
type- Type
- string
- Description
The type of currency you want to get (fiat, metal or crypto) By default all types will be shown
Response Properties
The response structure is equal to the response from the /latest endpoint, but every value is already multiplied by the value you sent — no manual math needed.
Request
curl -G https://api.currencyapi.com/v3/convert?value=12 \
-H "apikey: YOUR-API-KEY"
Full Response
{
"meta": {
"last_updated_at": "2022-01-01T23:59:59Z"
},
"data": {
"AED": {
"code": "AED",
"value": 44.07672
},
"AFN": {
"code": "AFN",
"value": 1101.63048
},
"ALL": {
"code": "ALL",
"value": 1298.74848
},
"AMD": {
"code": "AMD",
"value": 5764.99908
},
"...": "180+ more currencies"
}
}