Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Overview
Get real-time exchange rates between any two currencies. Bunny’s Currency Exchange API supports 160+ currencies and returns the current mid-market rate, the converted amount, and the timestamp of the last rate update.Use cases
- Display prices in the visitor’s local currency
- Process multi-currency payments and invoices
- Build currency converter widgets
- Sync inventory prices across markets
Details
Rates are refreshed frequently and cached for up to 60 minutes. Providefrom and to as ISO 4217 currency codes (e.g. USD, BRL, EUR). Optionally pass amount to get a converted value directly.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Source currency code (ISO 4217, e.g. USD) |
to | string | Yes | Target currency code (ISO 4217, e.g. BRL) |
amount | number | No | Amount to convert (default: 1) |
Response
200 OK
| Field | Type | Description |
|---|---|---|
from | string | Source currency code |
to | string | Target currency code |
rate | number | Exchange rate (1 unit of from expressed in to) |
amount | number | The amount that was converted (mirrors the amount query param, default 1) |
converted | number | Result of amount * rate, rounded to 6 decimal places |
updated_at | string | Timestamp of the last rate update (from the upstream provider) |

