> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exchangeratesapi.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Historical Exchange Rates (/timeseries)

> Get exchange rates for a date range with optional currency filtering (maximum 365 days)

## Overview

The timeseries endpoint returns historical exchange rates for a specified date range. You can optionally filter for specific currencies and limit the date range to a maximum of 365 days. This is perfect for building charts, analytics, and historical analysis.

<Note>
  This endpoint requires authentication. [Get your API key](/quickstart) to start making requests.
</Note>

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key: `Bearer your_api_key_here`
</ParamField>

## Query Parameters

<ParamField query="start_date" type="string" required>
  Start date in YYYY-MM-DD format. Must be a valid date from 2018-01-01 onwards.

  **Free Plan**: No historical access\
  **Starter Plan**: Limited to last 30 days\
  **Paid Plans**: Full access from 2018-01-01 onwards

  Example: `2025-08-01`
</ParamField>

<ParamField query="end_date" type="string" required>
  End date in YYYY-MM-DD format. Must be after start\_date.

  **Free Plan**: No access to timeseries (blocked)\
  **Starter Plan**: Maximum 7 days range\
  **Professional Plan**: Maximum 90 days range\
  **Business/Enterprise Plans**: Maximum 365 days range

  Example: `2025-08-31`
</ParamField>

<ParamField query="symbols" type="string" optional>
  Comma-separated list of currency codes to filter results (case-insensitive). If omitted, all available currencies are returned.

  Example: `USD,EUR,GBP`
</ParamField>

<ParamField query="base" type="string" optional>
  Base currency for the rates. Currently only AUD is supported.

  Default: `AUD`
</ParamField>

## Request

<CodeGroup>
  ```bash cURL - All Currencies theme={null}
  curl "https://api.exchangeratesapi.com.au/timeseries?start_date=2025-08-01&end_date=2025-08-31" \
    -H "Authorization: Bearer your_api_key_here"
  ```

  ```bash cURL - Specific Currencies theme={null}
  curl "https://api.exchangeratesapi.com.au/timeseries?start_date=2025-08-01&end_date=2025-08-31&symbols=USD,EUR,GBP" \
    -H "Authorization: Bearer your_api_key_here"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    start_date: '2025-08-01',
    end_date: '2025-08-31',
    symbols: 'USD,EUR,GBP'
  });

  const response = await fetch(`https://api.exchangeratesapi.com.au/timeseries?${params}`, {
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.exchangeratesapi.com.au/timeseries"
  headers = {
      "Authorization": "Bearer your_api_key_here"
  }
  params = {
      "start_date": "2025-08-01",
      "end_date": "2025-08-31",
      "symbols": "USD,EUR,GBP"
  }

  response = requests.get(url, headers=headers, params=params)
  data = response.json()
  print(data)
  ```

  ```php PHP theme={null}
  <?php
  $params = http_build_query([
      'start_date' => '2025-08-01',
      'end_date' => '2025-08-31',
      'symbols' => 'USD,EUR,GBP'
  ]);

  $curl = curl_init();
  curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.exchangeratesapi.com.au/timeseries?{$params}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => array(
      'Authorization: Bearer your_api_key_here'
    ),
  ));

  $response = curl_exec($curl);
  curl_close($curl);

  $data = json_decode($response, true);
  print_r($data);
  ?>
  ```
</CodeGroup>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "timeseries": true,
    "start_date": "2025-08-01",
    "end_date": "2025-08-31",
    "base": "AUD",
    "rates": {
      "2025-08-01": {
        "USD": 0.642100,
        "EUR": 0.561800,
        "GBP": 0.486200
      },
      "2025-08-02": {
        "USD": 0.644000,
        "EUR": 0.563100,
        "GBP": 0.487500
      },
      "2025-08-05": {
        "USD": 0.643800,
        "EUR": 0.562700,
        "GBP": 0.487100
      }
    }
  }
  ```
</ResponseExample>

### Response Fields

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="timeseries" type="boolean">
  Always true for timeseries responses
</ResponseField>

<ResponseField name="start_date" type="string">
  Start date from the request in YYYY-MM-DD format
</ResponseField>

<ResponseField name="end_date" type="string">
  End date from the request in YYYY-MM-DD format
</ResponseField>

<ResponseField name="base" type="string">
  Base currency (always "AUD")
</ResponseField>

<ResponseField name="rates" type="object">
  Object with dates as keys and rate objects as values

  <Expandable title="rates object structure">
    <ResponseField name="{date}" type="object">
      Each date key contains an object with currency codes and their rates

      <Expandable title="date object">
        <ResponseField name="{currency}" type="number">
          Exchange rate (AUD per unit of foreign currency) with precision varying by currency (up to 6 decimal places for most, whole numbers for IDR/VND as provided by RBA)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Response Headers

* `Cache-Control: no-store` - Response should not be cached
* `X-Request-Id: <uuid>` - Unique request identifier for debugging

## Error Responses

