convert_currency
Convert an amount between any two currencies using your own USD-based exchange rates. Provide the rate dictionary to perform the conversion.
Instructions
Convert an amount between any two currencies using a caller-supplied USD-based rate dict. The caller must provide current exchange rates (USD=1.0 base). Example: convert 1000 USD to INR with rates={'USD':1.0, 'INR':83.5}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to convert. | |
| from_currency | Yes | ISO-4217 source currency code, e.g. 'USD'. | |
| to_currency | Yes | ISO-4217 target currency code, e.g. 'INR'. | |
| rates | Yes | Dict mapping currency codes to units-per-USD, e.g. {'USD':1.0,'INR':83.5,'EUR':0.93}. |