Currency Pair Rate
On this page, we’ll dive into the rate endpoint you can use to get the exchange rate of one currency pair as a single number, latest, for a past date or for a moment of the day.
When you only need one pair, for example EUR to USD, this endpoint saves you from picking it out of a full rates response: it returns the rate and its inverse, or with format=text nothing but the number, which spreadsheets can read directly.
Rates at a moment of the day
The datetime parameter needs a plan with intraday updates. On a plan with daily updates, the API responds with a 403: "You are not allowed to use the datetime parameter, please upgrade your plan".
Currency Pair Rate
Returns how many units of to one unit of from buys. Without date or datetime you get the latest rate at your plan’s update interval.
Required attributes
- Name
from- Type
- string
- Description
The currency to convert from (e.g.
EUR)
- Name
to- Type
- string
- Description
The currency to convert to (e.g.
USD)
Optional attributes
- Name
date- Type
- string
- Description
The rate at the close of this past day (format: 2021-12-31) Not together with
datetime
- Name
datetime- Type
- string
- Description
The rate at this moment (ISO8601 Datetime, e.g.
2026-09-30T10:07:30Z), see rates at a moment Needs a plan with intraday updates
- Name
precision- Type
- integer
- Description
Round
rateandinverseto this many decimals (0to10) By default values carry up to 10 decimals
- Name
format- Type
- string
- Description
json(default),text(only the rate as plain text, e.g.1.0887771),csv(from,to,rate,inverse,last_updated_at) orxlsxNumbers are never written in exponent notationxlsxgives the same table as an Excel workbook, see Excel downloads
Response Properties
- Name
meta.last_updated_at- Type
- string
- Description
The moment the rate applies to, as a datetime string
- Name
data.from- Type
- string
- Description
The currency converted from
- Name
data.to- Type
- string
- Description
The currency converted to
- Name
data.rate- Type
- float
- Description
Units of
tofor one unit offrom
- Name
data.inverse- Type
- float
- Description
Units of
fromfor one unit ofto
A request costs one request of your quota.
Rates at a moment of the day
With datetime the API answers with the rate of the minute, quarter hour or hour the moment falls in: the finest interval your plan updates at whose history still reaches back to the moment, the same points /range returns. meta.last_updated_at tells you which point that was.
- Name
minute and quarter hour- Type
- Description
- not more than 7 days back
- Name
hour- Type
- Description
- older moments, not more than 3 months back
Moments further back return a 422; use date for those days instead. A moment that is not stored yet gets the newest rate.
The rate at 10:07:30
curl -G https://api.currencyapi.com/v3/rate \
-d from=EUR \
-d to=USD \
-d datetime=2026-09-30T10:07:30Z \
-H "apikey: YOUR-API-KEY"
Response (plan with minute updates)
{
"meta": {
"last_updated_at": "2026-09-30T10:07:59Z"
},
"data": {
"from": "EUR",
"to": "USD",
"rate": 1.1695906433,
"inverse": 0.855
}
}
Plain text and CSV
Only the number
curl -G https://api.currencyapi.com/v3/rate \
-d from=EUR \
-d to=USD \
-d format=text \
-d precision=4 \
-H "apikey: YOUR-API-KEY"
Response (text/plain)
1.0888
With precision, the text has exactly that many decimals. With format=csv:
Response (text/csv)
from,to,rate,inverse,last_updated_at
EUR,USD,1.0887771,0.918456,2023-06-23T10:15:59Z
Google Sheets and Excel
Because format=text returns nothing but the number, a spreadsheet cell can load a rate with a single formula. Pass your API key as the apikey query parameter, as spreadsheets cannot send headers. Anyone who can open the sheet can see the key in the formula.
Google Sheets
=IMPORTDATA("https://api.currencyapi.com/v3/rate?from=EUR&to=USD&format=text&apikey=YOUR-API-KEY")
Excel
=VALUE(WEBSERVICE("https://api.currencyapi.com/v3/rate?from=EUR&to=USD&format=text&apikey=YOUR-API-KEY"))
WEBSERVICE returns text, so VALUE turns it into a number. In Excel versions set to a decimal comma, use NUMBERVALUE(WEBSERVICE(...), ".") instead. Add &date=2025-12-31 to the URL for the close of a past day.
Every recalculation of the formula is a request and counts against your quota.
Request
curl -G https://api.currencyapi.com/v3/rate \
-d from=EUR \
-d to=USD \
-H "apikey: YOUR-API-KEY"
Response
{
"meta": {
"last_updated_at": "2023-06-23T10:15:59Z"
},
"data": {
"from": "EUR",
"to": "USD",
"rate": 1.0887771,
"inverse": 0.918456
}
}