API Documentation

Last updated: 5/15/2025

v1.0

Overview

This documentation provides details on how to use the Dollar-Euro Converter API endpoints. Our API allows you to access real-time and historical exchange rates.

Base URL

All API requests should be made to: https://dollareuro.de/api

Authentication

Currently, no authentication is required to use our API. However, we do implement rate limiting to prevent abuse. Please do not make more than 100 requests per hour.

Endpoints

GETGet Latest Exchange Rates

GET /api/rates

This endpoint returns the latest exchange rates with USD as the base currency.

Parameters

No parameters required.

Response Format

{
  "data": {
    "currency": "USD",
    "rates": {
      "EUR": 0.85,
      "GBP": 0.75,
      "JPY": 110.2,
      // other currencies...
    },
    "updated_at": "2023-09-15T12:34:56Z"
  }
}

Response Fields

  • currency: The base currency (always "USD")
  • rates: An object containing currency codes as keys and exchange rates as values
  • updated_at: ISO 8601 timestamp indicating when the rates were last updated

Example Request

curl https://dollareuro.de/api/rates

Error Responses

  • 404 Not Found: No exchange rates found in the database
  • 500 Internal Server Error: Server error occurred while fetching rates

GETGet Historical Exchange Rates

GET /api/rates/history

This endpoint returns historical exchange rates for a specified currency over a specified time period.

Parameters

ParameterTypeRequiredDescription
currencystringYesThe currency code to get historical rates for (e.g., "EUR")
rangenumberYesThe number of days to look back. Valid values: 1, 7, 30, 60, 120, 365
stepstringYesThe time interval for data points. Valid values: "minute", "hourly", "daily"

Step Validation Rules

  • For 1 day range: step must be either "minute" or "hourly"
  • For 7 day range: step must be either "hourly" or "daily"
  • For ranges of 30 days or more: step must be "daily"

Response Format

{
  "currency": "EUR",
  "range": 30,
  "step": "daily",
  "data": [
    {
      "date": "2023-09-15T00:00:00Z",
      "rate": 0.85
    },
    {
      "date": "2023-09-14T00:00:00Z",
      "rate": 0.84
    },
    // more data points...
  ],
  "count": 30
}

Response Fields

  • currency: The requested currency code
  • range: The requested range in days
  • step: The requested time interval
  • data: An array of data points, each containing a date and rate
  • count: The number of data points returned

Example Request

curl https://dollareuro.de/api/rates/history?currency=EUR&range=30&step=daily

Error Responses

  • 400 Bad Request: Missing or invalid parameters
  • 500 Internal Server Error: Server error occurred while fetching historical rates

Rate Limiting

To ensure fair usage, we limit API requests to 100 per hour per IP address. If you exceed this limit, you will receive a 429 Too Many Requests response.

Support

If you have any questions or need assistance with our API, please contact us at:

Email: [email protected]