API Reference

/convert Endpoint

Complete reference for the currency conversion endpoint, including PPP adjustment, response fields, errors, and the triangulation formula.


Endpoint

GET https://api.currency-core.com/v1/convert

Plan and limits

/v1/convert is available on every plan. Two limits matter while integrating:

  • Free plan date window: date can only reach back 30 days. Older dates return 403 forbidden. Starter and above get full history.
  • Live keys are paid-only: a Free organization uses a test key. Live keys require a paid plan.

Each call accepts up to 25 targets in to. One call consumes one metered request regardless of how many targets it contains. amount must be greater than 0 and at most 1e15. A missing amount defaults to 1.

Query parameters

ParameterTypeRequiredDefaultNotes
fromstringYesnoneSource currency (ISO 4217), e.g. USD. When ppp=true, add a country as currency:country (e.g. USD:USA) if the currency is used in more than one country; common currencies resolve automatically.
tostringYesnoneOne or more target currencies, comma-separated. Each item is a bare currency (INR) or, when ppp=true, a currency:country pair (INR:IND). Max 25.
amountnumberNo1Amount to convert. Must be a finite positive number up to 1e15. Defaults to 1, so the response is the plain pair rate.
datestringNoLatest availableRate date in YYYY-MM-DD, interpreted as a UTC date. Must not be in the future. History reaches back to 1949 for the longest-running pairs, and coverage varies by currency. The Free plan is limited to the last 30 days and returns 403 for older dates. A non-trading day resolves to the most recent earlier snapshot (see requestedDate/asOf below).
pppbooleanNofalseWhen true, apply a PPP adjustment. Most currencies resolve to a default country; currencies used in several countries need an explicit currency:country pair. 1, true, yes, and on are treated as true.

All dates are UTC. The date you pass is treated as a UTC calendar date, and when omitted the latest available UTC rate date is used, so results don’t shift with the caller’s local timezone. Future dates are rejected with 400 invalid_input (there are no rates ahead of today).

The PPP year follows the date’s year (e.g. date=2021-06-01 uses 2021 PPP factors). When date is omitted, the latest actual (non-projected) PPP year is used. A back-dated request only uses actual (non-projected) PPP data, see Data availability below.

Country codes are ISO/IMF alpha-3 (e.g. USA, IND, DEU). Look them up via the /countries endpoint.

Multiple target currencies

to accepts a comma-separated list, so one call can fan out to many currencies:

?from=USD&amount=100&to=INR,EUR,JPY

PPP: country auto-resolution

When ppp=true, the API automatically resolves the country for most currencies using a canonical default, so you do not need to pass currency:country for common cases:

# Simple, country resolved automatically (USD→USA, INR→IND, EUR→DEU)
?from=USD&amount=100&ppp=true&to=INR,EUR

For currencies used in many countries without a single clear home (e.g. XCD covering 8 Caribbean islands), the API cannot pick one automatically and will return a per-target error asking you to specify:

# Explicit, required for ambiguous currencies, or to target a specific country
?from=USD:USA&amount=100&ppp=true&to=INR:IND,EUR:DEU,EUR:FRA

This is also how you target the same currency across multiple countries (each country has a different PPP factor):

?from=USD:USA&amount=100&ppp=true&to=EUR:DEU,EUR:FRA,EUR:ITA

The currency in each explicit pair must be an official currency of that country (the country’s PPP factor is denominated in that currency), so INR:IND is valid but EUR:IND is not. Pairs are validated per target: a bad pair only fails that target’s PPP (see Per-target PPP errors below), not the whole request. Use /countries to see each country’s currencies.

Response

The response always returns a results array, one entry per requested target. When PPP is not requested, the fromCountry, toCountry, and ppp fields are omitted entirely:

{
  "from": "USD",
  "amount": 100,
  "date": "2026-11-10",
  "results": [
    { "to": "INR", "result": 8345.00, "rate": 83.45 },
    { "to": "EUR", "result": 92.30,   "rate": 0.923 }
  ]
}

With PPP enabled, result is still the plain FX conversion; the PPP-adjusted amount lives in ppp.result. PPP is a price-level conversion of your amount, bridged through the international dollar:

ppp.result = amount × (toFactor / fromFactor)

