convert_currency
Convert amounts between ISO 4217 currencies with ECB reference rates for closing, average YTD, or prior-year financial conversions.
Instructions
Convert an amount between two ISO 4217 currencies using ECB reference rates.
rate_type ∈ {closing, average_ytd, average_prior_year}:
closing (default) → spot rate at
date(balance-sheet items per IAS 21)average_ytd → avg over the 365 days ending at
date, a rolling window, not year-to-date (P&L / cash flow items)average_prior_year → avg over the calendar year before
date
date is YYYY-MM-DD (defaults to today). Identity short-circuit when
from == to. An unsupported currency code returns an error result. Cross-rates
(e.g. USD→JPY) are computed through EUR. fix_date echoes the requested
date: the rate used is the latest ECB fixing available on or before it.
Use when the user asks "convert X in Y", "Microsoft revenue in EUR", "what's the average USD/EUR rate for FY2024 P&L conversion?".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| amount | Yes | ||
| rate_type | No | closing | |
| to_currency | Yes | ||
| from_currency | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |