Skip to content

Push exchange rates

By default the platform imports exchange rates from the Riksbank every night. If your books use other rates, you can push your own instead. Every revaluation and every other conversion to the system currency then uses the rates you pushed.

The platform keeps one current rate per currency. Each push replaces it, and each revaluation stores the rate it used, so earlier rates stay traceable through the revaluations.

  1. Have pushed rates enabled. Quiddly support sets the system setting USE_PUSHED_EXCHANGE_RATES to true. Until then a push is refused with 409, because the nightly import would overwrite it.

  2. Subscribe to the fallback webhook. Create a webhook of type EXCHANGE_RATE_FALLBACK. It tells you when the Riksbank filled in a month-end rate that you had not pushed, so you can alert on it.

  3. Push the rates at month-end. Requires UpdateSystemExchangeRates. Send every currency you want to change in one request:

    Terminal window
    curl -X PUT "https://$HOST/system/exchange-rates" \
    -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \
    -d '{
    "rates": [
    { "currencyCode": "EUR", "exchangeRateInverted": 11.2345, "date": "2026-09-30" },
    { "currencyCode": "NOK", "exchangeRateInverted": 0.9312, "exchangeRate": 1.0738 }
    ]
    }'
    FieldHolds
    currencyCodeThe foreign currency. It must have a base interest rate, and cannot be the system currency.
    exchangeRateInvertedUnits of system currency per one unit of currencyCode, e.g. 11.2345 SEK per EUR. This is the rate revaluations use.
    exchangeRateOptional. Units of currencyCode per one unit of system currency. When left out it is 1 / exchangeRateInverted, truncated to 4 decimals. When sent it must match 1 / exchangeRateInverted allowing for both rates having 4 decimals: each may be one unit off in the last decimal, so a pair cut or rounded from the same rate is accepted.
    dateOptional. The date the rate applies to, not in the future. Defaults to today.

    The 200 response is the confirmation: it is the full list of current rates, in the same shape as GET /system/exchange-rates. There is no webhook for a push. A push is safe to retry, since sending the same rates again gives the same result. A rate dated before the one already stored for its currency is skipped, so a late retry cannot replace a newer rate; the response then shows the stored rate. A rate with the same date replaces it, which is how you correct a rate.

  4. Check the result. GET /system/exchange-rates (ReadSystemExchangeRates) shows each rate with source and updatedDate, the time it was last written. source is API for a pushed rate, RIKSBANK for the daily import and RIKSBANK_FALLBACK for a month-end fallback. Rates written before this feature have no updatedDate.

With pushed rates enabled, the currencies that have a base interest rate in the platform, except the system currency, are no longer imported daily. You push all of them. Every other currency keeps its daily Riksbank import, and a push for it is rejected with 400.

The nightly import runs at 02:30. For each currency you push, it checks whether its current rate is dated on or after the month-end that has passed. A month-end on a weekend counts as the Friday before it, since the Riksbank publishes no rate on weekends. If the rate is older, the import uses the Riksbank’s last rate on or before the month-end, which is the day before when the month-end is a bank holiday. It marks the rate RIKSBANK_FALLBACK, stores it with the date the Riksbank published it, and sends an EXCHANGE_RATE_FALLBACK webhook listing the currencies it filled in. A later run for the same month-end, the next night or when you start the revaluation, can send another one with the same id and monthEnd that lists other currencies, so de-duplicate on the X-Webhook-Id header, not on id. The nightly run on the month-end day itself never falls back, since your push window has not opened yet.

In the nightly import this only happens in the 02:30 run on the 1st. For a September month-end:

WhenWhat happens
30 Sep, 21:00 to 1 Oct, 02:00You push the rates dated 2026-09-30.
1 Oct, 02:30Every currency you pushed is kept. A currency you did not push gets the Riksbank’s rate for 30 Sep, and the webhook lists it.
Later in OctoberNothing changes until you push again. A late push for 30 Sep replaces the fallback rate.

If the Riksbank has no rate either, the currency keeps its old rate and the next night’s run tries again.

Starting the currency revaluation runs the same fallback for its month-end first, whenever you start it, even on the month-end itself, so push every currency before you start it. If the Riksbank has no rate for a currency either, the revaluation uses the rate it already has.

The scheduled currency revaluation runs at 23:30 on the month-end and uses the rates that are current at that moment. A rate you push after 23:30 still replaces the fallback, but that night’s revaluation has already used the previous rate.

A push is all-or-nothing: if any rate is invalid, nothing is saved and the call returns 400 with the reason. A rate is invalid when:

  • it is zero or negative,
  • it has more than 4 decimals or more than 9 integer digits (rates are never rounded for you),
  • the currency is unknown, is the system currency, or has no base interest rate,
  • exchangeRate does not match 1 / exchangeRateInverted, even allowing each rate to be one unit off in its fourth decimal,
  • exchangeRate is sent while exchangeRateInverted is 0.0001, which is too coarse to check it against,
  • the same currency appears twice,
  • date is in the future,
  • or rates is empty or not a list of objects.

The check on exchangeRate only makes sure the two rates agree with each other, not that they are plausible. A pair sent with the two fields swapped also agrees, so it is accepted and stored as it is. Check that exchangeRateInverted holds system currency per unit of currencyCode: it is the rate revaluations use.