It deliberately does not use the nominal FX rate. PPP replaces the market rate, it doesn’t compound it. So $100 in the US (factor 1.0) into India (factor 20.4) is 100 × (20.4 / 1.0) ≈ ₹2,040 (“what $100 of US goods costs in India”), independent of the ~₹83/$ market rate. Each ppp block also reports the year and source of the factors. The source country appears once at the top level as fromCountry, and each result carries its toCountry and ppp block (note EUR appears twice, once per country):

{
  "from": "USD",
  "fromCountry": "USA",
  "amount": 100,
  "date": "2026-11-10",
  "results": [
    { "to": "INR", "toCountry": "IND", "result": 8345.00, "rate": 83.45, "ppp": { "fromFactor": 1.0, "toFactor": 20.4, "result": 2040.00, "year": 2024, "source": "IMF World Economic Outlook" } },
    { "to": "EUR", "toCountry": "DEU", "result": 92.30,   "rate": 0.923, "ppp": { "fromFactor": 1.0, "toFactor": 0.72, "result": 72.00,   "year": 2024, "source": "IMF World Economic Outlook" } },
    { "to": "EUR", "toCountry": "FRA", "result": 92.30,   "rate": 0.923, "ppp": { "fromFactor": 1.0, "toFactor": 0.664, "result": 66.40,   "year": 2024, "source": "IMF World Economic Outlook" } }
  ]
}

Response fields

FieldTypeDescription
fromstringThe source currency you requested.
fromCountrystringSource country (alpha-3). Present only when PPP was requested; shared by all results.
amountnumberThe input amount, echoed back.
datestringThe rate date actually used (YYYY-MM-DD, UTC). On a non-trading day this is the most recent earlier snapshot.
requestedDatestringThe date you asked for. Present only when it differs from date (the requested date had no snapshot, so an earlier one was used).
asOfobjectCurrencies among from/targets whose rate was carried forward → the date it’s from. Present only when at least one rate was carried forward.
messagestringPresent only when no FX data exists at or before date (then results is empty).
resultsarrayOne entry per requested target, see below.
results[].tostringThe target currency.
results[].toCountrystringTarget country (alpha-3). Present only when PPP was requested.
results[].resultnumberPlain FX conversion, never PPP-adjusted.
results[].ratenumberEffective FX rate applied (result / amount).
results[].pppobjectThe PPP detail. Present only when PPP was requested. It is a union: either the success shape (fromFactor, toFactor, result, year, source) or an error shape (error), never both.
results[].ppp.fromFactornumberSource country’s PPP conversion factor (local units per international $). Present on success; absent when ppp.error is set.
results[].ppp.toFactornumberTarget country’s PPP conversion factor (local units per international $). Present on success; absent when ppp.error is set.
results[].ppp.resultnumberPPP-adjusted amount: amount × (toFactor / fromFactor), a price-level conversion via the international dollar, independent of the FX rate. Present on success; absent when ppp.error is set.
results[].ppp.yearnumberYear of the PPP conversion factors used. Present on success.
results[].ppp.sourcestringProvider of the PPP factors (IMF World Economic Outlook). Present on success.
results[].ppp.errorstringSet instead of the factors when this target’s PPP couldn’t be applied. The FX fields (result, rate) are still returned, and the response is still HTTP 200.

Per-target PPP errors

PPP is resolved per target. If one target’s PPP can’t be applied, only that target’s ppp becomes { "error": ... }, the others still get factors, and the FX fields (result, rate) are always returned for every target. The response stays HTTP 200 even when some targets carry a ppp.error. (If the from pair itself is bad, every target’s ppp is an error, but FX is still returned for each.)

Each currency:country pair must be consistent: the currency must be an official currency of that country (the country’s PPP factor is denominated in that currency). ppp.error carries one of:

ppp.error valueWhen
Invalid country code: <C><C> is not a known alpha-3 country code.
<CUR> is not an official currency of <C>The currency and country do not match (for example, EUR:IND).
No PPP data available for <C>The country is valid but has no PPP factor for the requested year.
<CUR> is used in multiple countriesThe message begins with this when the currency has several home countries and no canonical default. It asks you to pass an explicit CUR:COUNTRY pair.

Example, two targets where the second’s currency does not match its country, so only its ppp is an error:

