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

# Historical Exchange Rates

> Fetch midpoint currency exchange rates for a date in the past



## OpenAPI

````yaml get /historical
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:
  /historical:
    get:
      tags:
        - currency
        - plan-one
        - plan-extra
        - plan-premium
      description: Fetch midpoint currency exchange rates for a date in the past
      parameters:
        - name: date
          in: query
          description: >-
            UTC date in YYYY-MM-DD format. As far back as Jan 1970, depending on
            the currency pair.
          required: true
          schema:
            $ref: '#/components/schemas/Date'
        - name: from
          in: query
          description: Base currency 3-letter symbol, defaults to USD
          required: false
          allowEmptyValue: true
          schema:
            $ref: '#/components/schemas/Currency'
        - name: to
          in: query
          description: >-
            Target currencies, comma separated list of 3-letter symbols.
            Defaults to all currencies if omitted
          required: false
          allowEmptyValue: true
          schema:
            $ref: '#/components/schemas/CurrencyList'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  base:
                    $ref: '#/components/schemas/Currency'
                  date:
                    $ref: '#/components/schemas/Date'
                  ms:
                    $ref: '#/components/schemas/ResponseTime'
                  results:
                    type: object
                    minProperties: 130
                    additionalProperties:
                      type: number
                      format: float
              example:
                date: '2021-01-16'
                base: USD
                results:
                  AED: 3.67297
                  AFN: 77.11468
                  ALL: 101.78125
                  AMD: 523.67143
                  ANG: 1.78691
                  AOA: 653.45356
                  ARS: 85.74709
                  AUD: 1.29806
                  AWG: 1.79943
                  AZN: 1.70727
                  BAM: 1.62182
                  BBD: 1.99941
                  BDT: 84.84175
                  BGN: 1.61063
                  BHD: 0.37612
                  BIF: 1943.32401
                  BMD: 0.99926
                  BND: 1.32953
                  BOB: 6.88532
                  BRL: 5.29479
                  BSD: 1.00177
                  BTN: 73.22317
                  BWP: 10.98351
                  BZD: 2.01472
                  CAD: 1.27357
                  CDF: 1977.04254
                  CHF: 0.8912
                  CLF: 0.02491
                  CLP: 734.84469
                  CNH: 6.47453
                  CNY: 6.48079
                  COP: 3461.79891
                  CUP: 24.99558
                  CVE: 90.9024
                  CZK: 21.65759
                  DJF: 177.94053
                  DKK: 6.15612
                  DOP: 58.27175
                  DZD: 133.63021
                  EGP: 15.64449
                  ERN: 15.1347
                  ETB: 39.35227
                  EUR: 0.82791
                  FJD: 2.05329
                  FKP: 0.73605
                  GBP: 0.73605
                  GEL: 3.30208
                  GHS: 5.78235
                  GIP: 0.73605
                  GMD: 51.76064
                  GNF: 10080.74488
                  GTQ: 7.78301
                  GYD: 210.42985
                  HKD: 7.75357
                  HNL: 24.12042
                  HRK: 6.19682
                  HTG: 75.90461
                  HUF: 298.21139
                  IDR: 14054.17341
                  ILS: 3.2719
                  INR: 73.16164
                  IQD: 1458.41307
                  IRR: 42031.79744
                  ISK: 129.4936
                  JMD: 144.24702
                  JOD: 0.70779
                  JPY: 103.87016
                  KES: 109.70116
                  KGS: 75.50493
                  KHR: 4047.84337
                  KMF: 406.08715
                  KPW: 900.13249
                  KRW: 1102.13455
                  KWD: 0.30318
                  KYD: 0.81923
                  KZT: 418.85765
                  LAK: 9308.2585
                  LBP: 1509.38466
                  LKR: 194.62682
                  LRD: 167.93022
                  LSL: 15.21787
                  LYD: 4.45341
                  MAD: 8.91064
                  MDL: 17.18902
                  MGA: 3762.10805
                  MKD: 51.00986
                  MMK: 1331.8784
                  MNT: 2853.84955
                  MOP: 8.01634
                  MRU: 36.41764
                  MUR: 39.84837
                  MVR: 15.66392
                  MWK: 773.70087
                  MXN: 19.79604
                  MYR: 4.03732
                  MZN: 74.77698
                  NAD: 15.18769
                  NGN: 380.3327
                  NOK: 8.56904
                  NPR: 117.3193
                  NZD: 1.40232
                  OMR: 0.38422
                  PAB: 0.99926
                  PEN: 3.60165
                  PGK: 3.52819
                  PHP: 48.06492
                  PKR: 160.16046
                  PLN: 3.7535
                  PYG: 6890.343
                  QAR: 3.64022
                  RON: 4.02672
                  RSD: 96.9947
                  RUB: 73.59569
                  RWF: 972.40542
                  SAR: 3.74834
                  SCR: 21.7415
                  SDG: 55.12079
                  SEK: 8.39445
                  SGD: 1.33084
                  SHP: 0.73605
                  SLL: 10117.25305
                  SOS: 585.66171
                  SRD: 14.0817
                  SYP: 1257.58133
                  SZL: 15.23848
                  THB: 30.10158
                  TJS: 11.37737
                  TMT: 3.49448
                  TND: 2.7086
                  TOP: 2.27536
                  TRY: 7.45083
                  TTD: 6.74407
                  TWD: 28.03621
                  TZS: 2317.83454
                  UAH: 28.17938
                  UGX: 3704.99043
                  USD: 1
                  UYU: 42.4356
                  UZS: 10493.30193
                  VND: 23216.10481
                  VUV: 107.05138
                  WST: 2.54085
                  XAF: 542.97807
                  XCD: 2.69954
                  XDR: 0.69699
                  XOF: 542.97807
                  XPF: 98.70455
                  YER: 246.27558
                  ZAR: 15.20595
                  ZMW: 21.37472
                ms: 13
        '400':
          description: Bad Request
        '401':
          description: Not Authorized
        '403':
          description: Forbidden
        '404':
          description: >-
            Not Found - We do not have historical rates for the requested date
            and currency pair
        '429':
          description: Rate limit exceeded
components:
  schemas:
    Date:
      type: string
      pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2}'
      description: UTC/GMT date YYYY-MM-DD
    Currency:
      type: string
      pattern: '[A-Z]{3}'
      description: Three-letter ISO 4217 currency code
    CurrencyList:
      type: string
      pattern: '[A-Z]{3}(,[A-Z]{3})*'
      description: A comma-separated list of three-letter ISO 4217 currency codes
    ResponseTime:
      type: number
      format: int32
      description: Server response time in milliseconds
  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

````