<ResponseExample>
  ```json 400 Bad Request - Missing Parameters theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "Missing required parameters: start_date, end_date"
    }
  }
  ```

  ```json 400 Bad Request - Invalid Date Format theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "Invalid date format. Use YYYY-MM-DD"
    }
  }
  ```

  ```json 400 Bad Request - Date Range Too Large theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "Date range cannot exceed 365 days"
    }
  }
  ```

  ```json 400 Bad Request - Invalid Date Order theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "end_date must be after start_date"
    }
  }
  ```

  ```json 400 Bad Request - Unsupported Currency theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "Unsupported currency 'XYZ'"
    }
  }
  ```

  ```json 400 Bad Request - Invalid Base Currency theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "Only AUD is supported as base currency in MVP"
    }
  }
  ```

  ```json 404 Not Found - No Data Available theme={null}
  {
    "success": false,
    "error": {
      "code": 404,
      "type": "not_found",
      "info": "No data available for date range 2017-01-01 to 2017-12-31"
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "error": {
      "code": 401,
      "type": "unauthorized",
      "info": "Invalid or missing API key"
    }
  }
  ```
</ResponseExample>

## Rate Limits

This endpoint is subject to your plan's monthly request limits:

| Plan         | Monthly Requests | Historical Access    |
| ------------ | ---------------- | -------------------- |
| Free         | 300              | Blocked (no access)  |
| Starter      | 5,000            | Last 30 days         |
| Professional | 50,000           | Full history (2018+) |
| Business     | 500,000          | Full history (2018+) |

<Warning>
  **Free Plan**: No access to timeseries endpoint (blocked)\
  **Starter Plan**: 30 days access with 7-day maximum range\
  **Professional Plan**: Full history (2018+) with 90-day maximum range\
  **Business/Enterprise Plans**: Full history (2018+) with 365-day maximum range
</Warning>

## Important Notes

* **Weekend & Holiday Gaps**: The RBA doesn't publish rates on weekends or Australian public holidays. Missing dates are not included in the response.
* **Maximum Range**: Date ranges cannot exceed 365 days
* **Data Availability**: Historical data is available from January 1, 2018 onwards
* **Currency Filtering**: Use the `symbols` parameter to reduce response size and focus on specific currencies
* **Precision**: Rates are provided with up to 6 decimal places (varies by currency; IDR and VND are whole numbers from RBA source data)

## Use Cases

* **Historical Analysis**: Analyze currency trends over time
* **Chart Generation**: Build time-series charts and graphs
* **Backtesting**: Test trading strategies with historical data
* **Reporting**: Generate monthly/quarterly currency reports
* **Research**: Academic and financial research projects
* **Compliance**: ATO reporting with official RBA historical rates


## OpenAPI

````yaml GET /timeseries
openapi: 3.1.0
info:
  title: RBA Exchange Rates API
  description: >-
    Official Reserve Bank of Australia (RBA) exchange rate data through a modern
    REST API. Transforms publicly available RBA data into clean JSON endpoints
    for Australian businesses and developers who need reliable AUD exchange
    rates.
  version: 1.0.0
  license:
    name: MIT
  contact:
    url: https://www.exchangeratesapi.com.au
servers:
  - url: https://api.exchangeratesapi.com.au
    description: Production API
security: []
paths:
  /timeseries:
    get:
      summary: Historical Exchange Rates
      description: >-
        Get exchange rates for a date range. Historical access: Free=blocked,
        Starter=30 days, Professional/Business=full history. Date range limits:
        Starter=7 days, Professional=90 days, Business=365 days.
      operationId: getTimeseriesRates
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start date (YYYY-MM-DD)
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2025-08-01'
        - name: end_date
          in: query
          required: true
          description: End date (YYYY-MM-DD)
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2025-08-31'
        - name: symbols
          in: query
          required: false
          description: Comma-separated list of currency codes to filter
          schema:
            type: string
          example: USD,EUR,GBP
        - name: base
          in: query
          required: false
          description: Base currency (currently only AUD supported)
          schema:
            type: string
            enum:
              - AUD
            default: AUD
      responses:
        '200':
          description: Historical exchange rates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeseriesResponse'
              example:
                success: true
                timeseries: true
                start_date: '2025-08-01'
                end_date: '2025-08-31'
                base: AUD
                rates:
                  '2025-08-01':
                    USD: 0.678234
                    EUR: 0.612345
                  '2025-08-02':
                    USD: 0.679123
                    EUR: 0.613456
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
components:
  schemas:
    TimeseriesResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        timeseries:
          type: boolean
          example: true
        start_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        end_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        base:
          type: string
          example: AUD
        rates:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/RatesObject'
          description: Object with dates as keys and rate objects as values
      required:
        - success
        - timeseries
        - start_date
        - end_date
        - base
        - rates
    RatesObject:
      type: object
      additionalProperties:
        type: number
        minimum: 0
        description: >-
          Exchange rate (AUD per unit of foreign currency) with precision
          varying by currency (up to 6 decimal places for most, whole numbers
          for IDR/VND as provided by RBA)
      description: Object containing currency codes as keys and exchange rates as values
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP status code
            type:
              type: string
              description: Error type identifier
            info:
              type: string
              description: Human-readable error description
          required:
            - code
            - type
            - info
      required:
        - success
        - error
  responses:
    BadRequest:
      description: Bad request - invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: 400
              type: bad_request
              info: Invalid currency format. Use 3-letter currency code (e.g., USD)
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: 401
              type: unauthorized
              info: Invalid or missing API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: 404
              type: not_found
              info: No data available for the specified date
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication using Bearer token

````