Currency Conversion API
Convert an amount from one currency to one or multiple target currencies using current exchange rates.
Endpoint
GET /convert
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
baseCurrency | string | Yes | Source currency code - e.g., USD |
targetCurrencies | string | Yes | Comma-separated target currencies - e.g., EUR,GBP,JPY |
amount | number | No | Amount to convert. Defaults to 1 if omitted. |
Request Example
curl -X GET "https://api.openfxrates.com/convert?baseCurrency=USD&targetCurrencies=EUR,GBP,JPY&amount=100" \
-H "X-API-Key: your-api-key-here"
Response Schema
{
"status": "SUCCESS",
"data": {
"base_currency": {
"currency": "USD",
"amount": 100
},
"target_currencies": [
{
"currency": "EUR",
"rate": 0.861166,
"amount": 86.1166
},
{
"currency": "GBP",
"rate": 0.746252,
"amount": 74.6252
}
],
"timestamp": "2026-01-22T11:33:57.919Z",
"meta_data": {
"monthly_requests": 100000,
"remaining_requests": 99999,
"reset_time": null
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Request status (SUCCESS or FAILED) |
data | object | Response data container |
base_currency | object | Source currency information |
base_currency.currency | string | Source currency code |
base_currency.amount | number | Original amount to convert |
target_currencies | array | Array of conversion results |
target_currencies[].currency | string | Target currency code |
target_currencies[].rate | number | Exchange rate from base to target |
target_currencies[].amount | number | Converted amount |
timestamp | string | ISO 8601 timestamp of conversion |
meta_data | object | API usage information |
meta_data.monthly_requests | number | Total monthly request limit |
meta_data.remaining_requests | number | Remaining requests for the month |
meta_data.reset_time | string/null | When the limit resets |
Status Codes
| Status | Description |
|---|---|
| 200 | Success - Conversion completed |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 429 | Too Many Requests - Rate limit exceeded |
Examples
Convert $100 USD to EUR, GBP, JPY
curl -X GET "https://api.openfxrates.com/convert?baseCurrency=USD&targetCurrencies=EUR,GBP,JPY&amount=100" \
-H "X-API-Key: your-api-key"
Response:
{
"status": "SUCCESS",
"data": {
"base_currency": {
"currency": "USD",
"amount": 100
},
"target_currencies": [
{
"currency": "EUR",
"rate": 0.861166,
"amount": 86.1166
},
{
"currency": "GBP",
"rate": 0.746252,
"amount": 74.6252
},
{
"currency": "JPY",
"rate": 149.823,
"amount": 14982.3
}
],
"timestamp": "2026-01-22T11:33:57.919Z",
"meta_data": {
"monthly_requests": 100000,
"remaining_requests": 99999,
"reset_time": null
}
}
}
Convert 1 EUR to multiple currencies
curl -X GET "https://api.openfxrates.com/convert?baseCurrency=EUR&targetCurrencies=USD,GBP,CHF,AUD" \
-H "X-API-Key: your-api-key"
Use Cases
- 🛍️ E-commerce - Display prices in customer's currency
- ✈️ Travel - Show converted prices for hotels and flights
- 💳 Payment Processing - Convert payment amounts
- 📱 Mobile Apps - Real-time currency conversion for users
Precision
- Decimal Places: 2-4 depending on currency
- Rounding: Follows standard banking rules
- Accuracy: Based on current market rates
Rate Limiting
Rate limit information is included in every response under meta_data:
monthly_requests- Total requests allowed per monthremaining_requests- Requests remaining this monthreset_time- When the limit resets (if applicable)
Performance Tips
- Cache rates for short periods if doing multiple conversions
- Use specific target currencies instead of converting to all
- Batch multiple conversions in single requests when possible
See Also
- Latest Rates API - Get individual rates
- Historical Rates API - Historical conversions
- List Currencies - Supported currencies