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

# Get Exchange Rate

> Retrieve the exchange rate between two currencies for a given date

Retrieve the exchange rate between two currencies for a given date.

## Headers

**Authorization** `string` *required*

Bearer token authentication.

## Query Parameters

**date** `string` *required*

The date of the exchange rate, in `YYYY-MM-DD` format (UTC). Cannot be later than the current date in UTC.

**base\_currency** `string` *required*

The ISO 4217 code of the currency to convert from (e.g., `USD`). Case-insensitive. See [Currencies](/essentials/currencies#supported-currencies-by-api-version) for list of supported currencies.

**target\_currency** `string` *required*

The ISO 4217 code of the currency to convert to (e.g., `EUR`). Case-insensitive. See [Currencies](/essentials/currencies#supported-currencies-by-api-version) for list of supported currencies.

## Response

**object** `string`

Always `tax.exchange_rate`.

**date** `string`

The date of the exchange rate, in `YYYY-MM-DD` format (UTC).

**base\_currency** `string`

The ISO 4217 code of the currency converted from, in uppercase.

**target\_currency** `string`

The ISO 4217 code of the currency converted to, in uppercase.

**rate** `number`

The amount of `target_currency` equal to one unit of `base_currency`. Values are not rounded. Returns `1` when `base_currency` and `target_currency` are the same.

For weekends and market holidays, the rate from the most recent trading day is returned.

## Errors

If a request has more than one error, only the first is returned, in the order listed below.

<table>
  <colgroup>
    <col />

    <col />

    <col />
  </colgroup>

  <thead>
    <tr><th>Status</th><th>Type</th><th>Description</th></tr>
  </thead>

  <tbody>
    <tr><td>400</td><td>`UNRECOGNIZED_FIELD`</td><td>The request includes a query parameter other than `date`, `base_currency`, or `target_currency`.</td></tr>
    <tr><td>400</td><td>`MISSING_FIELD`</td><td>A required query parameter is missing or empty.</td></tr>
    <tr><td>400</td><td>`INVALID_DATE`</td><td>`date` is not a valid calendar date in `YYYY-MM-DD` format.</td></tr>
    <tr><td>400</td><td>`DATE_OUT_OF_RANGE`</td><td>`date` is later than the current date in UTC.</td></tr>
    <tr><td>400</td><td>`INVALID_CURRENCY_CODE`</td><td>`base_currency` or `target_currency` is not a three-letter code.</td></tr>
    <tr><td>400</td><td>`UNSUPPORTED_CURRENCY_CODE`</td><td>`base_currency` or `target_currency` is not a supported currency.</td></tr>
    <tr><td>404</td><td>`EXCHANGE_RATE_NOT_FOUND`</td><td>No exchange rate is available for the currency pair on the given date.</td></tr>
  </tbody>
</table>

```bash cURL theme={null}
curl "https://api.numeralhq.com/tax/exchange_rates?date=2026-09-30&base_currency=USD&target_currency=EUR" \
  -H "Authorization: Bearer sk_test_xxx"
```

```json 200 - Success theme={null}
{
  "object": "tax.exchange_rate",
  "date": "2026-09-30",
  "base_currency": "USD",
  "target_currency": "EUR",
  "rate": 0.861245
}
```

```json 400 - Date Out of Range theme={null}
{
  "code": 400,
  "type": "DATE_OUT_OF_RANGE",
  "message": "date 2099-01-01 is in the future. Latest available date is 2026-10-20 (today, UTC)."
}
```


## OpenAPI

````yaml GET /tax/exchange_rates
openapi: 3.0.1
info:
  title: Numeral API
  description: API for sales tax calculations - Version 2024-09-01
  license:
    name: MIT
  version: '2024-09-01'
servers:
  - url: https://api.numeralhq.com/
security:
  - bearerAuth: []
paths:
  /tax/exchange_rates:
    get:
      summary: Get Exchange Rate
      description: Retrieve the exchange rate between two currencies for a given date.
      operationId: getExchangeRate_v20240901
      parameters:
        - name: date
          in: query
          required: true
          schema:
            type: string
            format: date
          description: >-
            The date of the exchange rate, in YYYY-MM-DD format (UTC). Cannot be
            later than the current date in UTC.
        - name: base_currency
          in: query
          required: true
          schema:
            type: string
          description: ISO 4217 code of the currency to convert from. Case-insensitive.
        - name: target_currency
          in: query
          required: true
          schema:
            type: string
          description: ISO 4217 code of the currency to convert to. Case-insensitive.
      responses:
        '200':
          description: Exchange rate for the requested currency pair and date
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeRateResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeRateError'
        '404':
          description: No exchange rate available for the currency pair on the given date
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeRateError'
components:
  schemas:
    ExchangeRateResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - tax.exchange_rate
        date:
          type: string
          format: date
          description: The date of the exchange rate, in YYYY-MM-DD format (UTC)
        base_currency:
          type: string
          description: ISO 4217 code of the currency converted from, in uppercase
        target_currency:
          type: string
          description: ISO 4217 code of the currency converted to, in uppercase
        rate:
          type: number
          description: >-
            Amount of target_currency equal to one unit of base_currency. Not
            rounded.
      required:
        - object
        - date
        - base_currency
        - target_currency
        - rate
    ExchangeRateError:
      type: object
      description: Error response format for the exchange rate endpoint
      properties:
        code:
          type: integer
          description: HTTP status code
          example: 400
        type:
          type: string
          description: Machine-readable error type
          example: DATE_OUT_OF_RANGE
        message:
          type: string
          description: Human-readable error message
      required:
        - code
        - type
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.