API Reference

/rates Endpoint

Fetch a full exchange-rate snapshot for a date, or rebase it to any base currency, with carry-forward and as-of behavior explained.


Endpoints

GET https://api.currency-core.com/v1/rates
GET https://api.currency-core.com/v1/rates/:base

/v1/rates returns the full snapshot with USD as the base. /v1/rates/:base returns the same snapshot re-expressed against any base currency, which is useful when your product thinks in EUR, INR, or another currency. Neither endpoint converts a specific amount. For that, use /v1/convert.

Both endpoints require an API key.

Parameters

ParameterInTypeRequiredDefaultNotes
basepathstringYes (on /rates/:base)USDThree-letter ISO 4217 code, e.g. EUR. The base itself is always 1 in the response.
datequerystringNoLatest available dateYYYY-MM-DD (UTC). Must be a real calendar date. A date with no snapshot resolves to the most recent earlier one.

Plan and history window

/v1/rates is available on every plan. The date lookback follows your plan: the Free plan can request the last 30 days, while Starter and above can request full history. A Free request outside that window returns 403 forbidden.

Live keys require a paid plan. Use a test key while integrating on the Free plan.

Response

/v1/rates returns a USD-base map:

{
  "date": "2026-11-09",
  "base": "USD",
  "rates": {
    "USD": 1,
    "EUR": 0.9214,
    "INR": 84.07,
    "GBP": 0.835
  }
}

/v1/rates/EUR rebases the same data. Every value is units of that currency per 1 unit of the base, and the base is exactly 1:

{
  "base": "EUR",
  "date": "2026-11-10",
  "rates": {
    "EUR": 1,
    "USD": 1.0861,
    "INR": 91.62,
    "GBP": 0.835
  }
}

Rebasing is exact: units-per-base = (units-per-USD) / (base-units-per-USD).

Response fields

FieldTypeDescription
basestringBase currency the map is expressed against. USD on /rates, or the requested code on /rates/:base.
datestringThe rate date actually used (YYYY-MM-DD, UTC).
ratesobjectMap of currency code to units of that currency per 1 unit of base. The base itself is 1.
requestedDatestringThe date you asked for. Present only when it differs from date, because the requested date had no snapshot and an earlier one was used.
asOfobjectCurrencies whose rate was carried forward, mapped to the date that rate came from. Present only when at least one rate was carried forward.

Historical dates and carry-forward

The snapshot is never empty for an in-range date. Two fallbacks fill gaps, and both are reported so you know what you received:

  • Whole date missing (weekend, holiday, or another non-trading day): the response serves the most recent earlier snapshot. date is the date actually used, and requestedDate echoes what you asked for. requestedDate is present only when the two differ.
  • One currency missing on an otherwise present date (for example, a currency not yet listed or temporarily unquoted): its most recent prior rate is carried forward. Those currencies appear in asOf, mapping the code to the date the value is from. asOf is present only when at least one rate was carried forward.
{
  "date": "2026-11-06",
  "requestedDate": "2026-11-08",
  "base": "USD",
  "rates": { "USD": 1, "EUR": 0.92, "INR": 84.07, "CLP": 947.6 },
  "asOf": { "CLP": "2026-11-05" }
}

Here 2026-11-08 (a Sunday) resolved back to Friday 2026-11-06, and CLP carried its last value from 2026-11-05.

Reading the rates

  • A higher number means one unit of the base buys more of that currency. On /v1/rates/EUR, rates.USD = 1.0861 means one euro buys 1.0861 US dollars.
  • The map is not a set of quotes against every other pair. Cross rates follow from the shared base, so A/B = rate[A] / rate[B].
  • Carry-forward values are real prior quotes, not interpolated values. Use asOf when you need to know the exact age of a value.

Choosing a base

Pick the base your product already displays. A EUR-based app should call /v1/rates/EUR rather than fetching the USD map and rebasing on every render. For a one-off comparison, remember that changing the base does not change the underlying quotes, only the denominator.

Example requests

curl "https://api.currency-core.com/v1/rates/EUR?date=2026-11-10" \
  -H "Authorization: Bearer cc_live_your_key"

Errors

StatusCodeWhen
400invalid_inputdate is not a real YYYY-MM-DD date, or :base is not a 3-letter code.
400unknown_currencyThe requested base is not present 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.
404rate_not_foundNo rate data exists on or before the requested date.
429rate_limitedThe per-minute rate limit was exceeded. Honor Retry-After.
  • One snapshot per request. The response contains every currency in that snapshot.
  • date is a single day, not a range. For a range, use /v1/history.
  • Free plan: 30-day date window; Starter and above: full history.
  • Each request consumes one monthly request and one per-minute rate-limit unit.

Related pages: