get_exchange_rate
Convert between two fiat currencies and retrieve the current mid-market exchange rate. Input source and target currency codes to get how much one unit of source equals in target.
Instructions
Use this when the user asks 'what is X in Y?', 'convert X to Y', 'current rate of EUR/USD', or any single fiat-to-fiat live exchange rate question. Returns the latest mid-market rate as a JSON object like { rate: 0.9234, source, target, time } meaning 1 source = 0.9234 target. Does NOT support cryptocurrencies, commodities (XAU/XAG), or arithmetic on amounts. For multiple targets in one call use get_rates; for a past date or fixed lookback (7d/30d/1y) use get_historical_rates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported. | |
| target | Yes | ISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported. |