Skip to main content
Set the exchange rates of the date range starting in start_month, creating it when none does. Refused when the company has multi-currency off. start_month picks the range. The month an existing range starts in updates that range. Any other 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 start of 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 first and send back the ones to keep. The company currency can be left out: its rate is always 1. A currency the range lacks is added to every range lacking it at the rate given, because currencies are 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 rates being changed (adding a currency is still allowed). Unvalidate those statements in the Qobra web app first.
  • a validated live statement exists from the new range’s first month on.
  • start_month matches no existing range and is not after the start of 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.
A call changing nothing 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 once recalculated: call recalculate_statements on the users and the months the rates cover. Requires write permission on company settings > currency, and multi-currency access for the company. Every write is recorded in the audit trail as the Qobra MCP agent.
Example arguments

Parameters

Body

string
required
YYYY-MM. The month an existing range starts in (its start_date in list_exchange_rates) updates that range. Any other month creates a new range from its first day, but only after the start of the latest range: a month before it that no range starts in is refused.
object[]
required
The range’s whole table: one rate per currency the company uses, plus any currency to add. The company currency may be left out (always 1).

Response

Body

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.
object[]
The date ranges of exchange rates after the write, oldest first.
string
created (a new range), updated (some of its rates changed, or it gained a currency), unchanged (it already had these rates, nothing was written).
string[]
Currencies the range did not carry before, now added at the rate given to every range that lacked them.