Log in Register

API Documentation

Overview

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.

Latest Exchange Rates

Fetch the latest exchange rates based on USD.

Endpoint

GET /api/latest?key=YOUR_API_KEY

Parameters

Example Response

{
    "success": true,
    "base": "USD",
    "rates": {
        "EUR": 0.85,
        "GBP": 0.73,
        "JPY": 110.25
    }
}

Supported Currencies

Fetch the list of supported currencies for exchange rates.

Endpoint

GET /api/currencies?key=YOUR_API_KEY

Parameters

Example Response

{
    "USD": "United States Dollar",
    "EUR": "Euro",
    "GBP": "British Pound Sterling",
    "JPY": "Japanese Yen"
}

Authentication

All API requests require an API key for authentication. Include the key parameter in your requests.

Example

GET /api/latest?key=YOUR_API_KEY

Error Handling

If the request is invalid or the API key is missing, the API will return an error response.

Example Error Response

{
    "success": false,
    "error": {
        "code": 401,
        "message": "Unauthorized. Missing or invalid API key."
    }
}