This API provides access to the latest exchange rates and a list of supported currencies. Below are the details on how to use the API endpoints.
Fetch the latest exchange rates based on USD.
GET /api/latest?key=YOUR_API_KEY
key (required): Your API key for authentication.{
"success": true,
"base": "USD",
"rates": {
"EUR": 0.85,
"GBP": 0.73,
"JPY": 110.25
}
}
Fetch the list of supported currencies for exchange rates.
GET /api/currencies?key=YOUR_API_KEY
key (required): Your API key for authentication.{
"USD": "United States Dollar",
"EUR": "Euro",
"GBP": "British Pound Sterling",
"JPY": "Japanese Yen"
}
All API requests require an API key for authentication. Include the key parameter in your requests.
GET /api/latest?key=YOUR_API_KEY
If the request is invalid or the API key is missing, the API will return an error response.
{
"success": false,
"error": {
"code": 401,
"message": "Unauthorized. Missing or invalid API key."
}
}