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

# Get exchange rate

> Returns an exchange rate between base and target currencies for a given date



## OpenAPI

````yaml /openapi-public.json get /v1/exchange/rates/{base}/{target}
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/exchange/rates/{base}/{target}:
    get:
      tags:
        - v1 - Exchange
      summary: Get exchange rate
      description: >-
        Returns an exchange rate between base and target currencies for a given
        date
      operationId: getRate
      parameters:
        - name: base
          in: path
          description: Base currency of the exchange rate
          required: true
          schema:
            type: string
        - name: target
          in: path
          description: Target currency of the exchange rate
          required: true
          schema:
            type: string
        - name: date
          in: query
          description: >-
            Date the exchange rate is requested for. If omitted, defaults to
            today
          schema:
            $ref: '#/components/schemas/LocalDateParam'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalExchangeRateV1Model'
components:
  schemas:
    LocalDateParam:
      type: object
    ExternalExchangeRateV1Model:
      type: object
      properties:
        base:
          type: string
          example: USD
        target:
          type: string
          example: USD
        rate:
          type: number
          description: Exchange rate between base and target currency
        effectiveDate:
          type: string
          description: >-
            Effective date of the exchange rate. E.g., rate requested on
            Saturday will have the effective date Friday
          format: date
        requestedDate:
          type: string
          description: Date the exchange rate is requested for
          format: date
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````