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

# Latest Rate for Currency (/latest/{currency})

> Get the current exchange rate for a specific currency from the Reserve Bank of Australia

## Overview

The latest currency endpoint returns the current exchange rate for a single specified currency from the Reserve Bank of Australia. This is ideal when you only need the rate for one currency and want to reduce response size and processing time.

<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="currency" type="string" required>
  Three-letter currency code (case-insensitive). Must be one of the [supported currencies](/api-reference/public/symbols).

  Examples: `USD`, `EUR`, `GBP`, `JPY`, `NZD`
</ParamField>

## Request

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

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.exchangeratesapi.com.au/latest/USD', {
    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/latest/USD"
  headers = {
      "Authorization": "Bearer your_api_key_here"
  }

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

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.exchangeratesapi.com.au/latest/USD',
    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": 1725148800,
    "base": "AUD",
    "date": "2025-09-01",
    "rates": {
      "USD": 0.643512
    }
  }
  ```
</ResponseExample>

### Response Fields

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

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

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

<ResponseField name="date" type="string">
  Date of the exchange rate in YYYY-MM-DD format
</ResponseField>

<ResponseField name="rates" type="object">
  Object containing the requested currency code and its exchange rate

  <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)
    </ResponseField>
  </Expandable>
</ResponseField>

## Response Headers

* `Cache-Control: no-store` - Response should not be cached
* `X-Request-Id: <uuid>` - Unique request identifier for debugging
* `X-Data-Stale: true` - Present only when serving fallback data
* `X-RBA-Source-Date: YYYY-MM-DD` - Present only when serving fallback data

## Error Responses

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

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

  ```json 503 Service Unavailable - Rates Unavailable theme={null}
  {
    "success": false,
    "error": {
      "code": 503,
      "type": "unavailable",
      "info": "Rates temporarily unavailable"
    }
  }
  ```
</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+) |

## Data Freshness

* Rates are updated daily at 4:00 PM AEST by the Reserve Bank of Australia
* Our system fetches new data within 30 minutes of RBA publication
* If fresh data is unavailable, we serve the most recent available rates with staleness headers

## Use Cases

* **Single Currency Monitoring**: Track one specific currency without fetching all rates
* **Reduced Bandwidth**: Minimize response size for mobile applications
* **Focused Analytics**: Build dashboards for specific currency pairs
* **Real-time Updates**: Monitor critical currency rates with lower latency


## OpenAPI

````yaml GET /latest/{currency}
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:
  /latest/{currency}:
    get:
      summary: Latest Rate for Currency
      description: >-
        Get the current exchange rate for a specific currency. Quota limits:
        Free=300 (one-time trial), Starter=5,000/month,
        Professional=50,000/month, Business=500,000/month.
      operationId: getLatestRateForCurrency
      parameters:
        - name: currency
          in: path
          required: true
          description: Currency code
          schema:
            $ref: '#/components/schemas/CurrencyCode'
          example: USD
      responses:
        '200':
          description: Latest exchange rate for currency
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestRatesResponse'
              example:
                success: true
                timestamp: 1725148800
                base: AUD
                date: '2025-09-01'
                rates:
                  USD: 0.678234
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    CurrencyCode:
      type: string
      enum:
        - AUD
        - USD
        - EUR
        - GBP
        - JPY
        - CNY
        - KRW
        - INR
        - SGD
        - NZD
        - THB
        - MYR
        - IDR
        - VND
        - HKD
        - PHP
        - CAD
        - CHF
        - TWD
        - TWI
        - SDR
      description: Three-letter currency code
    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
    ServiceUnavailable:
      description: Service temporarily unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: 503
              type: unavailable
              info: Rates temporarily unavailable
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication using Bearer token

````