Latest reference rates
Rates for the most recently published reference day. Omitting symbols returns every currency in the reference set.
Loading / 加载中…
Currency reference rates · Finance & reference data
Six operations return the latest rates, convert an amount, read one historical day, a time series or the change between two dates, and list currency names. Responses separate the requested date from the reference day the rates belong to.
JSON in, a structured response out. Every public gateway endpoint uses POST.
Rates for the most recently published reference day. Omitting symbols returns every currency in the reference set.
A numeric amount; defaults to 1. Optional historical date.
Dates start at 1999-01-04. For a Saturday, Sunday or holiday the rates of the last working day before it are returned, and requested_date keeps the day you sent.
Both ends of the range are included. Inspect stop_reason; missing business-day data is not zero.
Compare the rates at the two ends of a range; no daily values are returned.
Current published code-to-name set. Its membership does not establish availability on historical dates.
Every value comes from the euro reference rates of the European Central Bank (ECB), which publishes one set of rates per working day. A rate is therefore tied to a publication day, and the reply always names it in date. Each rate in rates is a positive number that expresses one unit of the base currency in a target currency.
latest, historical, timeseries and fluctuation take the base in base, which defaults to EUR and may be any of the 43 accepted codes. convert has no base of its own: it names the two currencies in from and to. currencies always reports EUR as its base.
latest reads the most recently published reference day. convert multiplies an amount by the rate between two currencies, either on that latest day or on a date you choose, and returns both the rate and the product. historical returns the rates of one requested day.
timeseries returns every working day inside a date range, keyed by date, while fluctuation compares only the two ends of such a range and reports the change for each currency. currencies lists the codes and names of the current reference set and needs no input at all.
Inputs accept 43 three-letter codes, from codes in the current reference set, such as USD, GBP, JPY, CHF, CNY and INR, to retired ones such as RUB, HRK and GRD. The currencies operation describes the set as it stands now, so a code it lists may have no rate on an older date, and a retired code that it leaves out can still carry rates for days before its withdrawal.
A reply is a JSON object whose ok member tells success from failure; on success, data holds the result of the operation and meta holds the request identifier. Rate operations return the base, the reference day and a map from currency code to rate, and the latest day can add a Unix timestamp. A conversion returns the rate and the converted result next to the echoed currencies and amount.
A series nests one rate map under each working day, a change report gives the start rate, end rate and signed change for each currency, and the name list returns a count with a code-to-name map. Before a reply leaves the gateway it is checked against the operation's output schema: rates must be positive finite numbers, currency keys must be three uppercase letters, and any field outside the documented response is stripped.
latest, convert, historical and currencies cost 150 credit units per call, and the two range operations, timeseries and fluctuation, cost 300. When a call is admitted, its price is reserved from your available balance, which is the balance minus amounts already reserved by other calls.
If the available balance is lower than the price, the call is refused with INSUFFICIENT_CREDITS (402) and nothing runs. On success the reservation becomes the charge, and meta.chargedCreditUnits reports it as a decimal string; in every other case the reservation is released.
Reference rates are published once per working day, so a weekend or a holiday has no rates of its own. historical and convert move such a date to the last working day before it, report that day in date and keep the day you asked for in requested_date. Show both when the difference matters, for example on an expense receipt dated on a Sunday.
The earliest accepted date is 1999-01-04. Send the date as YYYY-MM-DD to historical, or as the optional date of convert; leaving it out of convert uses the latest published rate. Retired codes such as HRK or GRD work as the base only for days before that currency was withdrawn.
The most recently published reference day, named in the date field of the reply. That day can be earlier than today's calendar date, for example on a weekend, when the newest set of rates belongs to the previous working day. When present, timestamp gives the same day as a Unix time at 16:00 CET or CEST.
List the codes in symbols, separated by commas, such as USD,GBP,JPY. Leaving symbols out returns every currency in the reference set. An unknown code is listed in unavailable instead of failing the request. Each returned code appears in rates with its value against base, which defaults to EUR.
Both start and end are included, and equal dates request a single day. When a series is capped, stop_reason is set, and the remaining days need further calls. These two operations cost twice the per-call price of the other four, so a single day is cheaper through historical.
Yes. convert accepts any two of the 43 supported codes as from and to, for example USD to JPY, and returns the rate it applied together with result, the amount multiplied by that rate. Send amount as a JSON number. Add date to convert at the rate of a past reference day instead of the latest one.
A code appears in rates only when a rate exists for it on the resolved day. A code without a rate on that day, such as a retired currency asked for on a date after its withdrawal, is left out instead of being reported as zero. Treat the absence as no rate for that day and show it to the user rather than substituting a value.
No. Refused input and an operation that reports failure are not charged. When the outcome stays unknown, as with OPERATION_TIMEOUT or RESULT_INVALID, the price is held for up to 900 seconds and then released, never charged. Resending the unchanged request with the same Idempotency-Key answers REQUEST_PENDING during the hold and OUTCOME_UNKNOWN_RELEASED (504) after it; switching to a new key earlier can run the operation a second time.