# Convert Exchange Rates
Returns calculated values for today or any given date for all currencies.
Plan required
The convert endpoint is not part of every plan. If your plan does not include it, requests fail with a 403 status code:
{
"message": "You are not allowed to use the convert endpoint, please upgrade your plan",
"info": "For more information, see documentation: https://fxapi.com/docs/status-codes#_403"
}
To use this endpoint please upgrade your plan (opens new window).
Plan required for datetime
The datetime parameter needs a plan with intraday updates; on a plan with daily updates, requests with datetime
fail with a 403 status code: "You are not allowed to use the datetime parameter, please upgrade your plan".
Request Method: GET
Request URL: https://api.fxapi.com/v1/convert
# Request Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
apikey | string | ️ | Your API Key |
value | number | ️ | The value you want to convert Must be greater than 0 Or send values instead, see several amounts |
values | string | Instead of value: up to 100 comma-separated values (9.99,24.50,100), each greater than 0Not together with value, see several amounts | |
date | string | ️ | Date to retrieve historical rates from (format: 2021-12-31) Must be at least one day in the past and not before 1999-01-01 Omit for the latest rates |
datetime | string | Convert at this moment (ISO8601 Datetime, e.g. 2026-09-30T10:07:30Z), see conversions at a momentNeeds a plan with intraday updates; not together with date | |
base_currency | string | The base currency to which all results are behaving relative to By default all values are based on USD | |
currencies | string | A list of comma-separated currency codes which you want to get (EUR,USD,CAD) The array form currencies[]=EUR¤cies[]=USD is also acceptedBy default all available currencies will be shown | |
type | string | Filter the returned currencies by type Possible Values: fiat, metal, cryptoBy default currencies of all types are returned | |
round_step | number | Adds rounded: every converted value rounded to a multiple of this step (e.g. 0.05, 1, 10)Not together with price_ending, see shop prices | |
price_ending | number | Adds rounded: every converted value rounded to a price with this ending (0 up to below 1, e.g. 0.99), see shop prices | |
round_mode | string | How round_step and price_ending round: nearest (default), up or down | |
locale | string | Adds formatted: every converted value as text in this locale (e.g. de_AT, en-US), see shop prices | |
shape | string | default or compactWith compact every converted value is a plain number ("EUR": 11.021472) instead of a code/value objectNot together with round_step, price_ending or locale | |
precision | integer | Round every converted value to this many decimals (0 to 10), e.g. 2 for amounts of money | |
format | string | json (default), csv or xlsx. The CSV has one row per currency: datetime,base_currency,currency,valueWith values an amount column follows base_currency; rounding and locale add the columns rounded and formattedxlsx gives the same table as an Excel workbook, see Excel downloads (opens new window) |
# Sample Response
The API response comes in easy-to-read JSON format and contains the converted values for all requested currencies.
meta holds last_updated_at, the base_currency, the value you sent and, when you sent one, the date.
{
"meta": {
"last_updated_at": "2022-01-01T23:59:59Z",
"base_currency": "USD",
"value": 1
},
"data": {
"AED": {
"code": "AED",
"value": 3.67306
},
"AFN": {
"code": "AFN",
"value": 91.80254
},
"ALL": {
"code": "ALL",
"value": 108.22904
},
"AMD": {
"code": "AMD",
"value": 480.41659
},
"...": "150+ more currencies"
}
}
With shape=compact and precision=2 you get plain amounts, rounded to cents:
curl -G https://api.fxapi.com/v1/convert \
-d value=12 \
-d currencies=EUR,GBP \
-d shape=compact \
-d precision=2 \
-H "apikey: YOUR-API-KEY"
{
"meta": {
"last_updated_at": "2023-06-23T10:15:59Z",
"base_currency": "USD",
"value": 12
},
"data": {
"EUR": 11.02,
"GBP": 9.43
}
}
# Several amounts in one request
Send values instead of value to convert up to 100 amounts at once, for example every price of a product list.
data is then a list with one entry per amount, in the order you sent them: the value and its converted
currencies. meta.values replaces meta.value. The request costs one request of your quota, however many amounts it
holds; values[]=9.99&values[]=24.50 is accepted as well.
curl -G https://api.fxapi.com/v1/convert \
-d values=10,2.5 \
-d currencies=EUR \
-d shape=compact \
-H "apikey: YOUR-API-KEY"
{
"meta": {
"last_updated_at": "2026-09-29T23:59:59Z",
"base_currency": "USD",
"values": [10, 2.5]
},
"data": [
{
"value": 10,
"currencies": {
"EUR": 9
}
},
{
"value": 2.5,
"currencies": {
"EUR": 2.25
}
}
]
}
With format=csv every row carries its amount after base_currency:
datetime,base_currency,amount,currency,value
2026-09-29T23:59:59Z,USD,10,EUR,9
2026-09-29T23:59:59Z,USD,2.5,EUR,2.25
# Conversions at a moment of the day
With datetime the value is converted at the rate of the minute, quarter hour or hour the moment falls in, exactly as
the rate (opens new window) endpoint finds it: minutes and quarter hours for
the last 7 days, hours for the last 3 months, at the finest interval your plan updates at. meta.last_updated_at tells
you which point was used. Moments further back return a 422; use date for those days instead.
curl -G https://api.fxapi.com/v1/convert \
-d value=100 \
-d currencies=EUR \
-d datetime=2026-09-30T10:07:30Z \
-H "apikey: YOUR-API-KEY"
On a plan with minute updates:
{
"meta": {
"last_updated_at": "2026-09-30T10:07:59Z",
"base_currency": "USD",
"value": 100
},
"data": {
"EUR": {
"code": "EUR",
"value": 95
}
}
}
# Shop prices: rounding and formatting
Converted prices rarely look like prices. Two options turn them into amounts you can show in a shop, while value
always stays the exact conversion:
round_stepaddsrounded, the value rounded to a multiple of the step:0.05for 5-cent steps,1for whole amounts,10for tens. Must be greater than 0.price_endingaddsrounded, the value rounded to a price with this ending:0.99turns 10.97 into 10.99,0.95gives 4.95, 9.95, ... Must be at least 0 and below 1. Not together withround_step.round_mode:nearest(default) picks the closest candidate,upnever goes below the exact value,downnever above it.localeaddsformatted, the amount as text in an ICU locale such asde_AT,en-USorfr_CH, with the currency's symbol and its own decimal places (at most 8). With rounding, the rounded price is formatted; a whole-numberround_stepshows no decimals. An unknown locale returns a422.
Rounding and locale work with the default shape and with CSV, which then gets the columns rounded and formatted
(in that order), but not with shape=compact (422). The text in formatted uses the spaces the locale prescribes,
e.g. a non-breaking space between symbol and amount for de_AT.
curl -G https://api.fxapi.com/v1/convert \
-d value=1371.11 \
-d currencies=EUR \
-d price_ending=0.99 \
-d locale=de_AT \
-H "apikey: YOUR-API-KEY"
{
"meta": {
"last_updated_at": "2026-09-29T23:59:59Z",
"base_currency": "USD",
"value": 1371.11
},
"data": {
"EUR": {
"code": "EUR",
"value": 1233.999,
"rounded": 1233.99,
"formatted": "€ 1.233,99"
}
}
}
The same with locale=en-US and format=csv:
datetime,base_currency,currency,value,rounded,formatted
2026-09-29T23:59:59Z,USD,EUR,1233.999,1233.99,"€1,233.99"