Latest Rates API
Fetch the latest exchange rates for a specified base currency.
Endpoint
GET /latest_rates
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
baseCurrency | string | Yes | Base currency code (ISO 4217) - e.g., USD, EUR, GBP |
targetCurrencies | string | No | Comma-separated target currencies - e.g., EUR,GBP,JPY. Defaults to all currencies if omitted. |
Request Example
curl -X GET "https://api.openfxrates.com/latest_rates?baseCurrency=USD&targetCurrencies=EUR,GBP,JPY" \
-H "X-API-Key: your-api-key-here"
Response Schema
{
"status": "SUCCESS",
"data": {
"base_currency": "USD",
"rates": {
"EUR": 0.861166,
"GBP": 0.746252,
"JPY": 158.11890909
},
"timestamp": "2026-01-22T11:34:57.294Z",
"meta_data": {
"monthly_requests": 100000,
"remaining_requests": 99998,
"reset_time": null
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Request status (SUCCESS or FAILED) |
data | object | Response data container |
base_currency | string | The base currency code |
rates | object | Exchange rates with currency codes as keys and rates as values |
timestamp | string | ISO 8601 timestamp of the rates |
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 - Rates returned |
| 400 | Bad Request - Invalid currency code |
| 401 | Unauthorized - Invalid or missing API key |
| 429 | Too Many Requests - Rate limit exceeded |
Examples
Get rates for all currencies
curl -X GET "https://api.openfxrates.com/latest_rates?baseCurrency=USD" \
-H "X-API-Key: your-api-key"
Get rates for specific currencies
curl -X GET "https://api.openfxrates.com/latest_rates?baseCurrency=EUR&targetCurrencies=USD,GBP,JPY,CHF" \
-H "X-API-Key: your-api-key"
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)
Caching
For optimal performance, cache latest rates for 1-5 minutes depending on your requirements.
See Also
- Historical Rates API - Get historical rates
- Currency Conversion API - Convert amounts between currencies
- List Currencies - Get all supported currencies