convert_currency
Convert an amount between currencies using live exchange rates. Specify base and target currencies to get converted values and unit rates for all or selected targets.
Instructions
Fetch live exchange rates and convert an amount from one currency to others.
Returns a dict with the base currency, the amount converted, and a mapping of each target currency code to its converted value and unit exchange rate (e.g. {"base": "USD", "amount": 100, "results": {"EUR": {"rate": 0.92, "value": 92.0}}}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target currency codes as a comma-separated string; omit or leave empty to return rates for all available currencies. Example: "EUR,GBP". Default: None (all rates). | |
| base | No | Base currency code as a 3-letter ISO 4217 string. Example: "USD". Default: "USD". | USD |
| amount | No | Amount of the base currency to convert, as a number (int or float). Example: 100. Default: 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| count | No | ||
| errors | No | ||
| scraper | No | ||
| source_urls | No |