openapi: 3.0.1
info:
  title: Xe Currency Data API
  description: Xe Currency Data - Integrate your application with our globally
    trusted currency data.</br></br> Get your free API credentials for 7 days <a
    href="https://xecd-account-api.xe.com/v2/newuser?type=freetrial/">here</a>
  version: '1.0'
servers:
  - url: https://xecdapi.xe.com
security:
  - bearerAuth: []
  - basicAuth: []
paths:
  /v1/account_info:
    get:
      tags:
        - Account Information
      summary: This endpoint will return basic information for a specific
        account.
      description: Requires authentication over HTTPS with either an API key sent as a Bearer token or Basic authentication (Username and Password).</br>
      responses:
        '200':
          description: Success
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInfoResponse'
              example:
                id: 00000000-0000-0000-0000-000000000000
                organization: Example Organization
                package: EXAMPLE_PACKAGE
                service_start_timestamp: '2026-01-15T00:00:00Z'
                package_limit_duration: MONTHLY
                package_limit: 10000
                package_limit_remaining: 8342
                package_limit_reset: '2026-09-01T00:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/currencies:
    get:
      tags:
        - Currency Information
      summary: Access a list of all available currencies.
      description: This endpoint will return a list of all currencies, active
        and obsolete, available via the XE Currency Data Feed API.</br></br>If
        the obsolete optional parameter is included, then the list will contain
        both active and obsolete currencies.
      parameters:
        - name: iso
          in: query
          description: 'OPTIONAL – Comma separated list of ISO 4217 codes. This will
            limit the data returned to only those currencies that are specified. If
            this parameter is omitted, this endpoint will return results for all currencies.</br></br>
            It is a prefix match; you can provide it with one, two, or three characters
            and it will return a list of all the currencies with ISO 4217 codes that
            match.</br></br> A list of acceptable ISO 4217 currency codes can be found
            here: http://www.xe.com/iso4217.php'
          schema:
            type: string
        - name: obsolete
          in: query
          description: OPTIONAL – If 'true' then endpoint will display currencies
            that are obsolete but for which historical data is available
          schema:
            type: boolean
        - name: language
          in: query
          description: 'OPTIONAL – Default is en. Specified as an RFC-1766-compliant
            language tag.</br></br>Languages available: ar, de, en, es, fr, it, ja,
            pt, sv, zh-CN, zh-HK.'
          schema:
            type: string
        - name: additionalInfo
          in: query
          description: OPTIONAL - If 'symbol' then returns 'currency_symbol' and
            'currency_symbol_on_right' in response
          schema:
            type: string
        - name: crypto
          in: query
          description: "OPTIONAL – If 'true' then this endpoint will return data for
            the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE,
            DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM
            and XRP."
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyInfoResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                currencies:
                  - iso: EUR
                    currency_name: Euro
                    is_obsolete: false
                    currency_symbol: €
                    currency_symbol_on_right: false
                  - iso: USD
                    currency_name: US Dollar
                    is_obsolete: false
                    currency_symbol: $
                    currency_symbol_on_right: false
        '304':
          description: Not Modified
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/currencies:
    get:
      tags:
        - Currency Information
      summary: Access currency lifecycle metadata.
      description: This endpoint returns lifecycle metadata for every currency
        the API carries - when the currency was introduced and withdrawn, the
        first and last date rates are available for it, the currency that
        replaced it, the peg used to convert between the two, and whether the
        code belongs to ISO 4217.</br></br>Use it to map a date to the correct
        code before requesting a rate.</br></br>This endpoint takes no
        parameters, and always includes obsolete currencies - unlike
        <code>/v1/currencies</code>, it needs no <code>obsolete</code>
        parameter.</br></br>Also available as XML and CSV by appending
        <code>.xml</code> or <code>.csv</code> to the path.</br></br>A peg
        exists to keep a long series continuous across a currency transition.
        Values derived from one are arithmetic, not observed market rates.
      responses:
        '200':
          description: OK
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CurrencyInfoResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                currencies:
                  - currency_code: ADA
                    currency_name: Cardano
                    is_iso_4217: false
                    asset_class: crypto
                    status: active
                    rates_from: '2021-03-19'
                    currency_symbol: ₳
                    currency_symbol_on_right: false
                  - currency_code: AED
                    currency_name: Emirati Dirham
                    is_iso_4217: true
                    asset_class: fiat
                    status: active
                    rates_from: '1998-11-30'
                    peg:
                      type: hard_peg
                      from:
                        amount: 3.6725
                        currency: AED
                      to:
                        amount: 1
                        currency: USD
                    currency_symbol: د.إ
                    currency_symbol_on_right: false
        '304':
          description: Not Modified
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/bid_ask:
    get:
      tags:
        - Bid & Ask Rates (Beta)
      summary: Convert from one base currency to one or multiple counter
        currencies.
      description: |-
        <p>
        <b>This feature is in beta.</b> Access and functionality may evolve. If you’d like to participate, please sign up for our free trial.
        </p>
        <p>
        This endpoint provides <b>indicative spot bid-ask pricing</b>, updated <b>every 10 seconds</b> and sourced 
        from aggregated institutional liquidity. Data is <b>informational only</b> and may contain inaccuracies 
        during the beta phase. 
        </p>
        <h2>Endpoint Example</h2>
        <p>
        <a href="https://xecdapi.xe.com//v1/bid_ask?from=GBP&to=EUR,USD">https://xecdapi.xe.com/v1/bid_ask?from=GBP&to=EUR,USD</a> 
        </p>
        <h2>Supported Currencies</h2>
        <p>
        The Bid &amp; Ask (Beta) endpoint supports the following currencies: <b>AUD, BRL, CAD, CHF, CNH, DKK, EUR, GBP, JPY, NOK, NZD, PLN, SEK, USD</b>
        </p>
        <p>
        Any pair can be requested in either direction (as <b>from</b> or <b>to</b>), with the following exceptions involving <b>CNH</b> (offshore Chinese yuan):
        </p>
        <ul>
          <li>CNH is not available with <b>BRL</b>, <b>DKK</b>, or <b>PLN</b> in either direction.</li>
          <li>CNH is supported only as the target currency for <b>NOK</b> and <b>SEK</b>:
          <b>from=NOK&amp;to=CNH</b> and <b>from=SEK&amp;to=CNH</b> are available,
          but <b>from=CNH&amp;to=NOK</b> and <b>from=CNH&amp;to=SEK</b> are not.</li>
        </ul>
        <p>
        The rates provided are indicative spot bid-ask prices derived from aggregated institutional 
        liquidity sources and refreshed every 10 seconds. As this feature is in beta, behaviour and 
        coverage may change, and occasional inaccuracies or inconsistencies may occur. These rates are 
        intended for informational use only and should not be relied upon for financial reporting or 
        decision-making.
        </p>
      parameters:
        - name: from
          in: query
          description: Currency to convert from (ISO code).
          required: true
          schema:
            type: string
        - name: to
          in: query
          description: Comma separated list of currencies to convert to (ISO
            codes).
          required: true
          schema:
            type: string
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
      responses:
        '200':
          description: Successful retrieval of bid/ask rates
          headers:
            X-Request-Id:
              description: Unique request identifier
              schema:
                type: string
            X-RateLimit-Limit:
              description: Total requests allowed in current window
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in current window
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix timestamp when rate limit resets
              schema:
                type: integer
            X-RateRequest-Limit:
              description: Total rate requests allowed
              schema:
                type: integer
            X-RateRequest-Remaining:
              description: Remaining rate requests
              schema:
                type: integer
            X-RateRequest-Reset:
              description: Unix timestamp when rate request quota resets
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidAskResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                rates:
                  - timestamp: '2026-09-24T14:25:21'
                    from: GBP
                    to: EUR
                    bid: 1.162301856
                    ask: 1.1624282679
                  - timestamp: '2026-09-24T14:25:21'
                    from: GBP
                    to: USD
                    bid: 1.3220781505
                    ask: 1.3222372129
        '400':
          description: Invalid request parameters or BidAskException. May
            include field-specific validation errors.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BidAskErrorResponse'
                  - type: object
                    properties:
                      fieldErrors:
                        type: object
                        additionalProperties:
                          type: string
                        description: Map of field names to validation error
                          messages (present only for validation errors)
              example:
                code: 17
                message: Invalid request parameters
                documentation_url: https://developers.xe.com/docs/currency-data-api
                fieldErrors:
                  to: Currency must be one of AUD, BRL, CAD, CHF, CNH, DKK, EUR,
                    GBP, JPY, NOK, NZD, PLN, SEK, USD
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidAskErrorResponse'
              example:
                code: 1
                message: Bad credentials
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidAskErrorResponse'
              example:
                code: 3
                message: Monthly rate limit exceeded.
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidAskErrorResponse'
              example:
                code: 0
                message: No static resource direct/v1/bid-ask
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidAskErrorResponse'
              example:
                code: 4
                message: Current interval rate limit exceeded.
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
              example: An unexpected error occurred
  /v1/convert_from:
    get:
      tags:
        - Mid-market Rates
      summary: Convert from one base currency to one or multiple counter
        currencies.
      description: In the example below, the Convert FROM API query endpoint is
        to convert from GBP to all available currencies (the asterisk *
        represents ALL currencies).</br><a
        href="https://xecdapi.xe.com/v1/convert_from.csv/?from=GBP&to=*&amount=1">https://xecdapi.xe.com/v1/convert_from.csv/?from=GBP&to=*&amount=1</a>
      parameters:
        - name: from
          in: query
          description: OPTIONAL – Currency you want to convert from ISO code. Note
            if this parameter is omitted, default is USD.</br>
          schema:
            type: string
        - name: to
          in: query
          description: 'Comma separated list of to currencies ISO 4217 codes.  This
            will limit the data returned to only those currencies you are interested
            in. Use an asterisk * to convert all currencies.</br> Note: Obsolete currencies
            are replaced by their successor currency.</br>'
          required: true
          schema:
            type: string
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1 is
            assumed.</br>
          schema:
            type: number
        - name: obsolete
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display rates for
            currencies that are obsolete. If ‘false’ then obsolete currencies are
            replaced by their successor currency.
          schema:
            type: boolean
        - name: interval
          in: query
          description: OPTIONAL – Using one of the interval values below in your
            call request will return rates for that specific
            interval.</br></br>"daily" - Returns the latest daily rate at your
            pre-chosen daily lock-in time</br>"hourly" - Returns rates for the
            most recent hour</br>"15minutes" - Returns rates for the most recent
            15 minute period</br>"minutely" - Returns rates for the most recent
            minute</br></br>If omitted, we’ll default to your fastest rate
            frequency (i.e. live, 15-min, hourly, then daily) as per your
            subscription plan.
          schema:
            type: string
        - name: inverse
          in: query
          description: 'OPTIONAL – If ‘true’ then endpoint will include inverse rates.
            An inverse rate is a quote for which the base currency and counter currency
            are switched. An inverse is calculated by dividing one by the exchange rate.
            Example: If the exchange rate for $1 USD to EUR = 0.874852, then the inverse
            rate would be 1/0.874852 = 1.14305, meaning that US$1.14305 would buy 1
            euro.'
          schema:
            type: boolean
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
        - name: margin
          in: query
          description: "OPTIONAL – This parameter can be used to add a margin (-/+)  to
            XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint
            and the API will return our mid-market rates plus the margin of 2.05 percent."
          schema:
            type: number
        - name: crypto
          in: query
          description: "OPTIONAL – If 'true' then this endpoint will return data for
            the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE,
            DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM
            and XRP."
          schema:
            type: boolean
        - name: skip_weekends
          in: query
          description: OPTIONAL - Applicable to queries with rate intervals faster
            than daily. If 'true' then requests during the weekend will respond
            with the rate as of market close (Friday, 5pm America/New_York).
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertFromResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                from: GBP
                amount: 1.0
                timestamp: '2026-09-24T14:25:00Z'
                to:
                  - quotecurrency: EUR
                    mid: 1.1623050132
                  - quotecurrency: USD
                    mid: 1.32212641
        '304':
          description: Not Modified
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 42
                message: 'Invalid interval requested: BOGUS'
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/convert_to:
    get:
      tags:
        - Mid-market Rates
      summary: Convert to a currency amount from one or multiple other
        currencies.
      description: In the example below, the Convert TO API query endpoint is to
        convert to GBP from all available currencies (the asterisk * represents
        ALL currencies).</br><a
        href="https://xecdapi.xe.com/v1/convert_to.csv/?to=GBP&from=*&amount=1">https://xecdapi.xe.com/v1/convert_to.csv/?to=GBP&from=*&amount=1</a>
      parameters:
        - name: from
          in: query
          description: 'Comma separated list of to currencies ISO codes.  This will
            limit the data returned to only those currencies you are interested in.
            Use an asterisk * to convert all currencies.</br> Note: Obsolete currencies
            are replaced by their successor currency.</br>'
          required: true
          schema:
            type: string
        - name: to
          in: query
          description: OPTIONAL - Currency you want to convert to ISO code.  Note
            if this parameter is omitted, default is USD.</br>
          schema:
            type: string
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1 is
            assumed.</br>
          schema:
            type: number
        - name: obsolete
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display rates for
            currencies that are obsolete. If ‘false’ then obsolete currencies are
            replaced by their successor currency.
          schema:
            type: boolean
        - name: interval
          in: query
          description: OPTIONAL – Using one of the interval values below in your
            call request will return rates for that specific
            interval.</br></br>"daily" - Returns the latest daily rate at your
            pre-chosen daily lock-in time</br>"hourly" - Returns rates for the
            most recent hour</br>"15minutes" - Returns rates for the most recent
            15 minute period</br>"minutely" - Returns rates for the most recent
            minute</br></br>If omitted, we’ll default to your fastest rate
            frequency (i.e. live, 15-min, hourly, then daily) as per your
            subscription plan.
          schema:
            type: string
        - name: inverse
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display the inverse
            of the converted value. If ‘false‘ then it will not be displayed.
          schema:
            type: boolean
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
        - name: margin
          in: query
          description: "OPTIONAL – This parameter can be used to add a margin (-/+)  to
            XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint
            and the API will return our mid-market rates plus the margin of 2.05 percent."
          schema:
            type: number
        - name: crypto
          in: query
          description: "OPTIONAL – If 'true' then this endpoint will return data for
            the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE,
            DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM
            and XRP."
          schema:
            type: boolean
        - name: skip_weekends
          in: query
          description: OPTIONAL - Applicable to queries with rate intervals faster
            than daily. If 'true' then requests during the weekend will respond
            with the rate as of market close (Friday, 5pm America/New_York).
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertToResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                to: GBP
                amount: 1.0
                timestamp: '2026-09-24T14:25:00Z'
                from:
                  - quotecurrency: EUR
                    mid: 1.1623050132
                  - quotecurrency: USD
                    mid: 1.32212641
        '304':
          description: Not Modified
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 42
                message: 'Invalid interval requested: BOGUS'
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/historic_rate:
    get:
      tags:
        - Mid-market Rates
      summary: Get historic rates for one base currency against one or more
        counter currencies.
      description: The Currency Data API provides you with access to daily
        historical rates back to 1998. When retrieving historical rates through
        our Currency Data API, you would specify your requested currencies along
        with the date and/or date range and time (hh:mm). Minutely and 15 minute
        rates are available for the past 7 days. Outside of 7 days you have
        access to rates on the hour. Historical rates are available with all API
        packages. The time parameter (hh:mm) is applicable only for packages
        with access to rate updates faster than daily.</br>The endpoint returns
        the historic rate for a single base currency and one or more counter
        currencies.</br></br><a
        href="https://xecdapi.xe.com/v1/historic_rate.csv/?from=USD&date=2011-03-05&to=CAD,EUR">https://xecdapi.xe.com/v1/historic_rate.csv/?from=USD&date=2011-03-05&to=CAD,EUR</a></br>
      parameters:
        - name: from
          in: query
          description: OPTIONAL – Currency you want to convert from ISO
            code.</br>Note if this parameter is omitted, default is USD.</br>
          schema:
            type: string
        - name: to
          in: query
          description: 'Comma separated list of to currencies ISO 4217 codes.</br>This
            will limit the data returned to only those currencies you are interested
            in. Use an asterisk * to specify all currencies.</br> Note: Obsolete currencies
            are replaced by their precursor or successor currency.</br>'
          required: true
          schema:
            type: string
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1.00 is
            assumed.</br>
          schema:
            type: number
        - name: date
          in: query
          description: OPTIONAL - UTC date should be in the form of YYYY-MM-DD,
            back to 1995-11-16.</br></br>If your account is registered to receive
            daily rates only, the default time value used is 00:00 UTC, or your
            daily lock-in time if one is set.</br></br>Otherwise the endpoint will
            return the latest rates for your chosen date.
          schema:
            type: string
        - name: time
          in: query
          description: OPTIONAL – *Time parameter is only applicable to packages
            with access to rate frequencies faster than daily.*</br></br>UTC time
            is in format of HH:MM
          schema:
            type: string
        - name: obsolete
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display rates for
            currencies that are obsolete. If ‘false’ then obsolete currencies are
            replaced by their successor currency.
          schema:
            type: boolean
        - name: inverse
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display the inverse
            of the converted value. If ‘false‘ then it will not be displayed.
          schema:
            type: boolean
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
        - name: margin
          in: query
          description: "OPTIONAL – This parameter can be used to add a margin (-/+)  to
            XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint
            and the API will return our mid-market rates plus the margin of 2.05 percent."
          schema:
            type: number
        - name: crypto
          in: query
          description: |-
            OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE, DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM and XRP.

            <i>Note: Historical crypto data varies by currency. Most start from May 2022 onward.</i>
          schema:
            type: boolean
        - name: use_lock_in_time
          in: query
          description: OPTIONAL - If ‘true’ then this endpoint will display rates
            using your daily lock in rate time (any value set for the time will be
            ignored).
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricRateResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                from: USD
                amount: 1.0
                timestamp: '2026-09-20T00:00:00Z'
                to:
                  - quotecurrency: EUR
                    mid: 0.8706371278
                  - quotecurrency: GBP
                    mid: 0.7465807902
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 11
                message: Date 2099-01-01T00:00:00Z is in future
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 1
                message: Bad credentials
                documentation_url: https://developers.xe.com/docs/currency-data-api
            text/plain:
              schema:
                type: string
              example: 'Endpoint not authorized. Feature missing: HISTORIC_RATES'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/historic_rate/period:
    get:
      tags:
        - Mid-market Rates
      summary: Get historic rates for one base currency against one or more
        counter currencies over a period of time.
      description: This endpoint returns a daily historic rate for a single base
        currency and one or more counter currencies over a period of
        time.</br></br><a
        href="https://xecdapi.xe.com/v1/historic_rate/period.csv/?from=USD&to=CAD&start_timestamp=2017-09-01&end_timestamp=2017-11-30&per_page=30">https://xecdapi.xe.com/v1/historic_rate/period.csv/?from=USD&to=CAD&start_timestamp=2017-09-01&end_timestamp=2017-11-30&per_page=30</a></br>
      parameters:
        - name: from
          in: query
          description: OPTIONAL – Currency you want to convert from ISO code. Note
            if this parameter is omitted, default is USD.</br>
          schema:
            type: string
        - name: to
          in: query
          description: 'Comma separated list of to currencies based on ISO 4217 codes.</br>This
            will limit the data returned to only those currencies you are interested
            in.</br> Note: Obsolete currencies are replaced by their precursor or successor
            currency.</br>'
          required: true
          schema:
            type: string
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1.00 is
            assumed.</br>
          schema:
            type: number
        - name: start_timestamp
          in: query
          description: OPTIONAL - ISO 8601 timestamp in the format
            yyyy-mm-ddThh:mm giving the UTC date and time of the start of the
            period for which you would like rates returned.</br></br>If you’re
            querying using a daily interval, the time value will be ignored & the
            endpoint will return rates at your preferred daily lock-in time
            starting on the date specified in your request. If your account does
            not have a preferred daily lock-in time then rates will return as of
            00:00 UTC.</br>If you’re querying using a faster rate interval than
            daily rate interval, your endpoint will return rates starting at 00:00
            UTC if no time portion is specified.</br>
          schema:
            type: string
        - name: end_timestamp
          in: query
          description: OPTIONAL – ISO 8601 timestamp in the format
            yyyy-mm-ddThh:mm giving the UTC date and time of the end of the period
            for which you would like rates returned. If a time in the future is
            specified, the current time will be used. If no end_time is specified,
            the time specified in the “start_timestamp" parameter will also be
            used for the "end_timestamp".</br>If your query is using a daily rate
            interval, your endpoint will return rates at your preferred daily
            lock-in time ending on the date specified in your request. If your
            account does not have a preferred daily lock-in time then rates will
            return as of 00:00 UTC.</br>If your query is using a faster rate
            interval than daily, your endpoint will return daily rates at your
            specified lock-in time or 00:00 UTC by default, unless you specify a
            time parameter in your rate request.
          schema:
            type: string
        - name: interval
          in: query
          description: OPTIONAL – Using one of the interval values below in your
            call request will return rates for that specific
            interval.</br></br>"daily" - Returns one rate for the days specified
            in your time period</br>"hourly" - Returns rates for every hour in the
            time period you specify</br>"15minutes" - Returns rates for each 15
            minute interval in the time period you specify, available for 7 days
            from current date</br>”minutely” - Returns minutely rates for the time
            period, available for 7 days from current date</br></br>If omitted,
            "daily" is used. This parameter is only used if both the
            "start_timestamp" and "end_timestamp" parameters have been specified.
          schema:
            type: string
        - name: page
          in: query
          description: 'OPTIONAL – You can specify the page number you want to request.</br>Note:
            that page numbering is 1-based (the first page being page 1).</br>Omitting
            this parameter will return the first page.</br>'
          schema:
            type: number
        - name: per_page
          in: query
          description: OPTIONAL – You can specify the number of days per page. The
            default is 30 days of rates per page with a maximum of 500 days of
            rates per page.</br>
          schema:
            type: number
        - name: obsolete
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display rates for
            currencies that are obsolete. If ‘false’ then obsolete currencies are
            replaced by their successor currency.
          schema:
            type: boolean
        - name: inverse
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display the inverse
            of the converted value. If ‘false‘ then it will not be displayed.
          schema:
            type: boolean
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
        - name: margin
          in: query
          description: "OPTIONAL – This parameter can be used to add a margin (-/+)  to
            XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint
            and the API will return our mid-market rates plus the margin of 2.05 percent."
          schema:
            type: number
        - name: crypto
          in: query
          description: |-
            OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE, DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM and XRP.

            <i>Note: Historical crypto data varies by currency. Most start from May 2022 onward.</i>
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricRatePeriodResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                from: USD
                amount: 1.0
                to:
                  EUR:
                    - mid: 0.8711750189
                      timestamp: '2026-09-18T03:00:00Z'
                    - mid: 0.870650765
                      timestamp: '2026-09-19T03:00:00Z'
                  GBP:
                    - mid: 0.7485201486
                      timestamp: '2026-09-18T03:00:00Z'
                    - mid: 0.7466271079
                      timestamp: '2026-09-19T03:00:00Z'
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 12
                message: 'Date range error: start date 2026-01-01T00:00:00Z is after
                  end date 2020-01-01T00:00:00Z'
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 1
                message: Bad credentials
                documentation_url: https://developers.xe.com/docs/currency-data-api
            text/plain:
              schema:
                type: string
              example: 'Endpoint not authorized. Feature missing: HISTORIC_RATES'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/monthly_average:
    get:
      tags:
        - Mid-market Rates
      summary: 'Get monthly average rates for a single base currency and one or more
        counter currency for the month/year you specify in your API query. '
      description: The monthly average endpoint returns monthly average rates
        for a single base currency and one or more counter currency for the year
        you specify in your API query. The monthly average rate is calculated by
        taking the 00:00 UTC Daily rate for each day in the month/year you
        specify in your query. Months are returned as a numeric value from 1 to
        12 where 1 is for January and 12 is for December. If no month is
        provided, then all months for the given year are returned.</br>
      parameters:
        - name: from
          in: query
          description: OPTIONAL – Currency you want to convert from ISO code. Note
            if this parameter is omitted, default is USD.</br>
          schema:
            type: string
        - name: to
          in: query
          description: Comma separated list of to currencies based on ISO 4217
            codes. This will limit the data returned to only those currencies that
            are specified.</br>
          required: true
          schema:
            type: string
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1 is
            assumed.</br>
          schema:
            type: number
        - name: year
          in: query
          description: OPTIONAL – This parameter specifies the year to calculate
            average monthly rates.</br>
          schema:
            type: number
        - name: month
          in: query
          description: OPTIONAL – This parameter specifies the month in the given
            year to return average monthly rates. This is a numeric value from 1
            to 12 where 1 is for January and 12 is for December. If no month is
            provided, then all months for the given year are returned.</br>
          schema:
            type: number
        - name: obsolete
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display rates for
            currencies that are obsolete. If ‘false’ then obsolete currencies are
            replaced by their successor currency.
          schema:
            type: boolean
        - name: inverse
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will include inverse
            rates.
          schema:
            type: boolean
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
        - name: crypto
          in: query
          description: "OPTIONAL – If 'true' then this endpoint will return data for
            the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE,
            DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM
            and XRP."
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyAverageResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                from: USD
                amount: 1.0
                year: 2026
                to:
                  EUR:
                    - monthlyAverage: 0.8524468275
                      month: 1
                      daysInMonth: 31
                    - monthlyAverage: 0.8454772824
                      month: 2
                      daysInMonth: 28
                  GBP:
                    - monthlyAverage: 0.7401499218
                      month: 1
                      daysInMonth: 31
                    - monthlyAverage: 0.7360488046
                      month: 2
                      daysInMonth: 28
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 15
                message: Month 13 in the year 2026 is invalid
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/stats:
    get:
      tags:
        - Mid-market Rates
      summary: Gets an average rate over the specified time period, as well
        various additional statistics such as the standard deviation and
        volatility.
      description: 'The stats endpoint returns average rates for a single base currency
        and one or more counter currencies over the time period you specify in your
        API query. Note that, unlike the monthly_average endpoint, you specify exact
        start and end dates, which provides a heightened level of control. This can
        be quite useful if you want statistics for bi-monthly averages or any other
        intervals of time. </br></br> This endpoint also provides several other statistics:
        the highest and lowest rate over the period (and their respective timestamps),
        the average rate, the standard deviation, volatility, and the number of data
        points over this period. </br></br> To provide some background to how we obtain
        our statistics, volatility is measured by applying the standard deviation
        of the logarithmic daily returns, expressed in a percentage score. We calculate
        daily returns using the values of two consecutive days and measure the gain
        or loss of a currency pair (<b>for live rate frequency packages this comparison
        is done at 00:00 UTC; daily rate frequency packages will compute stats based
        on the rate lock-in time specified on the account</b>). Then, we apply a logarithm
        to the ratio between those two values (Ex: ln (valueDay2 / valueDay1) is the
        logarithmic return between day2 and day1). As for the standard deviation,
        we apply it to the daily logarithmic returns we calculated during the given
        time period. When applicable, values are expressed as a percentage so they
        are already multiplied by 100.'
      parameters:
        - name: from
          in: query
          description: OPTIONAL – Currency you want to convert from ISO code. Note
            if this parameter is omitted, default is USD.</br>
          schema:
            type: string
        - name: to
          in: query
          description: Comma separated list of to currencies based on ISO 4217
            codes. This will limit the data returned to only those currencies that
            are specified.</br>
          required: true
          schema:
            type: string
        - name: start_date
          in: query
          description: OPTIONAL – ISO 8601 timestamp in the format yyyy-mm-dd
            giving the UTC date of the start of the period for which you would
            like to compute the volatility from. Note if this parameter is
            omitted, the start date will default to today.</br>
          schema:
            type: string
        - name: end_date
          in: query
          description: OPTIONAL – ISO 8601 timestamp in the format yyyy-mm-dd
            giving the UTC date of the end of the period for which you would like
            to compute the volatility to. Note if this parameter is omitted, the
            end date will default to today.</br>
          schema:
            type: string
        - name: obsolete
          in: query
          description: OPTIONAL – If ‘true’ then endpoint will display rates for
            currencies that are obsolete. If ‘false’ then obsolete currencies are
            replaced by their successor currency.
          schema:
            type: boolean
        - name: decimal_places
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example 1 USD to EUR =
            0.874852 with decimal_places=3, the output returned will be EUR =
            0.875
          schema:
            type: number
        - name: daysInPeriod
          in: query
          description: OPTIONAL – This parameter can be used to specify the number
            of days in the period that we are considering.
          schema:
            type: number
        - name: crypto
          in: query
          description: "OPTIONAL – If 'true' then this endpoint will return data for
            the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE,
            DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM
            and XRP."
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatsResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                from: USD
                stats:
                  - to: EUR
                    high: 0.8745684278
                    low: 0.8560159877
                    average: 0.8635891576
                    standardDeviation: 0.0051467066
                    volatility: 0.2196459934
                    highTimestamp: '2026-09-23T03:00:00Z'
                    lowTimestamp: '2026-08-24T03:00:00Z'
                    dataPoints: 31
                  - to: GBP
                    high: 0.7505032122
                    low: 0.7326068831
                    average: 0.7405660819
                    standardDeviation: 0.0046295646
                    volatility: 0.2322828624
                    highTimestamp: '2026-09-23T03:00:00Z'
                    lowTimestamp: '2026-08-24T03:00:00Z'
                    dataPoints: 31
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 12
                message: 'Date range error: start date 2026-01-01T00:00:00Z is after
                  end date 2020-01-01T00:00:00Z'
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/central_bank_rate:
    get:
      tags:
        - Central Bank Exchange Rates
      summary: Central bank exchange rates from currency of central bank to one
        or multiple counter currencies, provided by specified central bank.
      description: |-
        Included with the Intermediate, Prime and Enterprise plans. Core and the free trial do not include this endpoint: on Core, add the Central bank exchange & interest rates add-on and use <code>/v2/central_bank</code> instead. See <a href="https://developers.xe.com/docs/currency-data-api/data-plans">Data plans</a>.</br></br>In the example below, the endpoint converts from CAD to all available currencies for the Bank of Canada (the asterisk * represents ALL currencies).</br><a href="https://xecdapi.xe.com/v1/central_bank_rate.csv/?central_bank=CAN&to=*&amount=1">https://xecdapi.xe.com/v1/central_bank_rate.csv/?central_bank=CAN&to=*&amount=1</a>

        <i>Note on Central Bank Data Coverage: Some Central Banks may experience temporary data gaps due to source website changes or access restrictions. For these banks, we continue to provide historical data and are working to restore full coverage.</i>
      parameters:
        - name: central_bank
          in: query
          description: |
            REQUIRED – Three letter codes representing the specific central bank you are querying for. The time(s) specified below highlights the time rates published by each respective central bank updates within the API service.</br>
            | Code | Country | Name | Posts | Available at (UTC) | Effective for | Bid/Ask
            |:---: |:---: |:---: |:---: |:---: |:---: |:---: |
            | AFG | Afghanistan | The Afghanistan Bank | Daily | 13:00 | Same day | ✓
            | AGO | Angola | National Bank of Angola | Daily | 14:00 | Same day | 
            | ALB | Albania | Bank of Albania | Daily | 13:00 | Same day | ✓
            | ALBB | Albania | Bank of Albania (Bi-Weekly) | Monthly | Mid and End of Month | Previous Week | 
            | ARM | Armenia | Central Bank of Armenia | Daily | 13:00 | Same day | 
            | AUS | Australia | Reserve Bank of Australia | Daily | 08:00 | Same day | 
            | AZE | Azerbaijan | The Central Bank of the Republic of Azerbaijan | Daily | 07:00 | Same day | 
            | BEAC | Central African States | [The Bank Of Central African States (Banque des États de l'Afrique Centrale)](https://en.wikipedia.org/wiki/Bank_of_Central_African_States) | Daily | 09:00 | Same day | ✓
            | BGD | Bangladesh | Central Bank of Bangladesh | Daily | 06:00 | Same day | ✓
            | BGR | Bulgaria | Bulgarian National Bank | Daily | 17:00 | Same day | 
            | BHR | Bahrain | Central Bank of Bahrain | Daily | 05:00 | Same day | 
            | BHS | Bahamas | Central Bank of The Bahamas | Daily | 06:00 | Same day | ✓
            | BIH | Bosnia and Herzegovina | The Central Bank of Bosnia and Herzegovina | Daily | 02:00 | Same day | ✓
            | BLZ | Belize | Central Bank of Belize | Daily | 17:00 | Same day | ✓
            | BOL | Bolivia | Central Bank of Bolivia | Daily | 22:00 | Same day | 
            | BRA | Brazil | Central Bank of Brazil | Daily | 18:00 | Same day | ✓
            | CAN | Canada | Bank of Canada | Daily | 23:00 | Same day | 
            | CAR | Eastern Caribbean States | [Eastern Caribbean Central Bank](https://en.wikipedia.org/wiki/Eastern_Caribbean_Central_Bank) | Daily | 13:00 | Same day | 
            | CHE | Switzerland | Swiss National Bank | Daily | 13:00 | Same day | 
            | CHL | Chile | Central Bank of Chile | Daily | 04:00 | Same day | 
            | CHN | China | China Foreign Exchange Trade System | Hourly | Hourly | Same day | ✓
            | COL | Colombia | Bank of the Colombian Republic (Banco de la República) | Daily | 17:00 | Same day | ✓
            | CRI | Costa Rica | Central Bank of Costa Rica (Banco Central de Costa Rica) | Daily | 01:00 | Same day | ✓
            | CZE | Czechia | Czech National Bank | Daily | 15:00 | Same day | 
            | DNK | Denmark | National Bank of Denmark (Danmarks Nationalbank) | Daily | 16:00 | Same day | 
            | DOM | Dominican Republic | Central Bank of the Dominican Republic (Banco Central de la República Dominicana) | Daily | 22:00 | Same day | 
            | DZA | Algeria | Bank of Algeria (Last seen 2026-09-16) | Daily |  | Same day | ✓
            | ECB | European Union | [European Central Bank](https://en.wikipedia.org/wiki/European_Central_Bank) | Daily | 16:00 | Same day | 
            | EGY | Egypt | Central Bank of Egypt | Daily | 14:00 | Same day | ✓
            | FJI | Fiji | Reserve Bank of Fiji | Daily | 22:00 | Same day | 
            | GBR | United Kingdom of Great Britain and Northern Ireland | Bank of England | Daily | 11:00 | Same day | 
            | GEO | Georgia | National Bank of Georgia | Daily | 14:00 | Same day | 
            | GHA | Ghana | Bank of Ghana | Daily | 18:00 | Same day | ✓
            | GTM | Guatemala | Bank of Guatemala | Daily | 16:00 | Same day | ✓
            | GUY | Guyana | Bank of Guyana | Daily | 17:00 | Same day | ✓
            | HKG | Hong Kong | Hong Kong Monetary Authority | Daily | 01:00 | Same day | ✓
            | HND | Honduras | Central Bank of Honduras | Daily | 01:00 | Same day | ✓
            | HUN | Hungary | Hungarian National Bank (Magyar Nemzeti Bank) | Daily | 12:00 | Same day | 
            | IDN | Indonesia | Bank Indonesia | Daily | 02:00 | Same day | ✓
            | IND | India | Reserve Bank of India | Daily | 09:00 | Same day | 
            | IRQ | Iraq | Central Bank of Iraq | Daily | 08:00 | Same day | 
            | ISL | Iceland | Central Bank of Iceland | Daily | 17:00 | Same day | 
            | ISR | Israel | Bank of Israel | Daily | 00:00 | Same day | 
            | JAM | Jamaica | Bank of Jamaica | Daily | 18:00 | Same day | ✓
            | JPN | Japan | Bank of Japan | Daily | 09:00 | Same day | ✓
            | KAZ | Kazakhstan | National Bank of Kazakhstan | Daily | 16:00 | Same day | 
            | KEN | Kenya | Central Bank of Kenya | Daily | 08:00 | Same day | 
            | KOR | Korea | Seoul Money Brokerage Services | Daily | 01:00 | Same day | 
            | LAO | Lao People's Democratic Republic | Bank of the Lao P.D.R | Daily | 03:00 | Same day | ✓
            | LBN | Lebanon | Bank of Lebanon (Banque du Liban) (Last seen 2024-10-21) | Every 6 weeks |  | Same day | 
            | LKA | Sri Lanka | The Central Bank of Sri Lanka | Daily | 04:00 | Same day | 
            | MAR | Morocco | Central Bank of the Kingdom of Morocco (Bank Al-Maghrib) | Daily | 17:00 | Same day | 
            | MDA | Moldova | National Bank of Moldova | Daily | 02:00 | Same day | 
            | MEX | Mexico | Bank of Mexico | Daily | 20:00 | Same day | 
            | MEXM | Mexico | Bank of Mexico (Monthly) | Monthly | End of Month | Same Month | 
            | MMR | Myanmar | Central Bank of Myanmar | Daily | 14:00 | Same day | 
            | MNG | Mongolia | Central Bank of Mongolia | Daily | 11:00 | Same day | 
            | MOZ | Mozambique | Bank of Mozambique (Banco de Moçambique) | Daily | 14:00 | Same day | ✓
            | MRT | Mauritania | Central Bank of Mauritania (Banque Centrale de Mauritanie) | Weekly | 13:00 | Same day | 
            | MYS | Malaysia | Bank Negara Malaysia | Daily | 10:00 | Same day | ✓
            | NAM | Namibia | Bank of Namibia | Daily | 08:00 | Same day | 
            | NGA | Nigeria | Central Bank of Nigeria | Daily | 18:00 | Previous Day | ✓
            | NIC | Nicaragua | Central Bank of Nicaragua (Banco Central De Nicaragua) | Daily | 16:00 | Same day | ✓
            | NOR | Norway | Central Bank of Norway (Norges Bank) | Daily | 16:00 | Same day | 
            | NZL | New Zealand | Reserve Bank of New Zealand | Daily | 03:00 | Same day | 
            | OMN | Oman | Central Bank of Oman | Daily | 07:00 | Same day | ✓
            | PAK | Pakistan | State Bank of Pakistan | Daily | 12:00 | Same day | 
            | PER | Peru | Central Reserve Bank of Peru (Banco Central de Reserva del Perú) | Daily | 20:00 | Previous Day | ✓
            | PHL | Philippines | Central Bank of the Philippines (Bangko Sentral ng Pilipinas) | Daily | 02:00 | Same day | 
            | PNG | Papua New Guinea | Bank of Papua New Guinea (Last seen 2025-10-23) | Daily |  | Same day | 
            | POL | Poland | National Bank of Poland | Daily | 12:00 | Same day | 
            | POLW | Poland | National Bank of Poland (Table B) | Weekly | Wednesday | Same Week | 
            | PRY | Paraguay | Central Bank of Paraguay (Last seen 2025-05-26) | Daily |  | Same day | 
            | QAT | Qatar | Qatar Central Bank | Daily | 09:00 | Same day | 
            | ROU | Romania | National Bank of Romania | Daily | 12:00 | Same day | 
            | RUS | Russian Federation | Central Bank of the Russian Federation | Daily | 16:00 | Previous Day | 
            | SAU | Saudi Arabia | Saudi Central Bank | Daily | 22:00 | Same day | 
            | SGP | Singapore | Monetary Authority of Singapore | Daily | 10:00 | Same day | 
            | SRB | Serbia | National Bank of Serbia | Daily | 08:00 | Same day | ✓
            | SSD | South Sudan | Bank of South Sudan (Last seen 2025-11-12) | Daily |  | Same day | ✓
            | SVN | Slovenia | Bank of Slovenia | Daily | 16:00 | Same day | 
            | SWE | Sweden | Sweden's Central Bank (Sveriges Riksbank) | Daily | 17:00 | Same day | 
            | SYC | Seychelles | Central Bank of Seychelles | Daily | 14:00 | Same day | ✓
            | SYR | Syrian Arab Republic | Central Bank of Syria (Last seen 2025-02-05) | Daily |  | Same day | ✓
            | THA | Thailand | Bank of Thailand | Daily | 12:00 | Same day | ✓
            | TJK | Tajikistan | National Bank of Tajikistan | Daily | 13:00 | Same day | 
            | TKM | Turkmenistan | Central Bank of Turkmenistan | Daily | 13:00 | Same day | 
            | TUN | Tunisia | Central Bank of Tunisia | Daily | 10:00 | Same day | 
            | TUR | Turkey | Central Bank of the Republic of Turkey | Daily | 13:00 | Same day | ✓
            | TWN | Taiwan | Central Bank of the Republic of China (Taiwan) | Daily | 10:00 | Same day | 
            | TZA | Tanzania, United Republic of | Bank of Tanzania | Daily | 22:00 | Same day | ✓
            | UAE | United Arab Emirates | Central Bank of the UAE | Daily | 16:00 | Same day | 
            | UGA | Uganda | Bank of Uganda | Daily | 08:00 | Same day | ✓
            | UKR | Ukraine | National Bank of Ukraine | Daily | 02:00 | Same day | 
            | URY | Uruguay | Central Bank of Uruguay | Daily | 22:00 | Same day | 
            | USA | United States of America | US Federal Reserve Bank of New York | Weekly | Monday | Previous Week | 
            | UZB | Uzbekistan | The Central Bank of the Republic of Uzbekistan | Daily | 13:00 | Same day | 
            | VEN | Venezuela | Central Bank of Venezuela (Banco Central de Venezuela) | Daily | 22:00 | Same day | ✓
            | VNM | Vietnam | State Bank of Vietnam | Daily | 17:00 | Same day | ✓
            | YEM | Yemen | Central Bank of Yemen (Last seen 2025-04-29) | Daily |  | Same day | ✓
            | ZAF | South Africa | South African Reserve Bank | Daily | 10:00 | Same day | 
            | ZMB | Zambia | Bank of Zambia | Daily | 09:00 | Same day | ✓
            | ZWE | Zimbabwe | Reserve Bank of Zimbabwe | Daily | 01:00 | Same day | ✓
          required: true
          schema:
            type: string
        - name: to
          in: query
          description: Comma separated list of to currencies ISO 4217 codes.  This
            will limit the data returned to only those currencies you are
            interested in. Use an asterisk * to convert all currencies.
          required: true
          schema:
            type: string
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1 is
            assumed.</br>
          required: false
          schema:
            type: number
            default: 1
        - name: date
          in: query
          description: OPTIONAL – YYYY-MM-DD format - request rates for a
            particular past date.  Rates are often not posted on weekends and
            holidays.  bid and ask are not available yet for past rates
          required: false
          schema:
            type: string
        - name: use_bank_date
          in: query
          description: 'OPTIONAL – If ‘true’, the timestamp field of a current rate
            is the issuing bank’s own local calendar date in YYYY-MM-DD format, rather
            than a UTC instant that reads as the previous day west of the bank. Example:
            a European Central Bank rate returned as 2026-08-26T22:00:00Z is dated
            2026-08-27 by the bank; requests that specify a date already return YYYY-MM-DD,
            so the parameter has no effect there.'
          required: false
          schema:
            type: boolean
            default: false
        - name: inverse
          in: query
          description: 'OPTIONAL – If ‘true’, the endpoint will include inverse rates.
            An inverse rate is a quote for which the base currency and counter currency
            are switched. An inverse is calculated by dividing one by the exchange rate.
            Example: If the exchange rate for 1 USD to EUR = 0.874852, then the inverse
            rate would be 1/0.874852 = 1.14305, meaning that US$1.14305 would buy 1
            euro.'
          required: false
          schema:
            type: boolean
            default: false
        - name: decimal_places
          in: query
          description: 'OPTIONAL – This parameter can be used to specify the number
            of decimal places included in the output. Example: if 1 USD to EUR = 0.874852,
            adding decimal_places=3 to the query will result in the endpoint returning
            EUR = 0.875'
          required: false
          schema:
            type: number
            default: 20
        - name: margin
          in: query
          description: 'OPTIONAL – This parameter can be used to add a margin (+/-)
            to the exchange rate. Example: adding margin=2.05 to the query will result
            in the endpoint returning the current exchange rates with a +2.05% margin'
          required: false
          schema:
            type: number
            default: 0
        - name: fields
          in: query
          description: Comma separated list of fields.  One or more of "mid",
            "bid" or "ask".  Bid and ask are only available when requesting the
            current bank rate.
          required: false
          schema:
            type: string
            default: mid
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CentralBankExchangeRateResponse'
              example:
                centralBankCode: BRA
                centralBankName: Central Bank of Brazil
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                from: BRL
                amount: 1.0
                timestamp: '2026-09-23T03:00:00Z'
                to:
                  - quotecurrency: EUR
                    mid: 0.1707358716
                    inverse: 5.857
                    bid: 0.170718383
                    ask: 0.1707533638
                  - quotecurrency: USD
                    mid: 0.1945109023
                    inverse: 5.1411
                    bid: 0.1944995527
                    ask: 0.1945222533
        '304':
          description: Not Modified
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 34
                message: Invalid central_bank ZZZ
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 1
                message: Bad credentials
                documentation_url: https://developers.xe.com/docs/currency-data-api
            text/plain:
              schema:
                type: string
              example: 'Endpoint not authorized. Feature missing: CENTRAL_BANK_RATES'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/central_bank:
    get:
      tags:
        - Central Bank Exchange and Interest Rates
      summary: Central bank interest rates and exchange rates for one or more
        central banks.
      description: |-
        Returns each requested central bank's policy interest rate and its exchange rates in one response, grouped by bank. To request one side only, use <code>/v2/central_bank/interest_rate</code> or <code>/v2/central_bank/exchange_rate</code>.</br></br>Requires the Central bank exchange & interest rates add-on. See <a href="https://developers.xe.com/docs/currency-data-api/data-plans">Data plans</a>.</br></br>A bank appears with an <code>interestRate</code> object only if it publishes a policy interest rate, and with an <code>exchangeRates</code> object only if it has exchange rates for the date. Use <code>/v2/central_bank/metadata</code> to see which banks publish what.</br></br>The European Central Bank sets the policy rate for the euro area, so the code of a euro area national bank (for example SVN) returns that bank's exchange rates under its own code and the European Central Bank's interest rate under <code>ECB</code>.</br></br>Exchange rates keep the direction the bank publishes them in, so <code>fromCurrency</code> is not always the bank's own currency.</br></br>Exchange rates are returned once their effective date has arrived in the bank's local time zone. Some banks publish the next day's rate in advance (for example RUS): <code>/v1/central_bank_rate</code> returns it as soon as it is published, this endpoint from the date it is effective for.</br></br>Each interest rate and each exchange rate pair returned counts as one rate request.</br></br>Also available as XML and CSV by appending <code>.xml</code> or <code>.csv</code> to the path.</br><a href="https://xecdapi.xe.com/v2/central_bank.csv?bank_code=ECB&iso=*">https://xecdapi.xe.com/v2/central_bank.csv?bank_code=ECB&iso=*</a>
      parameters:
        - name: bank_code
          in: query
          description: REQUIRED - One or more central bank codes,
            comma-separated (for example CAN,ECB), or an asterisk * for every
            supported bank. Codes are case-insensitive.
            <code>/v2/central_bank/metadata</code> lists the codes. An asterisk
            returns every rate from every bank, which can use thousands of rate
            requests in one call, so list the codes of the banks you need or
            limit the currencies with <code>iso</code>.
          required: true
          schema:
            type: string
        - name: iso
          in: query
          description: OPTIONAL - Comma-separated list of ISO 4217 currency
            codes that limits the exchange rates returned. A pair is returned
            when either of its currencies matches. Use an asterisk * or omit the
            parameter for all currencies.
          required: false
          schema:
            type: string
        - name: date
          in: query
          description: OPTIONAL - YYYY-MM-DD format - request the rates in
            effect on a past date, in the bank's local time zone. Each bank
            returns the most recent rates published on or before that date, so
            check the <code>date</code> in the response. A future date returns
            400. Unlike <code>/v1/central_bank_rate</code>, bid and ask are
            available for past dates. <code>exchangeRates.ratesFrom</code> in
            <code>/v2/central_bank/metadata</code> is the earliest date
            available.
          required: false
          schema:
            type: string
        - name: fields
          in: query
          description: OPTIONAL - Comma-separated list of exchange rate fields,
            one or more of "mid", "bid" or "ask". Bid and ask are returned only
            for banks that publish them.
          required: false
          schema:
            type: string
            default: mid
        - name: inverse
          in: query
          description: 'OPTIONAL - If true, each exchange rate is inverted and its
            currencies swapped: mid becomes 1/mid, bid becomes 1/ask and ask becomes
            1/bid. Inverted rates are rounded to 10 decimal places unless decimal_places
            is set.'
          required: false
          schema:
            type: boolean
            default: false
        - name: amount
          in: query
          description: OPTIONAL - Amount to convert. Each exchange rate is
            multiplied by this amount. Must be greater than 0.
          required: false
          schema:
            type: number
            default: 1
        - name: decimal_places
          in: query
          description: OPTIONAL - Number of decimal places for exchange rates,
            from 1 to 20. If omitted, rates keep the precision the bank
            publishes.
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CentralBankV2Response'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                centralBanks:
                  - bankCode: CAN
                    name: Bank of Canada
                    currency: CAD
                    timezone: America/Toronto
                    interestRate:
                      currentRate: 2.25
                      decisionDate: '2026-09-02'
                      lastBasisPointChange: 0
                      decisionType: HOLD
                      nextMeetingDate: '2026-10-28'
                    exchangeRates:
                      date: '2026-10-09'
                      amount: 1
                      rates:
                        - fromCurrency: GBP
                          toCurrency: CAD
                          mid: 1.8879
                        - fromCurrency: USD
                          toCurrency: CAD
                          mid: 1.4271
                  - bankCode: ECB
                    name: European Central Bank
                    currency: EUR
                    timezone: Europe/Berlin
                    interestRate:
                      currentRate: 2.5
                      decisionDate: '2026-09-16'
                      lastBasisPointChange: 25
                      decisionType: HIKE
                      nextMeetingDate: '2026-10-29'
                    exchangeRates:
                      date: '2026-10-12'
                      amount: 1
                      rates:
                        - fromCurrency: EUR
                          toCurrency: GBP
                          mid: 0.84478
                        - fromCurrency: EUR
                          toCurrency: USD
                          mid: 1.1181
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unsupportedBankCode:
                  summary: Unknown bank code
                  value:
                    code: 34
                    message: Unsupported bank code 'ZZZ'
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                missingBankCode:
                  summary: bank_code missing
                  value:
                    code: 35
                    message: Missing required parameter bank_code.
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                futureDate:
                  summary: Date in the future
                  value:
                    code: 11
                    message: Date 2099-01-01 is in future
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                invalidAmount:
                  summary: amount not greater than 0
                  value:
                    code: 27
                    message: Amount must be greater than 0
                    documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/CentralBankV2Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/central_bank/interest_rate:
    get:
      tags:
        - Central Bank Exchange and Interest Rates
      summary: Central bank policy interest rates for one or more central banks.
      description: |-
        Returns the policy interest rate for each requested central bank: the <code>interestRate</code> side of <code>/v2/central_bank</code>. Only some central banks publish one; <code>interestRates.published</code> in <code>/v2/central_bank/metadata</code> shows which.</br></br>Requires the Central bank exchange & interest rates add-on. See <a href="https://developers.xe.com/docs/currency-data-api/data-plans">Data plans</a>.</br></br>The European Central Bank sets the policy rate for the euro area, so the code of a euro area national bank returns the European Central Bank's rate, under <code>ECB</code>.</br></br>Each interest rate returned counts as one rate request.</br></br>Also available as XML and CSV by appending <code>.xml</code> or <code>.csv</code> to the path.</br><a href="https://xecdapi.xe.com/v2/central_bank/interest_rate.csv?bank_code=*">https://xecdapi.xe.com/v2/central_bank/interest_rate.csv?bank_code=*</a>
      parameters:
        - name: bank_code
          in: query
          description: REQUIRED - One or more central bank codes,
            comma-separated (for example CAN,ECB), or an asterisk * for every
            bank that publishes a policy interest rate. Codes are
            case-insensitive. A bank that does not publish one returns 400.
          required: true
          schema:
            type: string
        - name: date
          in: query
          description: OPTIONAL - YYYY-MM-DD format - request the interest rate
            in force on a past date. A future date returns 400.
            <code>interestRates.ratesFrom</code> in
            <code>/v2/central_bank/metadata</code> is the earliest date
            available.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CentralBankV2Response'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                centralBanks:
                  - bankCode: CAN
                    name: Bank of Canada
                    currency: CAD
                    timezone: America/Toronto
                    interestRate:
                      currentRate: 2.25
                      decisionDate: '2026-09-02'
                      lastBasisPointChange: 0
                      decisionType: HOLD
                      nextMeetingDate: '2026-10-28'
                  - bankCode: ECB
                    name: European Central Bank
                    currency: EUR
                    timezone: Europe/Berlin
                    interestRate:
                      currentRate: 2.5
                      decisionDate: '2026-09-16'
                      lastBasisPointChange: 25
                      decisionType: HIKE
                      nextMeetingDate: '2026-10-29'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                noInterestRate:
                  summary: Bank does not publish a policy interest rate
                  value:
                    code: 34
                    message: Unsupported bank code 'BRA'
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                missingBankCode:
                  summary: bank_code missing
                  value:
                    code: 35
                    message: Missing required parameter bank_code.
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                futureDate:
                  summary: Date in the future
                  value:
                    code: 11
                    message: Date 2099-01-01 is in future
                    documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/CentralBankV2Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/central_bank/exchange_rate:
    get:
      tags:
        - Central Bank Exchange and Interest Rates
      summary: Central bank exchange rates for one or more central banks.
      description: |-
        Returns the exchange rates each requested central bank publishes: the <code>exchangeRates</code> side of <code>/v2/central_bank</code>. Rates keep the direction the bank publishes them in, so <code>fromCurrency</code> is not always the bank's own currency.</br></br>Requires the Central bank exchange & interest rates add-on. See <a href="https://developers.xe.com/docs/currency-data-api/data-plans">Data plans</a>.</br></br>Exchange rates are returned once their effective date has arrived in the bank's local time zone. Some banks publish the next day's rate in advance (for example RUS): <code>/v1/central_bank_rate</code> returns it as soon as it is published, this endpoint from the date it is effective for.</br></br>Each exchange rate pair returned counts as one rate request.</br></br>Also available as XML and CSV by appending <code>.xml</code> or <code>.csv</code> to the path.</br><a href="https://xecdapi.xe.com/v2/central_bank/exchange_rate.csv?bank_code=CAN&iso=*">https://xecdapi.xe.com/v2/central_bank/exchange_rate.csv?bank_code=CAN&iso=*</a>
      parameters:
        - name: bank_code
          in: query
          description: REQUIRED - One or more central bank codes,
            comma-separated (for example BRA,CAN), or an asterisk * for every
            supported bank. Codes are case-insensitive.
            <code>/v2/central_bank/metadata</code> lists the codes. An asterisk
            returns every rate from every bank, which can use thousands of rate
            requests in one call, so list the codes of the banks you need or
            limit the currencies with <code>iso</code>.
          required: true
          schema:
            type: string
        - name: iso
          in: query
          description: OPTIONAL - Comma-separated list of ISO 4217 currency
            codes that limits the rates returned. A pair is returned when either
            of its currencies matches. Use an asterisk * or omit the parameter
            for all currencies.
          required: false
          schema:
            type: string
        - name: date
          in: query
          description: OPTIONAL - YYYY-MM-DD format - request the rates in
            effect on a past date, in the bank's local time zone. Each bank
            returns the most recent rates published on or before that date, so
            check the <code>date</code> in the response. A future date returns
            400. Unlike <code>/v1/central_bank_rate</code>, bid and ask are
            available for past dates. <code>exchangeRates.ratesFrom</code> in
            <code>/v2/central_bank/metadata</code> is the earliest date
            available.
          required: false
          schema:
            type: string
        - name: fields
          in: query
          description: OPTIONAL - Comma-separated list of rate fields, one or
            more of "mid", "bid" or "ask". Bid and ask are returned only for
            banks that publish them.
          required: false
          schema:
            type: string
            default: mid
        - name: inverse
          in: query
          description: 'OPTIONAL - If true, each rate is inverted and its currencies
            swapped: mid becomes 1/mid, bid becomes 1/ask and ask becomes 1/bid. Inverted
            rates are rounded to 10 decimal places unless decimal_places is set.'
          required: false
          schema:
            type: boolean
            default: false
        - name: amount
          in: query
          description: OPTIONAL - Amount to convert. Each rate is multiplied by
            this amount. Must be greater than 0.
          required: false
          schema:
            type: number
            default: 1
        - name: decimal_places
          in: query
          description: OPTIONAL - Number of decimal places, from 1 to 20. If
            omitted, rates keep the precision the bank publishes.
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CentralBankV2Response'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                centralBanks:
                  - bankCode: BRA
                    name: Central Bank of Brazil
                    currency: BRL
                    timezone: America/Fortaleza
                    exchangeRates:
                      date: '2026-10-09'
                      amount: 1
                      rates:
                        - fromCurrency: EUR
                          toCurrency: BRL
                          mid: 5.58355
                          bid: 5.5827
                          ask: 5.5844
                        - fromCurrency: USD
                          toCurrency: BRL
                          mid: 4.9889
                          bid: 4.9886
                          ask: 4.9892
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unsupportedBankCode:
                  summary: Unknown bank code
                  value:
                    code: 34
                    message: Unsupported bank code 'ZZZ'
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                missingBankCode:
                  summary: bank_code missing
                  value:
                    code: 35
                    message: Missing required parameter bank_code.
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                futureDate:
                  summary: Date in the future
                  value:
                    code: 11
                    message: Date 2099-01-01 is in future
                    documentation_url: https://developers.xe.com/docs/currency-data-api
                invalidAmount:
                  summary: amount not greater than 0
                  value:
                    code: 27
                    message: Amount must be greater than 0
                    documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/CentralBankV2Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/central_bank/metadata:
    get:
      tags:
        - Central Bank Exchange and Interest Rates
      summary: List the central banks and what each one publishes.
      description: |-
        Returns every central bank the V2 endpoints support: its code, name, home currency and the countries it covers, whether it publishes a policy interest rate, and how it publishes exchange rates. Use the <code>bankCode</code> values as <code>bank_code</code> on the other V2 central bank endpoints.</br></br>This endpoint takes no parameters. It works with any valid credentials and does not count towards your rate requests.</br></br>Also available as XML and CSV by appending <code>.xml</code> or <code>.csv</code> to the path.</br><a href="https://xecdapi.xe.com/v2/central_bank/metadata.csv">https://xecdapi.xe.com/v2/central_bank/metadata.csv</a>
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CentralBankMetadataResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                centralBanks:
                  - bankCode: BRA
                    name: Central Bank of Brazil
                    countryCode:
                      - BR
                    baseCurrency: BRL
                    interestRates:
                      published: false
                    exchangeRates:
                      postFrequency: daily
                      availableAtTimeUtc: '18:00'
                      effectiveFor: same day
                      bidAsk: true
                      ratesFrom: '2026-01-02'
                  - bankCode: CAN
                    name: Bank of Canada
                    countryCode:
                      - CA
                    baseCurrency: CAD
                    interestRates:
                      published: true
                      ratesFrom: '2010-05-31'
                    exchangeRates:
                      postFrequency: daily
                      availableAtTimeUtc: '23:00'
                      effectiveFor: same day
                      bidAsk: false
                      ratesFrom: '2026-01-02'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/alternative_source_rate:
    get:
      tags:
        - Alternative Source Exchange Rates
      summary: Foreign exchange rates posted by private banks, exchange markets,
        government entities & more.
      description: |
        <p>
        In the example below, the endpoint will display all exchange ratesvreported by Maybank (the asterisk * represents ALL currencies).
        </p>
        <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://xecdapi.xe.com/v1/alternative_source_rate?source=maybank&iso=*">https://xecdapi.xe.com/v1/alternative_source_rate?source=maybank&iso=*</a>
        </p>
        <p>
        <i>Note on Alternative Source Rate Coverage: Some sources may experience temporary
        data gaps due to source website changes or access restrictions. For these
        sources, we continue to provide historical data and are working to restore
        full coverage.</i>
        </p>
      parameters:
        - name: source
          in: query
          description: |
            REQUIRED – Use the following source codes to represent the specific source you are querying for. The time(s) specified below highlights the time rates are published by each respective source within the API service.</br>
            | Source | Country | Name | Posts | Available at (UTC) | Effective for | Bid/Ask
            |:---: |:---: |:---: |:---: |:---: |:---: |:---: |
            | anz | Australia | ANZ Investment Bank | Daily | 16:00 | Same day | ✓
            | anz-fj | Fiji | ANZ Investment Bank (Fiji Markets) | Daily | 23:00 | Same day | ✓
            | bazg | Switzerland | Federal Office for Customs and Border Security | Daily | 07:00 | Same day | 
            | belarus_republic | Belarus | Republic of Belarus Official Website | Daily | 08:00 | Same day | 
            | bmf | Germany | Federal Ministry of Finance | Monthly | 1st of month | Previous Month | 
            | BNA | Argentina | Bank of the Argentine Nation (Banco de la Nación Argentina) | Daily | 17:00 | Same day | ✓
            | brazil_ptax | Brazil | Central Bank of Brazil PTAX | Daily | 18:00 | Same day | ✓
            | citibank-vn | Vietnam | Citibank Vietnam Markets | Daily | 11:00 | Same day | ✓
            | commerzbank | Germany | Commerzbank | Daily | 01:00 | Same day | ✓
            | cyprus_customs | Cyprus | Cyprus Customs & Excise Department | Monthly | End of Month | Same Month | 
            | egypt | Egypt | Central Bank of Egypt (Market Rate) | Daily | 14:00 | Same day | ✓
            | HKAB | Hong Kong | Hong Kong Association of Banks | Daily | 01:00 | Same day | ✓
            | indonesia_treasury | Indonesia | Indonesia Treasury (Badan Kebijakan Fiskal) | Daily | 01:00 | Same day | 
            | ireland_revenue | Ireland | Revenue - Irish Tax and Customs | Monthly | Monthly | Same Month | 
            | maybank | Malaysia | Maybank | Daily | 06:00 | Same day | ✓
            | mitsubishi_ufg | Japan | Mitsubishi UFJ Financial Group (Mitsubishi UFJ Financial Group) | Daily | 03:00 | Same day | ✓
            | NatWest | United Kingdom of Great Britain and Northern Ireland | National Westminster Bank | Daily | 09:00 | Same day | ✓
            | nzfma | New Zealand | New Zealand Financial Markets Association | Daily | 03:00 | Same day | 
            | peru-sbs | Peru | Superintendency of Banking, Insurance and Private Pension Fund Administrators (Superintendencia de Banca, Seguros y AFP (República del Perú)) | Daily | 19:00 | Same day | ✓
            | SFC | Colombia | Financial Superintendence of Colombia | Daily | 22:00 | Same day | 
            | taiwan_customs | Taiwan | Customs Administration, Ministry of Finance (Taiwan Customs Administration) | Monthly | On days 1, 11, 21 of each month | Same Month | ✓
            | uganda_ra | Uganda | Uganda Revenue Authority | Monthly | 1st of month | Same Month | 
            | vietcom | Vietcombank | Joint Stock Commercial Bank for Foreign Trade of Vietnam | Daily | 17:00 | Same day | ✓
          required: true
          schema:
            type: string
        - name: iso
          in: query
          description: OPTIONAL - Comma separated list of to currencies ISO 4217
            codes. This will limit the data returned to only those currencies you
            are interested in.
          required: false
          schema:
            type: string
            default: '*'
        - name: amount
          in: query
          description: OPTIONAL – This parameter can be used to specify the amount
            you want to convert, if an amount is not specified then 1 is
            assumed.</br>
          required: false
          schema:
            type: number
            default: 1
        - name: date
          in: query
          description: OPTIONAL – YYYY-MM-DD format - request latest rates on, or
            before given date. Rates are often not posted on weekends and
            holidays.  For sources that provide rates multiple times a day, use
            YYYY-MM-DDTHH:MM format to request rates at, or before, a time.
          required: false
          schema:
            type: string
        - name: inverse
          in: query
          description: OPTIONAL – If ‘true’, the endpoint will respond with the
            inverse of the exchange rates.
          required: false
          schema:
            type: boolean
            default: false
        - name: decimal_places
          in: query
          description: 'OPTIONAL – is parameter can be used to specify the number of
            decimal places included in the output. Example: if 1 USD to EUR = 0.874852,
            adding decimal_places=3 to the query will result in the endpoint returning
            EUR = 0.875'
          required: false
          schema:
            type: number
            default: 20
        - name: margin
          in: query
          description: 'OPTIONAL – This parameter can be used to add a margin (+/-)
            to the exchange rate. Example: adding margin=2.05 to the query will result
            in the endpoint returning the current exchange rates with a +2.05% margin.  '
          required: false
          schema:
            type: number
            default: 0
        - name: fields
          in: query
          description: OPTIONAL - Comma separated list of fields. One or more of
            "mid", "bid" or "ask".
          required: false
          schema:
            type: string
            default: mid
      responses:
        '200':
          description: OK
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlternativeSourceExchangeRateResponse'
              example:
                terms: https://www.xe.com/legal
                privacy: https://www.xe.com/privacy
                source: HKAB
                name: Hong Kong Association of Banks
                amount: 1.0
                timestamp: '2026-09-23T16:00:00Z'
                rates:
                  - fromCurrency: AUD
                    toCurrency: HKD
                    mid: 5.5168
                    bid: 5.4365
                    ask: 5.597
                  - fromCurrency: BND
                    toCurrency: HKD
                    mid: 6.1258
                    bid: 6.061
                    ask: 6.1905
        '304':
          description: Not Modified
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            ETag:
              schema:
                type: string
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            Last-Modified:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
        '400':
          description: Bad Request
          headers:
            X-RateRequest-Remaining:
              schema:
                type: number
            X-RateLimit-Remaining:
              schema:
                type: number
            X-RateRequest-Reset:
              schema:
                type: number
            X-RateLimit-Reset:
              schema:
                type: number
            X-RateLimit-Limit:
              schema:
                type: number
            X-RateRequest-Limit:
              schema:
                type: number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 40
                message: 'Missing required parameter: source'
                documentation_url: https://developers.xe.com/docs/currency-data-api
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 1
                message: Bad credentials
                documentation_url: https://developers.xe.com/docs/currency-data-api
            text/plain:
              schema:
                type: string
              example: 'Endpoint not authorized. Feature missing: ALT_SOURCE_RATES'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 1
            message: Bad credentials
            documentation_url: https://developers.xe.com/docs/currency-data-api
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 4
            message: Current interval rate limit exceeded.
            documentation_url: https://developers.xe.com/docs/currency-data-api
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 3
            message: Monthly rate limit exceeded.
            documentation_url: https://developers.xe.com/docs/currency-data-api
    CentralBankV2Forbidden:
      description: Forbidden - your plan does not include the Central bank
        exchange & interest rates add-on, or the monthly rate limit is exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 16
            message: 'Endpoint not authorized. Feature missing: central-bank-rates-v2'
            documentation_url: https://developers.xe.com/docs/currency-data-api
    InternalServerError:
      description: Internal Server Error
      content:
        text/plain:
          schema:
            type: string
          example: An unexpected error occurred
  schemas:
    BidAskRate:
      type: object
      properties:
        from:
          type: string
          description: base currency ISO code
        to:
          type: string
          description: quote currency ISO code
        bid:
          type: number
          description: bid price
        ask:
          type: number
          description: ask price
        timestamp:
          type: string
          format: date-time
          description: The time the rate was valid for.
    BidAskErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        message:
          type: string
          description: Error message describing the issue
        documentation_url:
          type: string
          description: Link to API documentation
        fieldErrors:
          type: object
          additionalProperties:
            type: string
          description: Per-field validation messages, when present
    AccountInfoResponse:
      type: object
      properties:
        id:
          type: string
        organization:
          type: string
        package:
          type: string
        service_start_timestamp:
          type: string
        package_limit_duration:
          type: string
        package_limit:
          type: number
        package_limit_remaining:
          type: number
        package_limit_reset:
          type: string
    CurrencyInfoResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        currencies:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyInfo'
    ConvertToResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        to:
          type: string
        amount:
          type: number
        timestamp:
          type: string
        from:
          type: array
          items:
            $ref: '#/components/schemas/Rate'
    ConvertFromResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        from:
          type: string
        amount:
          type: number
        timestamp:
          type: string
        to:
          type: array
          items:
            $ref: '#/components/schemas/Rate'
    CentralBankExchangeRateResponse:
      type: object
      properties:
        centralBankCode:
          type: string
        centralBankName:
          type: string
        terms:
          type: string
        privacy:
          type: string
        from:
          type: string
        amount:
          type: number
        timestamp:
          type: string
        to:
          type: array
          items:
            $ref: '#/components/schemas/CentralBankRate'
    AlternativeSourceExchangeRateResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        source:
          type: string
        name:
          type: string
        amount:
          type: number
        timestamp:
          type: string
        rates:
          type: array
          items:
            $ref: '#/components/schemas/AlternativeSourceRate'
    HistoricRateResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        from:
          type: string
        amount:
          type: number
        timestamp:
          type: string
        to:
          type: array
          items:
            $ref: '#/components/schemas/Rate'
    HistoricRatePeriodResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        from:
          type: string
        amount:
          type: number
        to:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/RatePeriod'
    MonthlyAverageResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        from:
          type: string
        amount:
          type: number
        year:
          type: number
        to:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/TOCurrencyISO'
    Rate:
      type: object
      properties:
        quotecurrency:
          type: string
        mid:
          type: number
    CentralBankRate:
      type: object
      properties:
        quotecurrency:
          type: string
        mid:
          type: number
        inverse:
          type: number
        bid:
          type: number
        ask:
          type: number
    CentralBankV2Response:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        centralBanks:
          type: array
          description: One entry per central bank, ordered by bank code.
          items:
            $ref: '#/components/schemas/CentralBankV2Bank'
    CentralBankV2Bank:
      type: object
      properties:
        bankCode:
          type: string
          description: Central bank code, as listed by
            /v2/central_bank/metadata.
        name:
          type: string
        currency:
          type: string
          description: ISO 4217 code of the bank's home currency.
        timezone:
          type: string
          description: The bank's IANA time zone. Dates in the response are
            local to the bank.
        interestRate:
          $ref: '#/components/schemas/CentralBankInterestRate'
        exchangeRates:
          $ref: '#/components/schemas/CentralBankV2ExchangeRates'
    CentralBankInterestRate:
      type: object
      description: Present only for banks that publish a policy interest rate.
      properties:
        currentRate:
          type: number
          description: The policy interest rate, in percent.
        decisionDate:
          type: string
          format: date
          description: Date of the decision that set the current rate.
        lastBasisPointChange:
          type: number
          description: Change made by that decision, in basis points (25 is 0.25
            percentage points).
        decisionType:
          type: string
          enum:
            - CUT
            - HOLD
            - HIKE
        nextMeetingDate:
          type: string
          format: date
          description: Date of the bank's next scheduled rate decision.
    CentralBankV2ExchangeRates:
      type: object
      description: Present only when the bank has exchange rates for the
        requested date.
      properties:
        date:
          type: string
          format: date
          description: The date the rates are effective for, in the bank's time
            zone.
        amount:
          type: number
        rates:
          type: array
          items:
            $ref: '#/components/schemas/CentralBankV2Rate'
    CentralBankV2Rate:
      type: object
      properties:
        fromCurrency:
          type: string
        toCurrency:
          type: string
        mid:
          type: number
        bid:
          type: number
        ask:
          type: number
    CentralBankMetadataResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        centralBanks:
          type: array
          items:
            $ref: '#/components/schemas/CentralBankMetadata'
    CentralBankMetadata:
      type: object
      properties:
        bankCode:
          type: string
          description: The value to pass as bank_code.
        name:
          type: string
        countryCode:
          type: array
          description: ISO 3166 two-letter codes of the countries the bank
            covers.
          items:
            type: string
        baseCurrency:
          type: string
          description: ISO 4217 code of the bank's home currency.
        interestRates:
          type: object
          properties:
            published:
              type: boolean
              description: Whether the bank publishes a policy interest rate.
            ratesFrom:
              type: string
              format: date
              description: First date interest rates are available. Omitted when
                not set.
        exchangeRates:
          type: object
          properties:
            postFrequency:
              type: string
              description: How often the bank publishes, for example daily or
                weekly.
            availableAtTimeUtc:
              type: string
              description: Time of day (HH:MM, UTC) the rates are usually
                available. Omitted when the bank has no fixed time.
            effectiveFor:
              type: string
              description: The period a published rate applies to, for example
                same day or previous day.
            bidAsk:
              type: boolean
              description: Whether the bank publishes bid and ask rates. Omitted
                when not set.
            ratesFrom:
              type: string
              format: date
              description: First date exchange rates are available. Omitted when
                not set.
    AlternativeSourceRate:
      type: object
      properties:
        fromCurrency:
          type: string
        toCurrency:
          type: string
        mid:
          type: number
        bid:
          type: number
        ask:
          type: number
    RatePeriod:
      type: object
      properties:
        mid:
          type: number
        timestamp:
          type: string
    TOCurrencyISO:
      type: object
      properties:
        monthlyAverage:
          type: number
        month:
          type: number
        daysInMonth:
          type: number
    CurrencyInfo:
      type: object
      properties:
        iso:
          type: string
        currency_name:
          type: string
        is_obsolete:
          type: boolean
        superceded_by:
          type: string
        currency_symbol:
          type: string
        currency_symbol_on_right:
          type: boolean
    V2CurrencyInfoResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        currencies:
          type: array
          items:
            $ref: '#/components/schemas/V2CurrencyInfo'
    V2CurrencyInfo:
      type: object
      description: Optional members are absent where they do not apply - an
        active currency carries no withdrawn_on, rates_until or successor, and
        only a redenominated or pegged currency carries a peg.
      properties:
        currency_code:
          type: string
          description: ISO 4217 code, or an Xe extension where is_iso_4217 is
            false.
        currency_name:
          type: string
        is_iso_4217:
          type: boolean
          description: False for the Xe extensions - the offshore code CNH and
            the cryptocurrencies. Precious metals, XDR and XEU are ISO 4217
            codes, so filtering on this flag keeps them.
        asset_class:
          type: string
          description: 'One of: fiat, crypto, metal, basket, inflation_indexed.'
        status:
          type: string
          description: 'One of: active, obsolete.'
        introduced_on:
          type: string
          format: date
          description: Date the currency entered circulation.
        withdrawn_on:
          type: string
          format: date
          description: Date the currency left circulation.
        rates_from:
          type: string
          format: date
          description: First date a rate is available. This can precede
            introduced_on where the series continues a predecessor currency -
            euro coverage starts in 1995 because it continues the ECU. Reading
            that earlier span requires obsolete=true.
        rates_until:
          type: string
          format: date
          description: Last date a rate is available.
        replaces:
          type: array
          description: Codes this currency replaced.
          items:
            type: string
        successor:
          type: string
          description: Code that replaced this currency.
        peg:
          $ref: '#/components/schemas/V2CurrencyPeg'
        currency_symbol:
          type: string
        currency_symbol_on_right:
          type: boolean
    V2CurrencyPeg:
      type: object
      description: Fixed conversion between this currency and its successor. A
        value produced by applying a peg is continuity only, not an observed
        market rate.
      properties:
        type:
          type: string
          description: redenomination for a rescaling of the same currency,
            hard_peg for a fixed rate against a different one.
        from:
          $ref: '#/components/schemas/V2CurrencyPegSide'
        to:
          $ref: '#/components/schemas/V2CurrencyPegSide'
    V2CurrencyPegSide:
      type: object
      properties:
        amount:
          type: number
        currency:
          type: string
    StatsResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        from:
          type: string
        stats:
          type: array
          items:
            $ref: '#/components/schemas/Stats'
    Stats:
      type: object
      properties:
        to:
          type: string
        high:
          type: number
        low:
          type: number
        average:
          type: number
        standardDeviation:
          type: number
        volatility:
          type: number
        highTimestamp:
          type: string
        lowTimestamp:
          type: string
        dataPoints:
          type: integer
    ErrorResponse:
      type: object
      properties:
        code:
          type: number
        message:
          type: string
        documentation_url:
          type: string
    BidAskResponse:
      type: object
      properties:
        terms:
          type: string
        privacy:
          type: string
        rates:
          type: array
          items:
            $ref: '#/components/schemas/BidAskRate'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key created on your Xe Currency Data account's API page,
        sent as a Bearer token in the Authorization header.
    basicAuth:
      type: http
      scheme: basic
