Set exchange rates
set_exchange_ratesSet/remove Fixed workspace FX rates (admin-only). Fixed overrides the daily ECB Automatic reference rate until changed; removing restores Automatic. Direction: 1 input-currency unit = rate in default currency (DKK default: {currency:"EUR",rate:7.46} means 1 EUR = 7.46 DKK). Reversed-looking rates or rates outside 0.8–1.25× the bank rate require confirm:true; without it nothing saves, and the response supplies the question/reference/suggested correction. Upserts and removals are atomic; ambiguous requests change nothing. Stored amounts never change; totals convert only if every currency has a rate. Returns default currency, Fixed rates, bank date and effective rates.
When to use: An admin chooses a budget/contract rate or returns a currency to Automatic.
Example: Fix 1 EUR at 7.46 DKK; reset USD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remove | No | Currency codes whose Fixed rate to remove, switching them back to Automatic. May be combined atomically with upsert; a currency cannot appear in both lists. | |
| upsert | No | Rates to add or replace. Omit the workspace default currency; its implicit rate is 1. | |
| confirm | No | true saves a questioned rate as entered, after the user has checked it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rates | No | ||
| updated | No | ||
| workspace | No | ||
| bank_rates | No | ||
| rate_checks | No | ||
| rates_in_use | No | ||
| invalid_rates | No | ||
| default_currency | No | ||
| requires_confirm | No | ||
| duplicate_currencies | No | ||
| supported_currencies | No | ||
| unchanged_currencies | No | ||
| conflicting_currencies | No | ||
| unsupported_currencies | No | ||
| default_currency_upserts | No | ||
| requires_default_currency | No |