Skip to main content

Latest Rates API

Fetch the latest exchange rates for a specified base currency.

Endpoint

GET /latest_rates

Parameters

ParameterTypeRequiredDescription
baseCurrencystringYesBase currency code (ISO 4217) - e.g., USD, EUR, GBP
targetCurrenciesstringNoComma-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

FieldTypeDescription
statusstringRequest status (SUCCESS or FAILED)
dataobjectResponse data container
base_currencystringThe base currency code
ratesobjectExchange rates with currency codes as keys and rates as values
timestampstringISO 8601 timestamp of the rates
meta_dataobjectAPI usage information
meta_data.monthly_requestsnumberTotal monthly request limit
meta_data.remaining_requestsnumberRemaining requests for the month
meta_data.reset_timestring/nullWhen the limit resets

Status Codes

StatusDescription
200Success - Rates returned
400Bad Request - Invalid currency code
401Unauthorized - Invalid or missing API key
429Too 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 month
  • remaining_requests - Requests remaining this month
  • reset_time - When the limit resets (if applicable)

Caching

For optimal performance, cache latest rates for 1-5 minutes depending on your requirements.

See Also