---
title: Currency Fluctuation API - Get Currency Fluctuations Over a Time Period
version: 1.0.0
description: Get exchange rate fluctuation data between two dates for one or more currency pairs. Returns the start rate, end rate, absolute change, and percentage change for each requested symbol. Accepts a base currency (defaults to USD) and optional comma-separated target symbols. Returns a 400 error for invalid dates and a 404 error when no data is available for the interval.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 1
operations: 1
schemas: 3
---

## Table of Contents

- [Currency Fluctuation API - Get Currency Fluctuations Over a Time Period v1.0.0](#currency-fluctuation-api-get-currency-fluctuations-over-a-time-period-v100)
  - [Authentication](#authentication)
  - [Currency APIs](#currency-apis)
    - [getFluctuation](#getfluctuation)
      - [Parameters](#parameters)
      - [Responses](#responses)
  - [Schemas](#schemas)
    - [CurrencyFluctuationResponse](#currencyfluctuationresponse)
    - [CurrencyFluctuationItem](#currencyfluctuationitem)
    - [ErrorResponse](#errorresponse)



# Currency Fluctuation API - Get Currency Fluctuations Over a Time Period v1.0.0

Get exchange rate fluctuation data between two dates for one or more currency pairs. Returns the start rate, end rate, absolute change, and percentage change for each requested symbol. Accepts a base currency (defaults to USD) and optional comma-separated target symbols. Returns a 400 error for invalid dates and a 404 error when no data is available for the interval.

Base URLs:

* [https://api.apifreaks.com/v1.0](https://api.apifreaks.com/v1.0)

## Authentication

* API Key (ApiKeyAuthHeader)
    - Parameter Name: **X-apiKey**, in: header. Pass your API key via the X-apiKey request header.

* API Key (ApiKeyAuthQuery)
    - Parameter Name: **apiKey**, in: query. Pass your API key via the apiKey query parameter.

## Currency APIs

### getFluctuation

`GET /currency/fluctuation`

*Get exchange rate fluctuations*

Returns exchange rate fluctuations between two dates for the requested symbols.

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Response format: `json` (default) or `xml`.|
|startDate|query|string|true|Start date in `YYYY-MM-DD` format.|
|endDate|query|string|false|End date in `YYYY-MM-DD` format. Defaults to yesterday.|
|base|query|string|false|Base currency code. Defaults to `USD`.|
|symbols|query|string|false|Comma-separated currency codes. Omit to get all available rates.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|

> Example responses

> Successful operation

```json
{
  "startDate": "2025-01-01",
  "endDate": "2025-01-10",
  "base": "USD",
  "rateFluctuations": {
    "EUR": {
      "startRate": "0.96605",
      "endRate": "0.97620",
      "change": "-0.010150",
      "percentChange": "-1.05"
    },
    "PKR": {
      "startRate": "278.400",
      "endRate": "278.650",
      "change": "-0.25",
      "percentChange": "-0.09"
    }
  }
}
```

> Bad request - Invalid dates

```json
{
  "error": "Invalid Param Exception",
  "message": "please pass correct parameters",
  "path": "/v1.0/currency/fluctuation",
  "status": 400,
  "timestamp": "2026-07-27T12:09:21.348Z"
}
```

```json
{
  "timestamp": 1785154172736,
  "status": 400,
  "error": "Invalid Param Exception",
  "message": "Starting date cannot be after current date or ending date",
  "path": "/v2.0/fluctuation"
}
```

```json
{
  "timestamp": 1785154172225,
  "status": 400,
  "error": "Invalid Param Exception",
  "message": "Provided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!",
  "path": "/v2.0/fluctuation"
}
```

> Not found - No data for interval

```json
{
  "timestamp": 1785154173332,
  "status": 404,
  "error": "Not Found Exception",
  "message": "Rates of provided base and symbols are not found for given intervals.",
  "path": "/v2.0/fluctuation"
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Successful operation|[CurrencyFluctuationResponse](#currencyfluctuationresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad request - Invalid dates|[ErrorResponse](#errorresponse)|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|Not found - No data for interval|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|404|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

## Schemas

### CurrencyFluctuationResponse

Currency fluctuation response containing rate changes per symbol over a date interval.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|startDate|string|true|none|Start date of the interval (YYYY-MM-DD).|
|endDate|string|true|none|End date of the interval (YYYY-MM-DD).|
|base|string|true|none|Base currency used for all fluctuations.|
|rateFluctuations|object|true|none|Map of currency codes to their fluctuation details. Each key is a currency code and the value contains startRate, endRate, change, and percentChange.|
|» **additionalProperties**|[CurrencyFluctuationItem](#currencyfluctuationitem)|false|none|Fluctuation metrics for a single currency over a date interval.|

### CurrencyFluctuationItem

Fluctuation metrics for a single currency over a date interval.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|startRate|string|true|none|Rate of the currency at the start of the interval.|
|endRate|string|true|none|Rate of the currency at the end of the interval.|
|change|string|true|none|Absolute change between start and end rate. Can be positive or negative.|
|percentChange|string|true|none|Percentage change between start and end rate. Can be positive or negative.|

### ErrorResponse

Standard error envelope returned by the API on failed requests. Gateway-level validation errors use an ISO 8601 timestamp and the public endpoint path; currency-service errors use a Unix millisecond timestamp and an internal service path instead.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|timestamp|string | integer|false|none|Timestamp when the error occurred — ISO 8601 string for gateway errors, Unix milliseconds integer for currency-service errors.|
|status|integer|false|none|HTTP status code returned with the error.|
|error|string|false|none|Specific error type (e.g., Invalid Param Exception, Not Found Exception).|
|message|string|true|none|Human-readable error message describing the failure.|
|path|string|false|none|API endpoint path (gateway errors) or internal service path (currency-service errors) that produced the error.|
