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

# Exchange Rate

> Fetch a single currency exchange rate, from and to any supported physical or digital currency. Midpoint spot rate.



## OpenAPI

````yaml get /fetch-one
openapi: 3.0.3
info:
  title: fastFOREX.io
  version: 2.3.2
  description: Foreign & cryptocurrency exchange rate API
  termsOfService: https://www.fastforex.io/terms-of-sale
  contact:
    email: support@fastforex.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.fastforex.io
    description: Production
  - url: https://api.beta.fastforex.io
    description: Beta
security:
  - api_key: []
  - apiKeyHeader: []
  - bearerAuth: []
  - basicAuth: []
tags:
  - name: currency
    description: Physical currencies, rates and conversions
  - name: crypto
    description: Digital currencies, pairs & prices
  - name: fx
    description: Realtime FX trading pairs - instruments, prices and history
  - name: admin
    description: Account admin
  - name: plan-one
    description: Available on The One Plan
  - name: plan-extra
    description: Available on The Extra Plan
  - name: plan-premium
    description: Available on The Premium Plan
externalDocs:
  description: Find out more about fastFOREX.io
  url: https://www.fastforex.io
paths:
  /fetch-one:
    get:
      tags:
        - currency
        - crypto
        - plan-one
        - plan-extra
        - plan-premium
      description: >-
        Fetch a single currency exchange rate, from and to any supported
        physical or digital currency. Midpoint spot rate.
      parameters:
        - name: from
          in: query
          description: Base currency symbol (physical or digital), defaults to USD
          required: false
          allowEmptyValue: true
          schema:
            $ref: '#/components/schemas/AnyCurrency'
        - name: to
          in: query
          description: Target currency symbol (physical or digital), defaults to USD
          required: true
          schema:
            $ref: '#/components/schemas/AnyCurrency'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  base:
                    $ref: '#/components/schemas/AnyCurrency'
                  updated:
                    $ref: '#/components/schemas/DateTimes'
                  ms:
                    $ref: '#/components/schemas/ResponseTime'
                  result:
                    type: object
                    minProperties: 1
                    maxProperties: 1
                    additionalProperties:
                      type: number
                      format: float
              example:
                base: USD
                result:
                  EUR: 0.82791
                updated: '2021-01-16T16:34:29Z'
                ms: 4
        '400':
          description: Bad Request
        '401':
          description: Not Authorized
        '403':
          description: Forbidden
        '429':
          description: Rate limit exceeded
components:
  schemas:
    AnyCurrency:
      type: string
      pattern: '[A-Z0-9]{3,6}'
      description: Currency code for a physical or digital/cryptocurrency
    DateTimes:
      description: A datetime value. If no timezone offset supplied, UTC/GMT is assumed.
      oneOf:
        - $ref: '#/components/schemas/DateTime'
        - $ref: '#/components/schemas/IsoDateTimeZone'
        - $ref: '#/components/schemas/TimestampMillis'
    ResponseTime:
      type: number
      format: int32
      description: Server response time in milliseconds
    DateTime:
      type: string
      pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}'
      description: UTC/GMT datetime YYYY-MM-DD HH:MM:SS
    IsoDateTimeZone:
      type: string
      pattern: >-
        [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z?|[+-][0-9]{2}:00)
      description: ISO8601 Datetime with optional timezone offset YYYY-MM-DDTHH:MM:SS±HH:00
      example: '2021-01-26T15:30:00-05:00'
    TimestampMillis:
      type: number
      format: int64
      description: >-
        Milliseconds since Jan 1 1970 (unix timestamp with millisecond
        precision)
      example: 1739305030072
  securitySchemes:
    api_key:
      type: apiKey
      name: api_key
      in: query
    apiKeyHeader:
      type: apiKey
      name: X-API-KEY
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: api_key
    basicAuth:
      type: http
      scheme: basic

````