← Back to Documentations

Exchange Rate API

Exchange rate, profile, usage, and service catalog endpoints.

Finance Most Popular

V1

/api/v1

First stable version.

GET /api/v1/exchange-rate-api/latest/{base}/{target} Auth Required
Get Latest Rate

Returns the latest exchange rate between two currencies. Example: /exchange-rate-api/latest/USD/TRY

Authentication
X-Api-Key: your_api_key
Path Parameters
Name Type Required Example Description
base string required USD Base currency code (ISO 4217). Alias TL → TRY is supported.
target string required TRY Target currency code (ISO 4217). Alias TL → TRY is supported.
Response Example
{
    "success": true,
    "message": "Exchange rate fetched successfully.",
    "data": {
        "base_code": "USD",
        "target_code": "TRY",
        "rate": 32.85,
        "rate_updated_at": "2026-04-07T12:00:00+00:00",
        "updated_at": "2026-04-07T12:00:05+00:00"
    }
}
Error Response
{
    "success": false,
    "message": "Exchange rate for XYZ\/TRY was not found.",
    "error_code": "EXCHANGE_RATE_NOT_FOUND"
}
GET /api/v1/exchange-rate-api/currencies Auth Required
List Supported Currencies

Returns all currency codes supported by the exchange rate API.

Authentication
X-Api-Key: your_api_key
Response Example
{
    "success": true,
    "message": "Supported currencies fetched successfully.",
    "data": {
        "currencies": [
            "USD",
            "EUR",
            "GBP",
            "TRY",
            "JPY"
        ],
        "count": 40
    }
}
Error Response
{
    "success": false,
    "message": "Invalid API key.",
    "error_code": "INVALID_API_KEY"
}
GET /api/v1/profile Auth Required
User Profile

Returns user and plan details for the current API key.

Authentication
X-Api-Key: your_api_key
Response Example
{
    "success": true,
    "message": "Profile fetched successfully.",
    "data": {
        "user": {
            "id": 1,
            "name": "John Smith",
            "email": "john@example.com",
            "plan": {
                "id": 2,
                "title": "Pro",
                "slug": "pro",
                "monthly_request_limit": 100000
            }
        },
        "api_key": {
            "name": "Production API Key",
            "last_used_at": "2026-04-07T11:45:00.000000Z"
        }
    }
}
Error Response
{
    "success": false,
    "message": "Invalid API key.",
    "error_code": "INVALID_API_KEY"
}
GET /api/v1/usage Auth Required
Usage Statistics

Returns the current monthly request count and limit for the API key.

Authentication
X-Api-Key: your_api_key
Response Example
{
    "success": true,
    "message": "Usage fetched successfully.",
    "data": {
        "month": "2026-04",
        "request_count": 4821,
        "monthly_limit": 100000
    }
}
Error Response
{
    "success": false,
    "message": "User account is inactive.",
    "error_code": "USER_ACCOUNT_INACTIVE"
}
GET /api/v1/services
Service Catalog

Lists all active external API services. Authentication is not required.

Response Example
{
    "success": true,
    "message": "Services fetched successfully.",
    "data": {
        "services": [
            {
                "id": 1,
                "title": "Currency Rates",
                "slug": "currency-rates",
                "provider_name": "Fixer",
                "base_url": "https:\/\/api.example.com\/currency",
                "auth_type": "api_key",
                "status": true,
                "last_checked_at": "2026-04-07T10:00:00.000000Z"
            }
        ]
    }
}