{
  "from": "USD",
  "fromCountry": "USA",
  "amount": 100,
  "date": "2026-11-10",
  "results": [
    { "to": "INR", "toCountry": "IND", "result": 8345.00, "rate": 83.45, "ppp": { "fromFactor": 1.0, "toFactor": 20.4, "result": 2040.00, "year": 2024, "source": "IMF World Economic Outlook" } },
    { "to": "EUR", "toCountry": "IND", "result": 92.30,   "rate": 0.923, "ppp": { "error": "EUR is not an official currency of IND" } }
  ]
}

Data availability & limits

These responses return HTTP 200 (the request succeeded). Missing PPP data is reported in the relevant ppp block; a missing FX snapshot adds a top-level message.

PPP data not available for the year (PPP coverage starts in 1980), the FX conversion is still returned; each affected target’s ppp carries an error instead of factors. When the source country has no PPP data, that source error applies to every target:

{
  "from": "USD",
  "fromCountry": "USA",
  "amount": 100,
  "date": "1979-01-02",
  "results": [
    { "to": "INR", "toCountry": "IND", "result": 820.00, "rate": 8.20, "ppp": { "error": "No PPP data available for USA" } }
  ]
}

No FX data for the date, on a paid plan results is empty and a top-level message explains it. (On the Free plan, dates older than 30 days are rejected with 403 before conversion runs.)

{
  "from": "USD",
  "amount": 100,
  "date": "1948-01-01",
  "results": [],
  "message": "Conversion data is not available for 1948-01-01."
}

How this counts against your limits

  • Monthly usage limit: only successful requests (HTTP 2xx) are counted, including the two availability messages above. Requests that error (4xx or 5xx, invalid input, unknown currency, a missing PPP country, rate limit, or quota exceeded) are not counted toward your monthly limit.
  • Rate limit: applies to every request regardless of its status, so retries and errored calls still consume your per-window rate budget.

Errors

StatusCodeWhen
400invalid_inputfrom or to is missing; amount is non-numeric, zero, negative, or above 1e15; date is not a real date or is in the future; or more than 25 targets.
400unknown_currencyThe from currency, or any target currency, is unknown or has no quote in the snapshot.
401unauthorizedThe API key is missing or invalid.
403forbiddenThe date is outside the Free plan window, the key is disabled, or billing is past due.
429rate_limitedThe per-minute rate limit was exceeded. Honor Retry-After.

A bad currency:country PPP pair is not a request error. It comes back as a per-target ppp.error with HTTP 200, while the FX result is still returned.

Triangulation formula

CurrencyCore stores all rates as units of currency per 1 USD (i.e., USD is the base). Converting from any currency A to any currency B uses USD as the intermediary:

result = (amount / fromRate) * toRate

Where:

  • fromRate = units of currency A per 1 USD
  • toRate = units of currency B per 1 USD

Example: 100 GBP → INR where GBP rate = 0.79, INR rate = 83.45

result = (100 / 0.79) * 83.45 = 10563.29 INR

PPP adjustment formula

When ppp=true, result is still the plain FX conversion. The PPP-adjusted amount is returned separately as ppp.result, so you get both numbers:

result     = (amount / fromRate) * toRate          // plain FX, always present
ppp.result = amount * (toFactor / fromFactor)       // PPP-adjusted, only when ppp=true

Where fromFactor and toFactor are the PPP conversion factors for the source and target countries. ppp.result is a price-level conversion of amount; it is not multiplied by the FX result. This separation lets you show the market price and the purchasing-power-adjusted price side by side.

Example requests

Simple conversion:

curl "https://api.currency-core.com/v1/convert?from=EUR&to=JPY&amount=50" \
  -H "Authorization: Bearer cc_live_your_key"

Historical rate:

curl "https://api.currency-core.com/v1/convert?from=USD&to=GBP&amount=1000&date=2023-01-15" \
  -H "Authorization: Bearer cc_live_your_key"

Multiple target currencies:

curl "https://api.currency-core.com/v1/convert?from=USD&to=INR,EUR,JPY&amount=100" \
  -H "Authorization: Bearer cc_live_your_key"

With PPP adjustment (one country):

curl "https://api.currency-core.com/v1/convert?from=USD:USA&to=INR:IND&amount=100&ppp=true" \
  -H "Authorization: Bearer cc_live_your_key"

PPP across multiple countries (same currency, different PPP):

curl "https://api.currency-core.com/v1/convert?from=USD:USA&amount=100&ppp=true&to=INR:IND,EUR:DEU,EUR:FRA" \
  -H "Authorization: Bearer cc_live_your_key"