{
  "openapi": "3.1.0",
  "info": {
    "title": "Currency Exchange Rates API",
    "version": "1.0.0",
    "description": "ECB reference exchange rates for 30 currencies with conversion, 90-day lookups and history.\n\nDaily exchange rates for 30 currencies with any base currency, an amount converter with inverse rates, dated lookups for any day in the last 90 days (weekends resolve to the previous business day) and daily history series with change statistics — sourced directly from the European Central Bank's official reference rates and cached hourly. Currency codes come with ISO 4217 names. Authoritative, dated, no middleman.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/currency-rates.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/currency-rates"
  },
  "servers": [
    {
      "url": "https://api-currency.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Finance",
      "description": "Currency Exchange Rates API belongs to the Finance category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/convert": {
      "get": {
        "operationId": "convert",
        "summary": "Convert",
        "description": "Convert endpoint of the Currency Exchange Rates API. Costs 5 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/currency-rates/convert"
        },
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "USD"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "GBP"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "from": "USD",
                  "to": "GBP",
                  "date": "2026-09-11",
                  "rate": 0.740295,
                  "inverse_rate": 1.350813,
                  "amount": 100,
                  "result": 74.03
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Currency Exchange Rates API. Costs 5 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/currency-rates/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "sources": [
                    {
                      "slug": "ecb-daily",
                      "name": "ECB euro foreign exchange reference rates (daily)",
                      "url": "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml",
                      "licence": "ECB — free reuse with attribution",
                      "cadence": "once per business day ~16:00 CET; edge-cached 1h"
                    },
                    {
                      "slug": "ecb-90d",
                      "name": "ECB reference rates — last 90 days",
                      "url": "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml",
                      "licence": "ECB — free reuse with attribution",
                      "cadence": "once per business day; edge-cached 1h"
                    }
                  ],
                  "attribution": {
                    "source": "European Central Bank — euro foreign exchange reference rates",
                    "source_url": "https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html",
                    "note": "Reference rates published once per business day (~16:00 CET); not real-time market rates. Weekends and holidays return the previous business day."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/currencies": {
      "get": {
        "operationId": "listCurrencies",
        "summary": "List Currencies",
        "description": "List Currencies endpoint of the Currency Exchange Rates API. Costs 5 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/currency-rates/list-currencies"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "date": "2026-09-11",
                  "count": 30,
                  "currencies": [
                    {
                      "code": "AUD",
                      "name": "Australian Dollar"
                    },
                    {
                      "code": "BRL",
                      "name": "Brazilian Real"
                    },
                    {
                      "code": "CAD",
                      "name": "Canadian Dollar"
                    },
                    {
                      "code": "CHF",
                      "name": "Swiss Franc"
                    },
                    {
                      "code": "CNY",
                      "name": "Chinese Yuan Renminbi"
                    },
                    {
                      "code": "CZK",
                      "name": "Czech Koruna"
                    },
                    {
                      "code": "DKK",
                      "name": "Danish Krone"
                    },
                    {
                      "code": "EUR",
                      "name": "Euro"
                    },
                    {
                      "code": "GBP",
                      "name": "Pound Sterling"
                    },
                    {
                      "code": "HKD",
                      "name": "Hong Kong Dollar"
                    },
                    {
                      "code": "HUF",
                      "name": "Hungarian Forint"
                    },
                    {
                      "code": "IDR",
                      "name": "Indonesian Rupiah"
                    },
                    {
                      "code": "ILS",
                      "name": "Israeli New Shekel"
                    },
                    {
                      "code": "INR",
                      "name": "Indian Rupee"
                    },
                    {
                      "code": "ISK",
                      "name": "Icelandic Krona"
                    },
                    {
                      "code": "JPY",
                      "name": "Japanese Yen"
                    },
                    {
                      "code": "KRW",
                      "name": "South Korean Won"
                    },
                    {
                      "code": "MXN",
                      "name": "Mexican Peso"
                    },
                    {
                      "code": "MYR",
                      "name": "Malaysian Ringgit"
                    },
                    {
                      "code": "NOK",
                      "name": "Norwegian Krone"
                    },
                    {
                      "code": "NZD",
                      "name": "New Zealand Dollar"
                    },
                    {
                      "code": "PHP",
                      "name": "Philippine Peso"
                    },
                    {
                      "code": "PLN",
                      "name": "Polish Zloty"
                    },
                    {
                      "code": "RON",
                      "name": "Romanian Leu"
                    },
                    {
                      "code": "SEK",
                      "name": "Swedish Krona"
                    },
                    {
                      "code": "SGD",
                      "name": "Singapore Dollar"
                    },
                    {
                      "code": "THB",
                      "name": "Thai Baht"
                    },
                    {
                      "code": "TRY",
                      "name": "Turkish Lira"
                    },
                    {
                      "code": "USD",
                      "name": "US Dollar"
                    },
                    {
                      "code": "ZAR",
                      "name": "South African Rand"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/history": {
      "get": {
        "operationId": "rateHistory",
        "summary": "Rate History",
        "description": "Rate History endpoint of the Currency Exchange Rates API. Costs 5 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/currency-rates/rate-history"
        },
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "14"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "USD"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "GBP"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "from": "USD",
                  "to": "GBP",
                  "days": 14,
                  "count": 10,
                  "start_rate": 0.7386,
                  "end_rate": 0.740295,
                  "change_pct": 0.23,
                  "min": 0.737195,
                  "max": 0.741665,
                  "series": [
                    {
                      "date": "2026-08-31",
                      "rate": 0.7386
                    },
                    {
                      "date": "2026-09-01",
                      "rate": 0.739042
                    },
                    {
                      "date": "2026-09-02",
                      "rate": 0.741665
                    },
                    {
                      "date": "2026-09-03",
                      "rate": 0.740895
                    },
                    {
                      "date": "2026-09-04",
                      "rate": 0.739098
                    },
                    {
                      "date": "2026-09-07",
                      "rate": 0.739064
                    },
                    {
                      "date": "2026-09-08",
                      "rate": 0.738247
                    },
                    {
                      "date": "2026-09-09",
                      "rate": 0.737195
                    },
                    {
                      "date": "2026-09-10",
                      "rate": 0.739626
                    },
                    {
                      "date": "2026-09-11",
                      "rate": 0.740295
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/rates": {
      "get": {
        "operationId": "rateTable",
        "summary": "Rate Table",
        "description": "Rate Table endpoint of the Currency Exchange Rates API. Costs 5 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/currency-rates/rate-table"
        },
        "parameters": [
          {
            "name": "base",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "USD"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "EUR,GBP,JPY"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "base": "USD",
                  "date": "2026-09-11",
                  "count": 3,
                  "rates": {
                    "EUR": 0.862664,
                    "GBP": 0.740295,
                    "JPY": 154.037267
                  },
                  "unsupported_symbols": [
                    "XYZ"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 5 tokens per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}