> ## 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 Rates for Date (/{date})

> Get all exchange rates for a specific historical date from the Reserve Bank of Australia

## Overview

The historical date endpoint returns all available exchange rates for a specific date in the past. This is perfect when you need all currency rates for a particular day, such as for invoice calculations, reporting, or compliance purposes.

<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>

## Path Parameters

<ParamField path="date" type="string" required>
  Date in YYYY-MM-DD format. Must be a valid date from 2018-01-01 onwards and not a weekend or Australian public holiday (when RBA doesn't publish rates).

  Examples: `2025-08-31`, `2024-12-31`, `2023-06-15`
</ParamField>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.exchangeratesapi.com.au/2025-08-31 \
    -H "Authorization: Bearer your_api_key_here"
  ```

  ```javascript JavaScript theme={null}
  const date = '2025-08-31';
  const response = await fetch(`https://api.exchangeratesapi.com.au/${date}`, {
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  });

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

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

  date = "2025-08-31"
  url = f"https://api.exchangeratesapi.com.au/{date}"
  headers = {
      "Authorization": "Bearer your_api_key_here"
  }

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

  ```php PHP theme={null}
  <?php
  $date = '2025-08-31';
  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.exchangeratesapi.com.au/{$date}",
    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,
    "timestamp": 1725062400,
    "base": "AUD",
    "date": "2025-08-31",
    "rates": {
      "USD": 0.643512,
      "EUR": 0.562934,
      "GBP": 0.487421,
      "JPY": 96.832100,
      "CNY": 4.612340,
      "KRW": 859.123000,
      "INR": 54.123400,
      "SGD": 0.867890,
      "NZD": 1.094200,
      "THB": 22.567800,
      "MYR": 2.987650,
      "IDR": 9876.543000,
      "VND": 15678.900000,
      "HKD": 5.012340,
      "PHP": 36.789000,
      "CAD": 0.876540,
      "CHF": 0.567890,
      "TWD": 20.456700,
      "TWI": 60.500000,
      "SDR": 0.487650
    }
  }
  ```
</ResponseExample>

### Response Fields

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

<ResponseField name="timestamp" type="integer">
  Unix timestamp for the specified date (midnight UTC)
</ResponseField>

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

<ResponseField name="date" type="string">
  The requested date in YYYY-MM-DD format
</ResponseField>

<ResponseField name="rates" type="object">
  Object containing all available currency codes and their exchange rates for the specified date

  <Expandable title="rates 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>

## 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 - Invalid Date Format theme={null}
  {
    "success": false,
    "error": {
      "code": 400,
      "type": "bad_request",
      "info": "Invalid date format. Use YYYY-MM-DD"
    }
  }
  ```

  ```json 404 Not Found - No Data Available theme={null}
  {
    "success": false,
    "error": {
      "code": 404,
      "type": "not_found",
      "info": "No data available for date 2025-12-25. RBA data may not be available for this date. Try /latest for current rates."
    }
  }
  ```

  ```json 404 Not Found - Date Too Early theme={null}
  {
    "success": false,
    "error": {
      "code": 404,
      "type": "not_found",
      "info": "No data available for date 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              | No historical data   |
| Starter      | 5,000            | Last 30 days         |
| Professional | 50,000           | Full history (2018+) |
| Business     | 500,000          | Full history (2018+) |

<Warning>
  **Free Plan**: No access to historical data\
  **Starter Plan**: Access to last 30 days of historical data\
  **Paid Plans**: Full access to all historical data from 2018 onwards
</Warning>

## Historical Data Availability

### Date Range

* **Available from**: January 1, 2018
* **Updated daily**: New rates published at 4:00 PM AEST by the RBA

### Missing Dates

The RBA doesn't publish exchange rates on:

* **Weekends**: Saturday and Sunday
* **Australian Public Holidays**: New Year's Day, Australia Day, Good Friday, Easter Monday, Anzac Day, Queen's Birthday, Christmas Day, Boxing Day, and other NSW state-specific holidays

Requests for these dates will return a 404 Not Found error.

### Plan-Specific Access

* **Free Plan**: No historical data access
* **Starter Plan**: Last 30 days of historical data
* **Professional & Business Plans**: Full historical archive (2018 onwards)

## Use Cases

* **Invoice Calculations**: Get official RBA rates for specific transaction dates
* **Compliance Reporting**: ATO reporting with exact historical rates
* **Audit Requirements**: Verify exchange rates used in past transactions
* **Financial Analysis**: Compare rates from specific dates
* **Accounting Integration**: Import historical rates for month-end/quarter-end processing
* **Regulatory Compliance**: Meet Australian financial reporting standards

## Precision & Standards

* **Precision**: Rates provided with up to 6 decimal places (varies by currency)
* **Currency-specific precision**: IDR and VND are provided as whole numbers by the RBA source data
* **Source**: Official Reserve Bank of Australia daily rates
* **Rounding**: Rates are stored as micro-units (rate × 1e6) and converted for display where applicable
* **Standards**: Complies with Australian financial reporting requirements


## OpenAPI

````yaml GET /{date}
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:
  /{date}:
    get:
      summary: Historical Rates for Date
      description: >-
        Get all exchange rates for a specific historical date. Historical
        access: Free=none, Starter=30 days, Professional/Business=full history
        (2018+).
      operationId: getHistoricalRatesForDate
      parameters:
        - name: date
          in: path
          required: true
          description: Date in YYYY-MM-DD format
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2025-08-31'
      responses:
        '200':
          description: Exchange rates for the specified date
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestRatesResponse'
              example:
                success: true
                timestamp: 1725062400
                base: AUD
                date: '2025-08-31'
                rates:
                  USD: 0.678234
                  EUR: 0.612345
                  GBP: 0.534567
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
components:
  schemas:
    LatestRatesResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        timestamp:
          type: integer
          description: Unix timestamp of the rate date
        base:
          type: string
          example: AUD
        date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: Date of the rates (YYYY-MM-DD)
        rates:
          $ref: '#/components/schemas/RatesObject'
      required:
        - success
        - timestamp
        - base
        - date
        - 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

````