> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# update_exchange_rates

> Set the exchange rates of one date range, creating the range if new. Send the range's whole rate table.

Set the exchange rates of one date range, creating the range if new.

`start_month` picks the range. The month an existing range starts in updates
that range. Any later month creates a new range that applies from the first
day of that month until the next range. A new range must start after the
latest one.

`rates` is the range's **whole** table, not a change to it: every currency the
company uses must be listed, or the call is refused. Read the current rates
with [`list_exchange_rates`](/mcp_documentation/tools/list_exchange_rates)
first and send back the ones to keep. The company currency can be left out:
its rate is always 1. A currency the company does not use yet is added to
every range at the rate given, because a currency is configured company-wide.
To set a different rate on an older range, call the tool again on that range.

The call is refused when:

* a validated statement was computed with the range's rates, which locks them
  (a currency new to the company can still be added). Unvalidate those
  statements in the Qobra web app first.
* a new range would start over months a validated statement covers.
* `start_month` matches no existing range and is not after the latest one.
* a currency is listed twice, a rate is not greater than 0, or the company
  currency is given a rate other than 1.

Sending rates a range already has writes nothing and returns `unchanged`, so
the same call can be sent twice.

Statements are not recalculated by this call. They convert with the new rates
at their next recalculation.

Requires write permission on company settings > currency, and multi-currency
access for the company. Refused on demonstration companies. Available only
where the Qobra write tools beta is enabled. Every write is recorded in the
audit trail as the `Qobra MCP` agent.

```json Example arguments theme={null}
{
  "start_month": "2026-10",
  "rates": [
    { "currency_code": "USD", "rate": 1.08 },
    { "currency_code": "GBP", "rate": 0.84 }
  ]
}
```

## Parameters

<Accordion title="Body" defaultOpen>
  <ParamField body="start_month" type="string" required>
    The month the range starts, `YYYY-MM`. The month an existing range starts
    in (the month of its `start_date` in list\_exchange\_rates) updates that
    range; any later month creates a new range from its first day.
  </ParamField>

  <ParamField body="rates" type="object[]" required>
    The range's whole table: one rate per currency the company uses, plus any
    currency to add. The company currency can be left out — its rate is always
    1\.

    <Expandable title="object properties">
      <ParamField body="currency_code" type="string" required>
        The currency, as a code: USD, GBP…
      </ParamField>

      <ParamField body="rate" type="number" required>
        How many units of this currency one unit of the company currency buys
        — the same direction list\_exchange\_rates reports.
      </ParamField>
    </Expandable>
  </ParamField>
</Accordion>

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="company_currency" type="string">
    The company's own currency — the base every rate is expressed against. One
    of: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`,
    `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`,
    `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHF`, `CLF`, `CLP`, `CNY`,
    `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`,
    `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`,
    `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`,
    `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`,
    `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`,
    `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MUR`, `MVR`,
    `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`,
    `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RMB`, `RON`, `RSD`,
    `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`,
    `SRD`, `STD`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`,
    `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYI`, `UYU`, `UZS`, `VEF`, `VND`,
    `VUV`, `WON`, `WST`, `XAF`, `XAG`, `XAU`, `XCD`, `XOF`, `XPD`, `XPF`, `XPT`,
    `XSU`, `YER`, `ZAR`, `ZMK`, `ZWL`.
  </ResponseField>

  <ResponseField name="exchange_rate_tables" type="object[]">
    All date ranges of exchange rates after the write, oldest first.

    <Expandable title="object properties">
      <ResponseField name="resource_url" type="string">
        Deep link that opens this date range in the Qobra web app — the
        currencies settings page, browsed to this range.
      </ResponseField>

      <ResponseField name="start_date" type="string">
        First month these rates apply, `YYYY-MM` — the month
        [`update_exchange_rates`](/mcp_documentation/tools/update_exchange_rates)
        takes as `start_month`. A month before the earliest range has no rate at
        all.
      </ResponseField>

      <ResponseField name="end_date" type="string">
        Last month these rates apply, `YYYY-MM` — the month before the next
        range starts. Null on the current range, which has no end.
      </ResponseField>

      <ResponseField name="rates" type="object[]">
        One rate per currency configured on this range, ordered by currency
        code.

        <Expandable title="object properties">
          <ResponseField name="currency_code" type="string">
            One of: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`,
            `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`,
            `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`,
            `CAD`, `CDF`, `CHF`, `CLF`, `CLP`, `CNY`, `COP`, `COU`, `CRC`,
            `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`,
            `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`,
            `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`,
            `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`,
            `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`,
            `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`,
            `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MUR`, `MVR`,
            `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`,
            `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`,
            `QAR`, `RMB`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`,
            `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `STD`, `SVC`,
            `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`,
            `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYI`, `UYU`, `UZS`, `VEF`,
            `VND`, `VUV`, `WON`, `WST`, `XAF`, `XAG`, `XAU`, `XCD`, `XOF`,
            `XPD`, `XPF`, `XPT`, `XSU`, `YER`, `ZAR`, `ZMK`, `ZWL`.
          </ResponseField>

          <ResponseField name="rate" type="number">
            How many units of this currency one unit of the company currency
            buys, over this date range (the company currency's own rate is 1).
            To convert between any two currencies of the same range, take the
            ratio: an amount in the source currency times `rate` of the target
            divided by `rate` of the source — the formula the app itself
            applies.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="action" type="string">
    What the call did to the range: `created` (a new range), `updated` (some of
    its rates changed, or it gained a currency), or `unchanged` (it already had
    these rates; nothing was written).
  </ResponseField>

  <ResponseField name="added_currencies" type="string[]">
    Currencies the range did not carry before, now added at the rate given to
    every range that lacked them. To set another rate on an older range, call
    the tool on that range.
  </ResponseField>
</Accordion>
