تخطي إلى المحتوى
POST AI agent ready /v1/currency/convert

Currency Convert API - Free Exchange Rate Converter

Converts an amount from one ISO 4217 currency to another using the Frankfurter.dev ECB exchange-rate feed. Returns the converted amount rounded to 10 decimal places, the exchange rate, and a timestamp. Same-currency conversions return the original amount with rate 1.

Parameters

numberrequired

Numeric amount to convert.

stringrequired

Source currency code (ISO 4217).

stringrequired

Target currency code (ISO 4217).

Code examples

curl -X POST https://api.botoi.com/v1/currency/convert \
  -H "Content-Type: application/json" \
  -d '{"amount":100,"from":"USD","to":"EUR"}'

When to use this API

Show prices in the visitor's local currency

Combine with /v1/ip-lookup to detect the visitor country and convert your USD-listed price into the local currency on page load. Clearer pricing signals boost international conversion rates.

Normalize multi-currency revenue in BI dashboards

When your business books revenue in 5+ currencies via Stripe, convert each transaction to a single base currency (USD or EUR) at the booking-date rate before feeding into your data warehouse.

Fixed-price invoicing across borders

Let contractors invoice in their local currency while your business pays in USD. Call the endpoint at invoice issue time and store the snapshot rate on the invoice for audit reproducibility.

Frequently asked questions

Where do the rates come from?
Frankfurter.dev, which sources exchange rates from the European Central Bank. Rates update once per business day around 16:00 CET. Weekends and bank holidays return the last available business-day rate.
How many currencies are supported?
30+ currencies tracked by the ECB reference feed (USD, EUR, GBP, JPY, CHF, CAD, AUD, etc.). Less-traded currencies (some African and Latin American) are not in the feed; those return INVALID_CURRENCY.
Are historical rates supported?
Not in this endpoint. Only the current day's rate is returned. For historical data, call Frankfurter directly with a date parameter.
How precise is the result?
Rounded to 10 decimal places. For financial reporting, round further to the target currency's cent-level (2 decimals for most; 0 for JPY; 3 for BHD). The /v1/currency-list/list endpoint gives you each currency's decimal_digits.
What is returned for same-currency conversion?
The original amount, rate 1, and the current timestamp. The upstream rate service is not called, so these requests are fast and do not count against upstream quota.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.