Convert Currency
twelvedata_convert_currencyConvert currency amounts using real-time exchange rates. Supports fiat, precious metals like gold, and cryptocurrencies.
Instructions
Convert an amount from one currency to another using real-time rates.
Supports fiat currencies, precious metals (XAU, XAG), and cryptocurrencies.
Args:
from (string): Source currency code (e.g., "USD", "EUR", "XAU", "BTC")
to (string): Target currency code
amount (number): Amount to convert
response_format ('markdown' | 'json'): Output format
Returns: Converted amount with exchange rate.
Examples:
"Convert 1000 USD to EUR" -> from: "USD", to: "EUR", amount: 1000
"How much is 1 oz gold in USD?" -> from: "XAU", to: "USD", amount: 1
"Convert 0.5 BTC to USD" -> from: "BTC", to: "USD", amount: 0.5
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target currency code (e.g., EUR, JPY, USD) | |
| from | Yes | Source currency code (e.g., USD, EUR, XAU) | |
| amount | Yes | Amount to convert | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for structured data | markdown |