openapi: "3.0.3"
info:
  title: "fastFOREX API"
  version: "2.6.1"
  description: "Exchange rate API including historical Currency data, real time Gold, Metals and Crypto. JSON or WebSockets."
  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"
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: "metals"
    description: "Precious and base metals - instruments, units, purities and prices"
  - 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"
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.


        We also support metals (Gold, Silver, etc.) against physical currencies. 
        e.g. XAU => USD.
        
        
        We don't yet support crypto-metal rates here.
      parameters:
        - name: "from"
          in: "query"
          description: "Base currency symbol (physical, crypto or metal), defaults to USD"
          required: false
          allowEmptyValue: true
          schema:
            oneOf:
              - $ref: "#/components/schemas/AnyCurrency"
              - $ref: "#/components/schemas/MetalSymbol"
        - name: "to"
          in: "query"
          description: "Target currency symbol (physical, crypto or metal), defaults to USD"
          required: true
          schema:
            oneOf:
              - $ref: "#/components/schemas/AnyCurrency"
              - $ref: "#/components/schemas/MetalSymbol"
      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.889379
                updated: '2026-11-05T09:24:22Z'
                ms: 4
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fetch-multi:
    get:
      tags:
        - "currency"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: >-
        Fetch multiple target exchange rates from a single source currency in a single endpoint. 
        Returns midpoint spot rates.


        We also support metals (Gold, Silver, etc.) to multiple physical currencies. 
        e.g. XAU => USD,GBP,CHF.
        
        
        When using this endpoint with metals, each target currency and further cross-rate conversions 
        count as 1x additional API call.
      parameters:
        - name: "from"
          in: "query"
          description: "Base currency 3-letter symbol, defaults to USD. Supports physical currencies and metals."
          required: false
          allowEmptyValue: true
          schema:
            oneOf:
              - $ref: "#/components/schemas/Currency"
              - $ref: "#/components/schemas/MetalSymbol"
        - name: "to"
          in: "query"
          description: "Target physical currencies, comma separated list of 3-letter symbols"
          required: true
          schema:
            $ref: "#/components/schemas/CurrencyList"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  base:
                    $ref: "#/components/schemas/Currency"
                  updated:
                    $ref: "#/components/schemas/DateTimes"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  results:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: number
                      format: float
              example:
                base: USD
                results:
                  EUR: 0.889379
                  GBP: 0.742104
                updated: '2026-11-05T09:24:22Z'
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fetch-all:
    get:
      tags:
        - "currency"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch all available currency rates for the supplied source currency. Midpoint spot rates."
      parameters:
        - name: "from"
          in: "query"
          description: "Base currency 3-letter symbol, defaults to USD"
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/Currency"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  base:
                    $ref: "#/components/schemas/Currency"
                  updated:
                    $ref: "#/components/schemas/DateTimes"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  results:
                    type: object
                    minProperties: 130
                    additionalProperties:
                      type: number
                      format: float
              example:
                base: USD
                results:
                  AED: 3.6735
                  AFN: 65.07
                  ALL: 80.77
                  AMD: 360.12
                  ANG: 1.788
                  AOA: 913
                  ARS: 1547.47
                  AUD: 1.4266
                  AWG: 1.8099
                  AZN: 1.7
                  BAM: 1.7398
                  BBD: 2
                  BDT: 124.61
                  BGN: 1.665
                  BHD: 0.3773
                  BIF: 3001.65
                  BMD: 1
                  BND: 1.277
                  BOB: 12.08
                  BRL: 5.4632
                  BRX: 5.4775
                  BSD: 1
                  BTN: 94.5275
                  BWP: 13.3333
                  BYN: 2.99
                  BZD: 2.0177
                  CAD: 1.39502
                  CDF: 2272
                  CHF: 0.81593
                  CLF: 0.02342
                  CLP: 965.87
                  CNH: 6.66682
                  CNY: 6.6679
                  COP: 3226.4
                  COU: 7.664
                  CRC: 455.31
                  CUP: 23.9965
                  CVE: 97.98
                  CZK: 21.6032
                  DJF: 178.444
                  DKK: 6.64871
                  DOP: 59.96
                  DZD: 136.365
                  EGP: 53.8688
                  ERN: 15.15
                  ETB: 161.1
                  EUR: 0.889506
                  FJD: 2.242
                  FKP: 0.7411
                  FOK: 6.64871
                  GBP: 0.742275
                  GEL: 2.5958
                  GGP: 0.742275
                  GHS: 11.6527
                  GIP: 0.7411
                  GMD: 74.99
                  GNF: 8871
                  GTQ: 7.642
                  GYD: 209.48
                  HKD: 7.8453
                  HNL: 26.9279
                  HRK: 6.70198
                  HTG: 133.08
                  HUF: 322.937
                  HUX: 322.72
                  IDR: 18058.8
                  ILS: 3.16767
                  IMP: 0.742275
                  INR: 94.5275
                  IQD: 1512
                  IRR: 1886930
                  ISK: 121.5
                  JEP: 0.742275
                  JMD: 158.14
                  JOD: 0.709
                  JPY: 158.266
                  KES: 130
                  KGS: 87.437
                  KHR: 4073.25
                  KID: 1.4266
                  KMF: 441
                  KPW: 900
                  KRW: 1341.505
                  KWD: 0.31082
                  KYD: 0.82
                  KZT: 451.58
                  LAK: 22413
                  LBP: 89500
                  LKR: 332.43
                  LRD: 170.37
                  LSL: 16.63
                  LYD: 6.40334
                  MAD: 9.7484
                  MDL: 17.71
                  MGA: 4590
                  MKD: 54.6722
                  MMK: 2099.68
                  MNT: 3603
                  MOP: 8.0808
                  MRU: 40.58
                  MUR: 46.817
                  MVR: 15.46
                  MWK: 1733.673
                  MXN: 18.5797
                  MXV: 2.09841
                  MYR: 4.0465
                  MZN: 63.55
                  NAD: 16.362
                  NGN: 1346.325
                  NIO: 36.6243
                  NOK: 9.28482
                  NPR: 151.231
                  NZD: 1.7736
                  OMR: 0.3851
                  PAB: 1
                  PEN: 3.4443
                  PGK: 4.3802
                  PHP: 62.8635
                  PKR: 276.631
                  PLN: 3.90656
                  PYG: 6055.86
                  QAR: 3.641
                  RON: 4.7492
                  RSD: 104.607
                  RUB: 81.778
                  RWF: 1476.57
                  SAR: 3.7535
                  SBD: 8.0515
                  SCR: 14.8413
                  SDG: 600.171
                  SEK: 9.75187
                  SGD: 1.27629
                  SHP: 0.7411
                  SLE: 22.97
                  SLL: 22908
                  SOS: 571.4
                  SRD: 37.61
                  SSP: 5746.392
                  STN: 21.8
                  SVC: 8.75
                  SYP: 121.53
                  SZL: 16.3725
                  THB: 33.403
                  TJS: 9.2113
                  TMT: 3.51
                  TND: 2.974
                  TOP: 2.3753
                  TRY: 50.0447
                  TTD: 6.6722
                  TVD: 1.4266
                  TWD: 32.945
                  TZS: 2639
                  UAH: 45.4861
                  UGX: 4222.4
                  USD: 1
                  UYU: 40.308
                  UZS: 11993
                  VED: 892.656
                  VES: 892.656
                  VND: 25677
                  VUV: 119.03
                  WST: 2.7832
                  XAF: 583.52
                  XCD: 2.7
                  XCG: 1.797
                  XDR: 0.7384
                  XOF: 583.52
                  XPF: 106.1
                  YER: 236.175
                  ZAR: 16.3708
                  ZMW: 20.38
                  ZWG: 26.6251
                updated: '2026-11-05T09:23:42Z'
                ms: 14
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fetch-many-to-one:
    get:
      tags:
        - "currency"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch a set of many source currency rates to a single target currency (inverse of /fetch-multi). Midpoint spot rates. Costs one API call per pair returned."
      parameters:
        - name: "from"
          in: "query"
          description: "Source currencies, comma separated list of 3-letter symbols"
          required: true
          schema:
            $ref: "#/components/schemas/CurrencyList"
        - name: "to"
          in: "query"
          description: "Target currency 3-letter symbol, defaults to USD"
          required: true
          schema:
            $ref: "#/components/schemas/Currency"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  to:
                    $ref: "#/components/schemas/Currency"
                  updated:
                    $ref: "#/components/schemas/DateTimes"
                  calls:
                    $ref: "#/components/schemas/ApiUsage"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  from:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: number
                      format: float
              example:
                to: USD
                from:
                  JPY: 0.0063189
                  CHF: 1.2256
                  ZAR: 0.0610935
                  AUD: 0.70115
                  AED: 0.27223
                updated: '2026-11-05T09:24:22Z'
                calls: 5
                ms: 12
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fetch-matrix:
    get:
      tags:
        - "currency"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch a matrix of multiple from/to currency pairs. Midpoint spot rates. Costs one API call per pair returned."
      parameters:
        - name: "from"
          in: "query"
          description: "Source currencies, comma separated list of 3-letter symbols"
          required: true
          schema:
            $ref: "#/components/schemas/CurrencyList"
        - name: "to"
          in: "query"
          description: "Target currencies, comma separated list of 3-letter symbols"
          required: true
          schema:
            $ref: "#/components/schemas/CurrencyList"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: array
                    items:
                      $ref: "#/components/schemas/Currency"
                  to:
                    type: array
                    items:
                      $ref: "#/components/schemas/Currency"
                  matrix:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: object
                      minProperties: 1
                      additionalProperties:
                        type: number
                        format: float
                  updated:
                    $ref: "#/components/schemas/DateTimes"
                  calls:
                    $ref: "#/components/schemas/ApiUsage"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
              example:
                from:
                  - USD
                  - CHF
                  - ZAR
                  - AED
                to:
                  - USD
                  - GBP
                  - JPY
                  - CNY
                matrix:
                  USD:
                    GBP: 0.742104
                    JPY: 158.256
                    CNY: 6.6682
                    USD: 1
                  CHF:
                    USD: 1.2256
                    GBP: 0.909537
                    JPY: 193.964
                    CNY: 8.1729
                  ZAR:
                    USD: 0.0610967
                    GBP: 0.0453401
                    JPY: 9.66907
                    CNY: 0.40733
                  AED:
                    USD: 0.27223
                    GBP: 0.202074
                    JPY: 43.0919
                    CNY: 1.8153
                updated: '2026-11-05T09:24:22Z'
                calls: 16
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /convert:
    get:
      tags:
        - "currency"
        - "crypto"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Convert an amount of one currency into another currency (supports physical and digital currencies)"
      parameters:
        - name: "from"
          in: "query"
          description: "Base currency symbol (physical or digital)"
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/AnyCurrency"
        - name: "to"
          in: "query"
          description: "Target currency symbol (physical or digital)"
          required: true
          schema:
            $ref: "#/components/schemas/AnyCurrency"
        - name: "amount"
          in: "query"
          description: "Amount of source currency to convert"
          required: true
          schema:
            type: number
            format: float
            minimum: 0.01
        - name: "precision"
          in: "query"
          description: "Rounding precision for converted amount, defaults to 2 decimal places"
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 20
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  base:
                    $ref: "#/components/schemas/AnyCurrency"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  amount:
                    type: number
                    format: float
                  result:
                    type: object
                    minProperties: 2
                    maxProperties: 2
                    properties:
                      rate:
                        type: number
                        format: float
                    additionalProperties:
                      type: number
                      format: float
              example:
                base: USD
                amount: 199.5
                result:
                  EUR: 177.45
                  rate: 0.889498
                ms: 7
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /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: '2026-11-04'
                base: USD
                results:
                  AED: 3.67275
                  AFN: 65.07
                  ALL: 80.74
                  AMD: 360.12
                  ANG: 1.7875
                  AOA: 913
                  ARS: 1547.55
                  AUD: 1.4278
                  AWG: 1.8
                  AZN: 1.7
                  BAM: 1.7414
                  BBD: 2
                  BDT: 124.185
                  BGN: 1.665
                  BHD: 0.3773
                  BIF: 3001.65
                  BMD: 1
                  BND: 1.279
                  BOB: 12.075
                  BRL: 5.4601
                  BRX: 5.4775
                  BSD: 1
                  BTN: 94.308
                  BWP: 13.4228
                  BYN: 2.98
                  BZD: 2.0177
                  CAD: 1.39725
                  CDF: 2315
                  CHF: 0.81645
                  CLF: 0.0234
                  CLP: 966.5
                  CNH: 6.67435
                  CNY: 6.67355
                  COP: 3225.99
                  COU: 7.6513
                  CRC: 455.45
                  CUP: 24
                  CVE: 97.975
                  CZK: 21.61
                  DJF: 178
                  DKK: 6.65317
                  DOP: 60.45
                  DZD: 136.275
                  EGP: 54.7255
                  ERN: 15.13
                  ETB: 161.1
                  EUR: 0.8901
                  FJD: 2.25395
                  FKP: 0.7422
                  FOK: 6.65317
                  GBP: 0.74198
                  GEL: 2.597
                  GGP: 0.74198
                  GHS: 11.6527
                  GIP: 0.7422
                  GMD: 73.5
                  GNF: 8871
                  GTQ: 7.642
                  GYD: 209.48
                  HKD: 7.84485
                  HNL: 26.928
                  HTG: 133.08
                  HUF: 322.67
                  HUX: 322.72
                  IDR: 18119.2
                  ILS: 3.15651
                  IMP: 0.74198
                  INR: 94.308
                  IQD: 1512
                  IRR: 1877340
                  ISK: 121.585
                  JEP: 0.74198
                  JMD: 158.23
                  JOD: 0.7085
                  JPY: 158.36
                  KES: 129.915
                  KGS: 87.45
                  KHR: 4067
                  KID: 1.4278
                  KMF: 437.395
                  KPW: 900
                  KRW: 1341.42
                  KWD: 0.31079
                  KYD: 0.82
                  KZT: 452.405
                  LAK: 22415
                  LBP: 89500
                  LKR: 332.75
                  LRD: 170.37
                  LSL: 16.63
                  LYD: 6.40965
                  MAD: 9.7763
                  MDL: 17.83
                  MGA: 4590
                  MKD: 54.845
                  MMK: 2099.68
                  MNT: 3596
                  MOP: 8.0802
                  MRU: 40.58
                  MUR: 47.0895
                  MVR: 15.46
                  MWK: 1733.67
                  MXN: 18.612
                  MXV: 2.09841
                  MYR: 4.0634
                  MZN: 63.55
                  NAD: 16.4145
                  NGN: 1346.27
                  NIO: 36.624
                  NOK: 9.2965
                  NPR: 151.455
                  NZD: 1.7782
                  OMR: 0.3851
                  PAB: 1
                  PEN: 3.44855
                  PGK: 4.384
                  PHP: 63.3415
                  PKR: 276.49
                  PLN: 3.90472
                  PYG: 6055.86
                  QAR: 3.6405
                  RON: 4.75398
                  RSD: 104.69
                  RUB: 81.797
                  RWF: 1476.57
                  SAR: 3.7536
                  SBD: 8.0515
                  SCR: 14.8411
                  SDG: 600.17
                  SEK: 9.73271
                  SGD: 1.27883
                  SHP: 0.7422
                  SLE: 22.97
                  SLL: 22908
                  SOS: 571.4
                  SRD: 37.605
                  SSP: 5746.4
                  STN: 21.75
                  SVC: 8.75
                  SYP: 121.525
                  SZL: 16.397
                  THB: 33.615
                  TJS: 9.2093
                  TMT: 3.51
                  TND: 2.974
                  TOP: 2.3753
                  TRY: 50.037
                  TTD: 6.67215
                  TVD: 1.4278
                  TWD: 32.87
                  TZS: 2638.5
                  UAH: 45.791
                  UGX: 4222.4
                  USD: 1
                  UYU: 40.308
                  UZS: 11992.5
                  VED: 890.985
                  VES: 890.985
                  VND: 25699
                  VUV: 119.03
                  WST: 2.7832
                  XAF: 583.85
                  XCD: 2.7
                  XCG: 1.797
                  XDR: 0.7384
                  XOF: 583.85
                  XPF: 106.1
                  YER: 236.17
                  ZAR: 16.413
                  ZMW: 20.35
                  ZWG: 26.397
                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"
  /time-series:
    get:
      tags:
        - "currency"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch a time-series dataset of daily currency exchange rates for the specified interval (only daily supported currently). See our FX quote & OHLC time-series endpoints for more granular data."
      parameters:
        - 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 currency 3-letter symbol"
          required: true
          schema:
            $ref: "#/components/schemas/Currency"
        - name: "start"
          in: "query"
          description: "UTC start 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: "end"
          in: "query"
          description: "UTC end 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: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Currently only supports daily."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  start:
                    $ref: "#/components/schemas/Date"
                  end:
                    $ref: "#/components/schemas/Date"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  base:
                    $ref: "#/components/schemas/Currency"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  results:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: number
                      format: float
              example:
                start: '2026-10-29'
                end: '2026-11-04'
                interval: 'P1D'
                base: USD
                results:
                  GBP:
                    '2026-10-29': 0.74748
                    '2026-10-30': 0.74658
                    '2026-10-31': 0.74658
                    '2026-11-01': 0.74658
                    '2026-11-02': 0.74575
                    '2026-11-03': 0.7444
                    '2026-11-04': 0.74198
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /currencies:
    get:
      tags:
        - "currency"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch a list of 170+ supported currencies with symbols. Also see /crypto/currencies and /metals/list"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  currencies:
                    type: object
                    minProperties: 170
                    additionalProperties:
                      type: string
              example:
                currencies:
                  AED: United Arab Emirates Dirham
                  AFN: Afghan Afghani
                  ALL: Albanian Lek
                  AMD: Armenian Dram
                  ANG: Netherlands Antillean Guilder
                  AOA: Angolan Kwanza
                  ARS: Argentine Peso
                  AUD: Australian Dollar
                  AWG: Aruban Florin
                  AZN: Azerbaijani Manat
                  BAM: Bosnia-Herzegovina Convertible Mark
                  BBD: Barbadian Dollar
                  BDT: Bangladeshi Taka
                  BGN: Bulgarian Lev
                  BHD: Bahraini Dinar
                  BIF: Burundian Franc
                  BMD: Bermudian Dollar
                  BND: Bruneian Dollar
                  BOB: Bolivian Boliviano
                  BRL: Brazilian Real
                  BRX: Brazilian PTAX
                  BSD: Bahamian Dollar
                  BTN: Bhutanese Ngultrum
                  BWP: Botswanan Pula
                  BYN: Belarusian Ruble
                  BZD: Belizean Dollar
                  CAD: Canadian Dollar
                  CDF: Congolese Franc
                  CHF: Swiss Franc
                  CLF: Chilean Unit of Account UF
                  CLP: Chilean Peso
                  CNH: Chinese Yuan Offshore
                  CNY: Chinese Yuan
                  COP: Colombian Peso
                  COU: Unidad de Valor Real (Colombia)
                  CRC: Costa Rican Colon
                  CUP: Cuban Peso
                  CVE: Cape Verdean Escudo
                  CZK: Czech Koruna
                  DJF: Djiboutian Franc
                  DKK: Danish Krone
                  DOP: Dominican Peso
                  DZD: Algerian Dinar
                  EGP: Egyptian Pound
                  ERN: Eritrean Nakfa
                  ETB: Ethiopian Birr
                  EUR: Euro
                  FJD: Fijian Dollar
                  FKP: Falkland Islands Pound
                  FOK: Faroese Krona
                  GBP: British Pound Sterling
                  GEL: Georgian Lari
                  GGP: Guernsey Pound
                  GHS: Ghanaian Cedi
                  GIP: Gibraltar Pound
                  GMD: Gambian Dalasi
                  GNF: Guinean Franc
                  GTQ: Guatemalan Quetzal
                  GYD: Guyanese Dollar
                  HKD: Hong Kong Dollar
                  HNL: Honduran Lempira
                  HRK: Croatian Kuna
                  HTG: Haitian Gourde
                  HUF: Hungarian Forint
                  HUX: Hungarian Forint Official Rate
                  IDR: Indonesian Rupiah
                  ILS: Israeli New Sheqel
                  IMP: Manx Pound
                  INR: Indian Rupee
                  IQD: Iraqi Dinar
                  IRR: Iranian Rial
                  ISK: Icelandic Krona
                  JEP: Jersey Pound
                  JMD: Jamaican Dollar
                  JOD: Jordanian Dinar
                  JPY: Japanese Yen
                  KES: Kenyan Shilling
                  KGS: Kyrgyzstani Som
                  KHR: Cambodian Riel
                  KID: Kiribati Dollar
                  KMF: Comorian Franc
                  KPW: North Korean Won
                  KRW: South Korean Won
                  KWD: Kuwaiti Dinar
                  KYD: Caymanian Dollar
                  KZT: Kazakhstani Tenge
                  LAK: Laotian Kip
                  LBP: Lebanese Pound
                  LKR: Sri Lankan Rupee
                  LRD: Liberian Dollar
                  LSL: Lesotho Loti
                  LYD: Libyan Dinar
                  MAD: Moroccan Dirham
                  MDL: Moldovan Leu
                  MGA: Malagasy Ariary
                  MKD: Macedonian Denar
                  MMK: Myanmar Kyat
                  MNT: Mongolian Tugrik
                  MOP: Macanese Pataca
                  MRU: Mauritanian Ouguiya
                  MUR: Mauritian Rupee
                  MVR: Maldivian Rufiyaa
                  MWK: Malawian Kwacha
                  MXN: Mexican Peso
                  MXV: Mexican Unidad de Inversion
                  MYR: Malaysian Ringgit
                  MZN: Mozambican Metical
                  NAD: Namibian Dollar
                  NGN: Nigerian Naira
                  NIO: Nicaraguan Cordoba
                  NOK: Norwegian Krone
                  NPR: Nepalese Rupee
                  NZD: New Zealand Dollar
                  OMR: Omani Rial
                  PAB: Panamanian Balboa
                  PEN: Peruvian Sol
                  PGK: Papua New Guinean Kina
                  PHP: Philippine Peso
                  PKR: Pakistani Rupee
                  PLN: Polish Zloty
                  PYG: Paraguayan Guarani
                  QAR: Qatari Rial
                  RON: Romanian Leu
                  RSD: Serbian Dinar
                  RUB: Russian Ruble
                  RWF: Rwandan Franc
                  SAR: Saudi Arabian Riyal
                  SBD: Solomon Islands Dollar
                  SCR: Seychellois Rupee
                  SDG: Sudanese Pound
                  SEK: Swedish Krona
                  SGD: Singapore Dollar
                  SHP: Saint Helena Pound
                  SLE: Sierra Leonean Leone
                  SLL: Sierra Leonean Leone (pre-2022)
                  SOS: Somali Shilling
                  SRD: Surinamese Dollar
                  SSP: South Sudanese Pound
                  STN: Sao Tomean Dobra
                  SVC: Salvadoran Colon
                  SYP: Syrian Pound
                  SZL: Eswatini Lilangeni
                  THB: Thai Baht
                  TJS: Tajikistani Somoni
                  TMT: Turkmenistani Manat
                  TND: Tunisian Dinar
                  TOP: Tongan Pa'anga
                  TRY: Turkish Lira
                  TTD: Trinidad and Tobago Dollar
                  TVD: Tuvaluan Dollar
                  TWD: New Taiwan Dollar
                  TZS: Tanzanian Shilling
                  UAH: Ukrainian Hryvnia
                  UGX: Ugandan Shilling
                  USD: United States Dollar
                  UYU: Uruguayan Peso
                  UZS: Uzbekistan Som
                  VED: Venezuelan Bolivar
                  VES: Venezuelan Bolivar
                  VND: Vietnamese Dong
                  VUV: Vanuatu Vatu
                  WST: Samoan Tala
                  XAF: CFA Franc BEAC
                  XCD: East Caribbean Dollar
                  XCG: Caribbean Guilder
                  XDR: Special Drawing Rights
                  XOF: CFA Franc BCEAO
                  XPF: CFP Franc
                  YER: Yemeni Rial
                  ZAR: South African Rand
                  ZMW: Zambian Kwacha
                  ZWG: Zimbabwe Gold
                ms: 3
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /crypto/currencies:
    get:
      tags:
        - "crypto"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch a list of 500+ supported cryptocurrencies"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  currencies:
                    type: object
                    minProperties: 200
                    additionalProperties:
                      type: string
              example:
                currencies:
                  1INCH: 1inch Network
                  AAVE: Aave
                  ACA: Acala Token
                  ACH: Alchemy Pay
                  ADA: Cardano
                  AERGO: Aergo
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /crypto/pairs:
    get:
      tags:
        - "crypto"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch a list of 750+ supported cryptocurrency pairs"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  pairs:
                    type: object
                    minProperties: 750
                    additionalProperties:
                      $ref: "#/components/schemas/AnyCurrencyPair"
              example:
                pairs:
                  1INCH/BTC:
                    base: 1INCH
                    quote: BTC
                  BTC/USD:
                    base: BTC
                    quote: USD
                  ETH/BTC:
                    base: ETH
                    quote: BTC
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /crypto/fetch-prices:
    get:
      tags:
        - "crypto"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch one or more (up to 10) real-time prices for supported cryptocurrency pairs"
      parameters:
        - name: "pairs"
          in: "query"
          description: "Up to 10 target currency pairs, comma separated in XXX/YYY format"
          required: true
          schema:
            $ref: "#/components/schemas/CryptoCurrencyPairList"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  prices:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: number
                      format: float
              example:
                prices:
                  BTC/USD: 80270.27
                  ETH/BTC: 0.030039
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fx/pairs:
    get:
      tags:
        - "fx"
        - "plan-extra"
        - "plan-premium"
      description: "List approx 2,300 supported FX pairs"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  pairs:
                    type: object
                    minProperties: 2000
                    additionalProperties:
                      $ref: "#/components/schemas/AnyTradingPair"
              example:
                pairs:
                  EUR/USD:
                    base: EUR
                    quote: USD
                    alt: EURUSD
                  GBP/USD:
                    base: GBP
                    quote: USD
                    alt: GBPUSD
                  USD/GBP:
                    base: USD
                    quote: GBP
                    alt: USDGBP
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /fx/pairs/historical-limits:
    get:
      tags:
        - "fx"
        - "plan-extra"
        - "plan-premium"
      description: "FX pairs earliest available historical data point for the supplied interval (P1D default)"
      parameters:
        - name: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
        - name: "price"
          in: "query"
          description: "bid or ask. Defaults to bid."
          required: false
          schema:
            $ref: "#/components/schemas/PriceType"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  price:
                    $ref: "#/components/schemas/PriceType"
                  pairs:
                    type: object
                    minProperties: 2000
                    additionalProperties:
                      $ref: "#/components/schemas/DateTimes"
              example:
                interval: P1D
                price: bid
                pairs:
                  EURUSD: 1976-01-02T00:00:00Z
                  GBPUSD: 1970-01-02T00:00:00Z
                  USDJPY: 1975-01-02T00:00:00Z
                ms: 12
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /fx/pairs/quote-sizes:
    get:
      tags:
        - "fx"
        - "plan-extra"
        - "plan-premium"
      description: "List of FX trading pairs with non-standard quote sizes"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  sizes:
                    type: object
                    additionalProperties:
                      type: number
                      format: integer
              example:
                sizes:
                  IRRUSD: 100000,
                  VNDUSD: 10000,
                  LKRNZD: 1000,
                  DOPGBP: 100,
                ms: 12
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /fx/currencies:
    get:
      tags:
        - "fx"
        - "plan-extra"
        - "plan-premium"
      description: "List of supported trading pair currency symbols and descriptions"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  currencies:
                    type: object
                    minProperties: 150
                    additionalProperties:
                      type: string
              example:
                currencies:
                  AED: United Arab Emirates Dirham
                  AFN: Afghan Afghani
                  ALL: Albanian Lek
                  AMD: Armenian Dram
                  ANG: Dutch Guilders
                  AOA: Angolan Kwanza
                  ARS: Argentine Peso
                  AUD: Australian Dollar
                  AWG: Aruban Florin
                  AZN: Azerbaijani Manat
                  BAM: Bosnia-Herzegovina Convertible Mark
                  BBD: Barbadian Dollar
                  BDT: Bangladeshi Taka
                  BGN: Bulgarian Lev
                  BHD: Bahraini Dinar
                  BIF: Burundian Franc
                  BMD: Bermudian Dollar
                  BND: Bruneian Dollar
                  BOB: Bolivian Boliviano
                  BRL: Brazilian Real
                  BRX: Brazilian PTAX
                  BSD: Bahamian Dollar
                  BTN: Bhutanese Ngultrum
                  BWP: Botswanan Pula
                  BYN: Belarusian Ruble
                  BZD: Belizean Dollar
                  CAD: Canadian Dollar
                  CDF: Congolese Franc
                  CHF: Swiss Franc
                  CLF: Chilean Unit of Account UF
                  CLP: Chilean Peso
                  CNH: Chinese Yuan Offshore
                  CNY: Chinese Yuan
                  COP: Colombian Peso
                  COU: Unidad de Valor Real (Colombia)
                  CRC: Costa Rican Colon
                  CUP: Cuban Peso
                  CVE: Cape Verdean Escudo
                  CZK: Czech Republic Koruna
                  DJF: Djiboutian Franc
                  DKK: Danish Krone
                  DOP: Dominican Peso
                  DZD: Algerian Dinar
                  EGP: Egyptian Pound
                  ERN: Eritrean Nakfa
                  ETB: Ethiopian Birr
                  EUR: Euro
                  FJD: Fijian Dollar
                  FKP: Falkland Islands Pound
                  FOK: Faroese Krona
                  GBP: British Pound Sterling
                  GEL: Georgian Lari
                  GGP: Guernsey Pound
                  GHS: Ghanaian Cedi
                  GIP: Gibraltar Pound
                  GMD: Gambian Dalasi
                  GNF: Guinean Franc
                  GTQ: Guatemalan Quetzal
                  GYD: Guyanese Dollar
                  HKD: Hong Kong Dollar
                  HNL: Honduran Lempira
                  HRK: Croatian Kuna
                  HTG: Haitian Gourde
                  HUF: Hungarian Forint
                  HUX: Hungarian Forint Official Rate
                  IDR: Indonesian Rupiah
                  ILS: Israeli New Sheqel
                  IMP: Manx Pound
                  INR: Indian Rupee
                  IQD: Iraqi Dinar
                  IRR: Iranian Rial
                  ISK: Icelandic Krona
                  JEP: Jersey Pound
                  JMD: Jamaican Dollar
                  JOD: Jordanian Dinar
                  JPY: Japanese Yen
                  KES: Kenyan Shilling
                  KGS: Kyrgyzstani Som
                  KHR: Cambodian Riel
                  KID: Kiribati Dollar
                  KMF: Comorian Franc
                  KPW: North Korean Won
                  KRW: South Korean Won
                  KWD: Kuwaiti Dinar
                  KYD: Caymanian Dollar
                  KZT: Kazakhstani Tenge
                  LAK: Laotian Kip
                  LBP: Lebanese Pound
                  LKR: Sri Lankan Rupee
                  LRD: Liberian Dollar
                  LSL: Lesotho Maloti
                  LYD: Libyan Dinar
                  MAD: Moroccan Dirham
                  MDL: Moldovan Leu
                  MGA: Malagasy Ariary
                  MKD: Macedonian Denar
                  MMK: Myanma Kyat
                  MNT: Mongolian Tugrik
                  MOP: Macanese Pataca
                  MRU: Mauritanian Ouguiya
                  MUR: Mauritian Rupee
                  MVR: Maldivian Rufiyaa
                  MWK: Malawian Kwacha
                  MXN: Mexican Peso
                  MXV: Mexican Unidad de Inversion
                  MYR: Malaysian Ringgit
                  MZN: Mozambican Metical
                  NAD: Namibian Dollar
                  NGN: Nigerian Naira
                  NIO: Nicaraguan Cordoba
                  NOK: Norwegian Krone
                  NPR: Nepalese Rupee
                  NZD: New Zealand Dollar
                  OMR: Omani Rial
                  PAB: Panamanian Balboa
                  PEN: Peruvian Nuevo Sol
                  PGK: Papua New Guinean Kina
                  PHP: Philippine Peso
                  PKR: Pakistani Rupee
                  PLN: Polish Zloty
                  PYG: Paraguayan Guarani
                  QAR: Qatari Rial
                  RON: Romanian Leu
                  RSD: Serbian Dinar
                  RUB: Russian Ruble
                  RWF: Rwandan Franc
                  SAR: Saudi Arabian Riyal
                  SBD: Solomon Islands Dollar
                  SCR: Seychellois Rupee
                  SDG: Sudanese Pound
                  SEK: Swedish Krona
                  SGD: Singapore Dollar
                  SHP: Saint Helena Pound
                  SLL: Sierra Leonean Leone
                  SOS: Somali Shilling
                  SRD: Surinamese Dollar
                  SSP: South Sudanese Pound
                  STN: Sao Tomean Dobra
                  SVC: Salvadoran Colon
                  SYP: Syrian Pound
                  SZL: Swazi Emalangeni
                  THB: Thai Baht
                  TJS: Tajikistani Somoni
                  TMT: Turkmenistani Manat
                  TND: Tunisian Dinar
                  TOP: Tongan Pa'anga
                  TRY: Turkish Lira
                  TTD: Trinidad and Tobago Dollar
                  TVD: Tuvaluan Dollar
                  TWD: Taiwan New Dollar
                  TZS: Tanzanian Shilling
                  UAH: Ukrainian Hryvnia
                  UGX: Ugandan Shilling
                  USD: United States Dollar
                  UYU: Uruguayan Peso
                  UZS: Uzbekistan Som
                  VED: Venezuelan Bolivar
                  VES: Venezuelan Bolivar
                  VND: Vietnamese Dong
                  VUV: Ni-Vanuatu Vatu
                  WST: Samoan Tala
                  XAF: CFA Franc BEAC
                  XCD: East Caribbean Dollar
                  XDR: Special Drawing Rights
                  XOF: CFA Franc BCEAO
                  XPF: CFP Franc
                  YER: Yemeni Rial
                  ZAR: South African Rand
                  ZMW: Zambian Kwacha
                ms: 9
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /fx/quote:
    get:
      tags:
        - "fx"
        - "plan-extra"
        - "plan-premium"
      description: "Live bid & ask quote for 1 or more (up to 10 in a single request) FX trading pairs."
      parameters:
        - name: "pairs"
          in: "query"
          description: "Up to 10 target currency pairs, comma separated in XXXYYY or XXX/YYY format"
          required: true
          schema:
            $ref: "#/components/schemas/TradingPairList"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  quotes:
                    type: object
                    description: "Quotes keyed by trading pair"
                    minProperties: 1
                    additionalProperties:
                      type: object
                      properties:
                        bid:
                          $ref: "#/components/schemas/FxQuotePrice"
                        ask:
                          $ref: "#/components/schemas/FxQuotePrice"
                        tsp:
                          $ref: "#/components/schemas/TimestampMillisString"
                        size:
                          $ref: "#/components/schemas/QuoteSize"
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                example:
                  quotes:
                    EURUSD:
                      bid: "1.12422"
                      ask: "1.12424"
                      tsp: "1793870622328"
                      size: 1
                    GBPUSD:
                      bid: "1.3472"
                      ask: "1.3472"
                      tsp: "1793870622285"
                      size: 1
                    IRRUSD:
                      bid: "0.049"
                      ask: "0.057"
                      tsp: "1793870609899"
                      size: 100000
                  ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fx/quote/time-series:
    get:
      tags:
        - "fx"
        - "plan-premium"
      description: "bid/ask time-series data for a given FX trading pair and interval. Values are the closing bid/ask for the interval. Supports a range of datetime formats and timezone offsets. Datetime format in the response will try to match your request - unless specified explicitly."
      parameters:
        - name: "pair"
          in: "query"
          description: "Trading pair, such as EURUSD"
          required: true
          schema:
            $ref: "#/components/schemas/TradingPair"
        - name: "start"
          in: "query"
          description: "Time-series start. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or end."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: "end"
          in: "query"
          description: "Time-series end. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or start."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: dtmfmt
          in: "query"
          description: "Desired datetime response format. Defaults to match your request. Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC)."
          required: false
          schema:
            $ref: "#/components/schemas/DateTimeFormat"
        - name: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
        - name: "limit"
          in: "query"
          description: "Maximum number of data points to return. Default varies upon duration."
          required: false
          schema:
            type: number
            format: int32
            minimum: 1
            maximum: 100
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  pair:
                    $ref: "#/components/schemas/TradingPair"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  limit:
                    type: number
                    format: int32
                  dtmfmt:
                    $ref: "#/components/schemas/DateTimeFormat"
                  start:
                    $ref: "#/components/schemas/DateTimes"
                  end:
                    $ref: "#/components/schemas/DateTimes"
                  tzOffset:
                    type: string
                    description: "Timezone offset. e.g. +00:00 or -05:00"
                  size:
                    $ref: "#/components/schemas/QuoteSize"
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        dtm:
                          $ref: "#/components/schemas/DateTimes"
                        bid:
                          type: number
                          format: float
                        ask:
                          type: number
                          format: float
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
              example:
                pair: GBPUSD
                interval: PT1M
                limit: 10
                dtmfmt: ISO
                end: '2026-11-05T09:20:00Z'
                tzOffset: '+00:00'
                size: 1
                results:
                  - dtm: '2026-11-05T09:20:00Z'
                    bid: 1.34682
                    ask: 1.34683
                  - dtm: '2026-11-05T09:19:00Z'
                    bid: 1.34703
                    ask: 1.34704
                  - dtm: '2026-11-05T09:18:00Z'
                    bid: 1.34713
                    ask: 1.34715
                  - dtm: '2026-11-05T09:17:00Z'
                    bid: 1.34706
                    ask: 1.34713
                  - dtm: '2026-11-05T09:16:00Z'
                    bid: 1.34695
                    ask: 1.34702
                  - dtm: '2026-11-05T09:15:00Z'
                    bid: 1.34715
                    ask: 1.34721
                  - dtm: '2026-11-05T09:14:00Z'
                    bid: 1.34716
                    ask: 1.34723
                  - dtm: '2026-11-05T09:13:00Z'
                    bid: 1.34746
                    ask: 1.34749
                  - dtm: '2026-11-05T09:12:00Z'
                    bid: 1.3475
                    ask: 1.34763
                  - dtm: '2026-11-05T09:11:00Z'
                    bid: 1.3478
                    ask: 1.34784
                ms: 16
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /fx/ohlc/time-series:
    get:
      tags:
        - "fx"
        - "plan-premium"
      description: "Fetch a set of OHLC time-series data points for a given FX trading pair and interval. Values are based on the BID price. Supports a range of datetime formats and timezone offsets. Datetime format in the response will try to match your request - unless specified explicitly."
      parameters:
        - name: "pair"
          in: "query"
          description: "Trading pair, such as EURUSD"
          required: true
          schema:
            $ref: "#/components/schemas/TradingPair"
        - name: "start"
          in: "query"
          description: "Time-series start. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or end."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: "end"
          in: "query"
          description: "Time-series end. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or start."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: dtmfmt
          in: "query"
          description: "Desired datetime response format. Defaults to match your request. Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC)."
          required: false
          schema:
            $ref: "#/components/schemas/DateTimeFormat"
        - name: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
        - name: "limit"
          in: "query"
          description: "Maximum number of data points to return. Default varies upon duration."
          required: false
          schema:
            type: number
            format: int32
            minimum: 1
            maximum: 100
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  pair:
                    $ref: "#/components/schemas/TradingPair"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  limit:
                    type: number
                    format: int32
                  dtmfmt:
                    $ref: "#/components/schemas/DateTimeFormat"
                  start:
                    $ref: "#/components/schemas/DateTimes"
                  end:
                    $ref: "#/components/schemas/DateTimes"
                  tzOffset:
                    type: string
                    description: "Timezone offset. e.g. +00:00 or -05:00"
                  size:
                    $ref: "#/components/schemas/QuoteSize"
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        dtm:
                          $ref: "#/components/schemas/DateTimes"
                        o:
                          type: number
                          format: float
                        h:
                          type: number
                          format: float
                        l:
                          type: number
                          format: float
                        c:
                          type: number
                          format: float
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
              example:
                pair: EURUSD
                interval: P1D
                limit: 3
                dtmfmt: ISO
                end: '2026-11-04T00:00:00Z'
                tzOffset: '+00:00'
                size: 1
                results:
                  - dtm: '2026-11-04T00:00:00Z'
                    o: 1.12065
                    h: 1.12731
                    l: 1.11967
                    c: 1.12348
                  - dtm: '2026-11-03T00:00:00Z'
                    o: 1.11916
                    h: 1.12092
                    l: 1.11731
                    c: 1.12065
                  - dtm: '2026-11-02T00:00:00Z'
                    o: 1.11852
                    h: 1.12372
                    l: 1.11522
                    c: 1.11916
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/list:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "List the supported metals, keyed by symbol"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  metals:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: string
                      description: "Metal name"
              example:
                metals:
                  XAU: Gold
                  XAG: Silver
                  XPT: Platinum
                  XPD: Palladium
                  XAL: Aluminium
                  XCU: Copper
                  XPB: Lead
                  XNI: Nickel
                  XZN: Zinc
                ms: 11
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/units:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "List the units of mass that metal prices can be quoted in, keyed by unit handle"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  units:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      type: string
                      description: "Unit name"
              example:
                units:
                  gram: Gram
                  kilogram: Kilogram
                  metric_tonne: Metric Tonne
                  grain: Grain
                  pennyweight: Pennyweight
                  oz_t: Troy Ounce
                  lb_t: Troy Pound
                  oz_av: Ounce (Avoirdupois)
                  lb_av: Pound (Avoirdupois)
                  tael: Tael (Hong Kong)
                  baht: Baht (Thai)
                  tola: Tola
                ms: 34
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/purities:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "List the purity grades dealt in for each precious metal, finest first. Base metals are traded to a single contract grade and are not listed here."
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  purities:
                    type: object
                    description: "Purity grades keyed by metal symbol"
                    minProperties: 1
                    additionalProperties:
                      type: array
                      items:
                        $ref: "#/components/schemas/MetalPurity"
              example:
                purities:
                  XAU:
                    - code: "1000"
                      name: Pure Gold Spot
                      fineness: "1000"
                    - code: "999"
                      name: 24K
                      fineness: "999.0"
                    - code: "916"
                      name: 22K
                      fineness: "916.0"
                    - code: "750"
                      name: 18K
                      fineness: "750.0"
                  XAG:
                    - code: "1000"
                      name: Pure Silver Spot
                      fineness: "1000"
                    - code: "958.4"
                      name: Britannia
                      fineness: "958.4"
                    - code: "925"
                      name: Sterling
                      fineness: "925.0"
                ms: 9
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/instruments:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "List the tradeable metals instruments, keyed by symbol"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  source:
                    type: string
                    description: "Origin of the price data"
                  instruments:
                    type: object
                    minProperties: 1
                    additionalProperties:
                      $ref: "#/components/schemas/MetalInstrument"
              example:
                instruments:
                  XAUAUD:
                    symbol: XAUAUD
                    alt: XAU/AUD
                    metal: XAU
                    name: Gold
                    category: precious_metal
                    target: AUD
                    target_name: Australian Dollar
                    unit: oz_t
                    unit_name: Troy Ounce
                    type: spot
                    purity: "1000"
                  XCUUSD:
                    symbol: XCUUSD
                    alt: XCU/USD
                    metal: XCU
                    name: Copper
                    category: base_metal
                    grade: grade_a
                    grade_name: Grade A
                    grade_min_purity_pct: 99.9935
                    target: USD
                    target_name: United States Dollar
                    unit: metric_tonne
                    unit_name: Metric Tonne
                    type: spot
                  XAGXAU:
                    symbol: XAGXAU
                    alt: XAG/XAU
                    metal: XAG
                    name: Silver
                    category: precious_metal
                    target: XAU
                    target_name: Gold
                    type: ratio
                source: otc_aggregate
                ms: 12
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/spot:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: >-
        Spot price for a single metal, in the currency, unit of mass and purity you ask for.


        The instrument actually quoted is chosen from the metal, currency and unit
        together, and is reported as `source_instrument`. Where no instrument is quoted
        directly in the requested currency, the price is crossed via USD and `cross_rate`
        is true - this consumes an additional FX product call and widens the bid/ask gap.
      parameters:
        - name: "metal"
          in: "query"
          description: "Metal symbol, defaults to XAU"
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/MetalSymbol"
        - name: "currency"
          in: "query"
          description: "Target currency, defaults to USD"
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/Currency"
        - name: "unit"
          in: "query"
          description: "Unit of mass to price in. Defaults to oz_t for precious metals and metric_tonne for base metals."
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/MetalUnit"
        - name: "purity"
          in: "query"
          description: >-
            Purity to price at, for precious metals only - ignored for base metals. Either
            a code from /metals/purities, or any custom fineness between 0 and 1000
            exclusive of zero. Omit for the quoted (pure) price.
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/MetalPurityCode"
        - name: "verbose"
          in: "query"
          description: "Include the display-name fields in the response"
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/VerboseFlag"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/MetalSpot"
                  - type: object
                    properties:
                      ms:
                        $ref: "#/components/schemas/ResponseTime"
              examples:
                precious:
                  summary: "Gold in USD per troy ounce"
                  value:
                    bid: "4127.32"
                    ask: "4127.65"
                    mid: "4127.49"
                    spread: "0.33"
                    metal: XAU
                    currency: USD
                    unit: oz_t
                    tsp: 1793870621899
                    dtm: "2026-11-05T09:23:41Z"
                    cross_rate: false
                    source: otc_aggregate
                    source_instrument: XAUUSD
                    purity: "1000"
                    purity_name: Pure Gold Spot
                    ms: 6
                purity_and_unit:
                  summary: "18 carat gold per gram, verbose"
                  value:
                    bid: "99.52110"
                    ask: "99.52328"
                    mid: "99.52219"
                    spread: "0.00218"
                    metal: XAU
                    metal_name: Gold
                    currency: USD
                    currency_name: United States Dollar
                    unit: gram
                    unit_name: Gram
                    tsp: 1793870622144
                    dtm: "2026-11-05T09:23:42Z"
                    cross_rate: false
                    source: otc_aggregate
                    source_instrument: GAUUSD
                    purity: "750"
                    purity_name: 18K
                    ms: 7
                base_metal:
                  summary: "Copper in EUR per tonne, crossed via USD"
                  value:
                    bid: "12467.8"
                    ask: "12474.4"
                    mid: "12471.1"
                    spread: "6.6"
                    metal: XCU
                    currency: EUR
                    unit: metric_tonne
                    tsp: 1793870620879
                    dtm: "2026-11-05T09:23:40Z"
                    cross_rate: true
                    source: otc_aggregate
                    source_instrument: XCUUSD
                    grade: grade_a
                    ms: 9
        "400":
          description: "Bad Request - unknown metal, currency, unit or purity"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
        "500":
          description: "Upstream price data unavailable"
  /metals/quote:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: >-
        Latest bid/ask for up to 10 metals instruments, quoted exactly as the feed
        supplies them - no unit, purity or currency conversion is applied.


        Instruments beyond the first 10 are reported under `warnings.ignored_instruments`,
        and unrecognised ones under `warnings.invalid_instruments`. The request fails only
        if no valid instrument is supplied at all.
      parameters:
        - name: "instruments"
          in: "query"
          description: "Comma-separated list of instrument symbols, maximum 10"
          required: true
          schema:
            $ref: "#/components/schemas/MetalInstrumentList"
        - name: "verbose"
          in: "query"
          description: "Include the display-name fields in the response"
          required: false
          allowEmptyValue: true
          schema:
            $ref: "#/components/schemas/VerboseFlag"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  source:
                    type: string
                    description: "Origin of the price data"
                  quotes:
                    type: object
                    description: "Quotes keyed by instrument symbol"
                    minProperties: 1
                    maxProperties: 10
                    additionalProperties:
                      $ref: "#/components/schemas/MetalQuote"
                  warnings:
                    type: object
                    description: "Present only when some supplied instruments were not quoted"
                    properties:
                      invalid_instruments:
                        type: array
                        description: "Supplied symbols that are not recognised"
                        items:
                          type: string
                      ignored_instruments:
                        type: array
                        description: "Valid symbols dropped for exceeding the 10 instrument limit"
                        items:
                          type: string
              example:
                quotes:
                  XAUUSD:
                    bid: "4127.32"
                    ask: "4127.65"
                    mid: "4127.49"
                    spread: "0.33"
                    tsp: 1793870621899
                    dtm: "2026-11-05T09:23:41Z"
                    metal: XAU
                    target: USD
                    unit: oz_t
                    purity: "1000"
                    cross_rate: false
                  XCUUSD:
                    bid: "14016.7"
                    ask: "14023.8"
                    mid: "14020.3"
                    spread: "7.1"
                    tsp: 1793870620879
                    dtm: "2026-11-05T09:23:40Z"
                    metal: XCU
                    target: USD
                    unit: metric_tonne
                    cross_rate: false
                source: otc_aggregate
                warnings:
                  invalid_instruments:
                    - XYZUSD
                ms: 8
        "400":
          description: "Bad Request - no valid metals instruments provided"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
        "500":
          description: "Upstream price data unavailable"
  /metals/quote/time-series:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "bid/ask time-series data for a given Metals instrument and interval. Values are the closing bid/ask for the interval. Supports a range of datetime formats and timezone offsets. Datetime format in the response will try to match your request - unless specified explicitly."
      parameters:
        - name: "instrument"
          in: "query"
          description: "Metal instrument symbol, such as XAUUSD"
          required: true
          schema:
            $ref: "#/components/schemas/MetalInstrumentSymbol"
        - name: "start"
          in: "query"
          description: "Time-series start. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or end."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: "end"
          in: "query"
          description: "Time-series end. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or start."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: dtmfmt
          in: "query"
          description: "Desired datetime response format. Defaults to match your request. Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC)."
          required: false
          schema:
            $ref: "#/components/schemas/DateTimeFormat"
        - name: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
        - name: "limit"
          in: "query"
          description: "Maximum number of data points to return. Default varies upon duration."
          required: false
          schema:
            type: number
            format: int32
            minimum: 1
            maximum: 100
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  instrument:
                    $ref: "#/components/schemas/MetalInstrumentSymbol"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  limit:
                    type: number
                    format: int32
                  dtmfmt:
                    $ref: "#/components/schemas/DateTimeFormat"
                  start:
                    $ref: "#/components/schemas/DateTimes"
                  end:
                    $ref: "#/components/schemas/DateTimes"
                  tzOffset:
                    type: string
                    description: "Timezone offset. e.g. +00:00 or -05:00"
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        dtm:
                          $ref: "#/components/schemas/DateTimes"
                        bid:
                          type: number
                          format: float
                        ask:
                          type: number
                          format: float
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
              example:
                instrument: XAUUSD
                interval: PT1M
                limit: 4
                dtmfmt: ISO
                end: '2026-11-05T09:20:00Z'
                tzOffset: "+00:00"
                results:
                  - dtm: '2026-11-05T09:20:00Z'
                    bid: 4127.35
                    ask: 4127.68
                  - dtm: '2026-11-05T09:19:00Z'
                    bid: 4129.06
                    ask: 4129.35
                  - dtm: '2026-11-05T09:18:00Z'
                    bid: 4129.94
                    ask: 4130.25
                  - dtm: '2026-11-05T09:17:00Z'
                    bid: 4130.28
                    ask: 4130.47
                ms: 5
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/ohlc/time-series:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "Fetch a set of OHLC time-series data points for a given Metals instrument and interval. Values are based on the BID price. Supports a range of datetime formats and timezone offsets. Datetime format in the response will try to match your request - unless specified explicitly."
      parameters:
        - name: "instrument"
          in: "query"
          description: "Metal instrument symbol, such as XAUUSD"
          required: true
          schema:
            $ref: "#/components/schemas/MetalInstrumentSymbol"
        - name: "start"
          in: "query"
          description: "Time-series start. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or end."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: "end"
          in: "query"
          description: "Time-series end. Supported formats: YYYY-MM-DD (UTC). YYYY-MM-DD HH:MM:SS (UTC), ISO8601 with timezone offset. Timestamp in milliseconds. Supply this or start."
          required: false
          schema:
            $ref: "#/components/schemas/DateOrDateTime"
        - name: dtmfmt
          in: "query"
          description: "Desired datetime response format. Defaults to match your request. Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC)."
          required: false
          schema:
            $ref: "#/components/schemas/DateTimeFormat"
        - name: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
        - name: "limit"
          in: "query"
          description: "Maximum number of data points to return. Default varies upon duration."
          required: false
          schema:
            type: number
            format: int32
            minimum: 1
            maximum: 100
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  instrument:
                    $ref: "#/components/schemas/MetalInstrumentSymbol"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  limit:
                    type: number
                    format: int32
                  dtmfmt:
                    $ref: "#/components/schemas/DateTimeFormat"
                  start:
                    $ref: "#/components/schemas/DateTimes"
                  end:
                    $ref: "#/components/schemas/DateTimes"
                  tzOffset:
                    type: string
                    description: "Timezone offset. e.g. +00:00 or -05:00"
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        dtm:
                          $ref: "#/components/schemas/DateTimes"
                        o:
                          type: number
                          format: float
                        h:
                          type: number
                          format: float
                        l:
                          type: number
                          format: float
                        c:
                          type: number
                          format: float
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
              example:
                instrument: XAUUSD
                interval: PT1M
                limit: 4
                dtmfmt: ISO
                end: '2026-11-05T09:20:00Z'
                tzOffset: "+00:00"
                results:
                  - dtm: '2026-11-05T09:20:00Z'
                    o: 4129.07
                    h: 4130.04
                    l: 4127.32
                    c: 4127.35
                  - dtm: '2026-11-05T09:19:00Z'
                    o: 4129.9
                    h: 4130.6
                    l: 4127.98
                    c: 4129.06
                  - dtm: '2026-11-05T09:18:00Z'
                    o: 4130.39
                    h: 4131.01
                    l: 4129.92
                    c: 4129.94
                  - dtm: '2026-11-05T09:17:00Z'
                    o: 4129.97
                    h: 4131.46
                    l: 4129.25
                    c: 4130.28
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "403":
          description: "Forbidden"
        "429":
          description: "Rate limit exceeded"
  /metals/instruments/historical-limits:
    get:
      tags:
        - "metals"
        - "plan-premium"
      description: "Metals instruments earliest available historical data point for the supplied interval (P1D default)"
      parameters:
        - name: "interval"
          in: "query"
          description: "ISO8601 duration, such as P1D (daily). Defaults to P1D. Options are P1D, PT1H, PT1M."
          required: false
          schema:
            $ref: "#/components/schemas/Duration"
        - name: "price"
          in: "query"
          description: "bid or ask. Defaults to bid."
          required: false
          schema:
            $ref: "#/components/schemas/PriceType"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  interval:
                    $ref: "#/components/schemas/Duration"
                  price:
                    $ref: "#/components/schemas/PriceType"
                  pairs:
                    type: object
                    minProperties: 40
                    additionalProperties:
                      $ref: "#/components/schemas/DateTimes"
              example:
                interval: P1D
                price: bid
                pairs:
                  XAUAUD: 1995-03-26T23:00:00Z
                  XAUCAD: 1995-03-26T23:00:00Z
                  XAUCHF: 1995-03-26T23:00:00Z
                ms: 8
        "400":
          description: "Bad Request"
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
  /usage:
    get:
      tags:
        - "admin"
        - "plan-one"
        - "plan-extra"
        - "plan-premium"
      description: "Fetch recent API usage data. Includes current period start, end, usage and quota remaining"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              schema:
                type: object
                properties:
                  monthly_quota:
                    type: number
                    format: int32
                  ms:
                    $ref: "#/components/schemas/ResponseTime"
                  usage:
                    type: object
                    minProperties: 15
                    maxProperties: 15
                    additionalProperties:
                      type: number
                      format: int32
                  current_period:
                    type: object
                    properties:
                      start:
                        $ref: "#/components/schemas/Date"
                      end:
                        $ref: "#/components/schemas/Date"
                      remaining_quota:
                        type: number
                        format: int32
                      usage:
                        type: number
                        format: int32
              example:
                usage:
                  '2026-10-21': 247
                  '2026-10-22': 312
                  '2026-10-23': 23
                  '2026-10-24': 159
                  '2026-10-25': 0
                  '2026-10-26': 45
                  '2026-10-27': 92
                  '2026-10-28': 240
                  '2026-10-29': 1204
                  '2026-10-30': 34
                  '2026-10-31': 1245
                  '2026-11-01': 4
                  '2026-11-02': 0
                  '2026-11-03': 53
                  '2026-11-04': 3245
                monthly_quota: 500000
                current_period:
                  'start': '2026-10-31'
                  'end': '2026-11-30'
                  'remaining_quota': 495453
                  'usage': 4547
                ms: 3
        "401":
          description: "Not Authorized"
        "429":
          description: "Rate limit exceeded"
security:
  - api_key: []
  - apiKeyHeader: []
  - bearerAuth: []
  - basicAuth: []
components:
  schemas:
    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"
    AnyCurrency:
      type: "string"
      pattern: "[A-Z0-9]{3,6}"
      description: "Currency code for a physical or digital/cryptocurrency"
    CryptoCurrencyPairList:
      type: "string"
      pattern: "[A-Z0-9]{3,6}/[A-Z0-9]{3,6}(,[A-Z0-9]{3,6}/[A-Z0-9]{3,6})*"
      description: "A comma-separated list of crypto pairs"
    TradingPair:
      type: "string"
      pattern: "[A-Z0-9]{3,6}/?[A-Z0-9]{3,6}"
      description: "A single FX trading pair, with or without a slash"
    TradingPairList:
      type: "string"
      pattern: "[A-Z0-9]{3,6}/?[A-Z0-9]{3,6}(,[A-Z0-9]{3,6}/?[A-Z0-9]{3,6})*"
      description: "A comma-separated list of FX trading pairs"
    AnyCurrencyPair:
      type: object
      description: "Defines a currency trading pair."
      properties:
        base:
          type: string
          pattern: "[A-Z0-9]{3,6}"
          description: "Base currency in the pair"
        quote:
          type: string
          pattern: "[A-Z0-9]{3,6}"
          description: "Quote currency in the pair"
      example:
        base: USD
        quote: BTC
    AnyTradingPair:
      type: object
      description: "Defines a currency trading pair."
      properties:
        base:
          type: string
          pattern: "[A-Z0-9]{3,6}"
          description: "Base currency in the pair"
        quote:
          type: string
          pattern: "[A-Z0-9]{3,6}"
          description: "Quote currency in the pair"
        alt:
          type: string
          pattern: "[A-Z0-9]{6,8}"
          description: "Alternative trading pair identifier"
      example:
        base: EUR
        quote: USD
        alt: EURUSD
    MetalSymbol:
      type: "string"
      pattern: "X[A-Z]{2}"
      description: "Three-letter metal symbol, e.g. XAU for gold"
      example: "XAU"
    MetalUnit:
      type: "string"
      description: "Handle for a unit of mass that metal prices can be quoted in"
      enum: [gram, kilogram, metric_tonne, grain, pennyweight, oz_t, lb_t, oz_av, lb_av, tael, baht, tola]
    MetalCategory:
      type: "string"
      description: "Whether the metal is a precious or a base metal"
      enum: [precious_metal, base_metal]
    MetalInstrumentType:
      type: "string"
      description: "spot is priced in a currency, crypto in a cryptocurrency, and ratio against another metal. A ratio has no unit of mass."
      enum: [spot, crypto, ratio]
    MetalInstrumentList:
      type: "string"
      pattern: "[A-Z]{6,7}(,[A-Z]{6,7})*"
      description: "A comma-separated list of metals instrument symbols"
      example: "XAUUSD,XAGUSD"
    MetalInstrumentSymbol:
      type: "string"
      pattern: "[A-Z]{6,7}"
      description: "A single metals instrument symbol"
      example: "XAUUSD"
    MetalPurityCode:
      type: "string"
      description: "A purity code from /metals/purities (e.g. '750'), or any custom fineness in parts per thousand between 1 and 1000. A custom value is echoed back with a purity_name of 'custom'."
      example: "750"
    VerboseFlag:
      type: "string"
      description: "Truthy values are true, 1, yes and y. Anything else is treated as false."
      example: "true"
    MetalPrice:
      type: "string"
      description: "A price, as a string to preserve the significant figures of the source quote. Parse as a decimal rather than a float where precision matters."
      example: "4127.49"
    MetalQuote:
      type: object
      description: >-
        A single instrument quote, exactly as the feed supplies it. ask, mid and spread
        are absent when the feed has published no ask for the instrument.
      properties:
        bid:
          $ref: "#/components/schemas/MetalPrice"
        ask:
          $ref: "#/components/schemas/MetalPrice"
        mid:
          $ref: "#/components/schemas/MetalPrice"
        spread:
          $ref: "#/components/schemas/MetalPrice"
        tsp:
          $ref: "#/components/schemas/TimestampMillis"
        dtm:
          type: string
          description: "Quote time, formatted per the account's datetime format"
        metal:
          $ref: "#/components/schemas/MetalSymbol"
        metal_name:
          type: string
          description: "Metal name. Verbose only."
        target:
          type: string
          pattern: "[A-Z0-9]{3,6}"
          description: "What the instrument is priced against"
        target_name:
          type: string
          description: "Display name for the target. Verbose only."
        unit:
          $ref: "#/components/schemas/MetalUnit"
        unit_name:
          type: string
          description: "Display name for the unit. Verbose only, and absent for a ratio."
        purity:
          type: string
          description: "Purity code the instrument is quoted at. Precious metals only."
        cross_rate:
          type: boolean
          description: "Always false here - this endpoint applies no conversion"
      required:
        - bid
        - tsp
        - dtm
        - metal
        - target
        - cross_rate
    MetalSpot:
      type: object
      description: >-
        A spot price converted to the requested currency, unit and purity. The *_name
        fields appear only when verbose is set. grade fields appear for base metals,
        purity fields for precious metals.
      properties:
        bid:
          $ref: "#/components/schemas/MetalPrice"
        ask:
          $ref: "#/components/schemas/MetalPrice"
        mid:
          $ref: "#/components/schemas/MetalPrice"
        spread:
          $ref: "#/components/schemas/MetalPrice"
        metal:
          $ref: "#/components/schemas/MetalSymbol"
        metal_name:
          type: string
          description: "Metal name. Verbose only."
        currency:
          $ref: "#/components/schemas/Currency"
        currency_name:
          type: string
          description: "Currency name. Verbose only."
        unit:
          $ref: "#/components/schemas/MetalUnit"
        unit_name:
          type: string
          description: "Display name for the unit. Verbose only."
        tsp:
          $ref: "#/components/schemas/TimestampMillis"
        dtm:
          type: string
          description: "Quote time, formatted per the account's datetime format"
        cross_rate:
          type: boolean
          description: "True when the price was crossed via USD rather than quoted directly in the requested currency"
        source:
          type: string
          description: "Origin of the price data"
        source_instrument:
          type: string
          description: "The instrument actually quoted to build this price"
        grade:
          type: string
          description: "Deliverable contract grade. Base metals only."
        grade_name:
          type: string
          description: "Display name for the contract grade. Base metals only, verbose only."
        grade_min_purity_pct:
          type: number
          format: float
          description: "Minimum purity of the contract grade, as a percentage. Base metals only, verbose only."
        purity:
          type: string
          description: "Purity code the price is quoted at. Precious metals only."
        purity_name:
          type: string
          description: "Display name for the purity, or 'custom' for a caller-supplied fineness. Precious metals only."
      required:
        - bid
        - metal
        - currency
        - unit
        - tsp
        - dtm
        - cross_rate
        - source
        - source_instrument
    MetalPurity:
      type: object
      description: "A purity grade a metal is dealt in."
      properties:
        code:
          type: string
          description: "Identifies the grade within its metal. The fineness with any trailing zero dropped."
        name:
          type: string
          description: "Display name for the grade"
        fineness:
          type: string
          description: "Parts per thousand, as a string to preserve precision. Multiply by fineness/1000 to value an alloy."
      example:
        code: "925"
        name: Sterling
        fineness: "925.0"
    MetalInstrument:
      type: object
      description: "A tradeable metals instrument."
      properties:
        symbol:
          type: string
          pattern: "[A-Z]{6,7}"
          description: "Instrument symbol, repeating the key so the entry stands alone"
        alt:
          type: string
          description: "Slash-separated form of the symbol, split after the leading metal code"
        metal:
          $ref: "#/components/schemas/MetalSymbol"
        name:
          type: string
          description: "Metal name"
        category:
          $ref: "#/components/schemas/MetalCategory"
        grade:
          type: string
          description: "Deliverable contract grade. Base metals only."
        grade_name:
          type: string
          description: "Display name for the contract grade. Base metals only."
        grade_min_purity_pct:
          type: number
          format: float
          description: "Minimum purity of the contract grade, as a percentage. Base metals only."
        target:
          type: string
          pattern: "[A-Z0-9]{3,6}"
          description: "What the metal is priced against - a currency, a cryptocurrency, or another metal for a ratio"
        target_name:
          type: string
          description: "Display name for the target"
        unit:
          $ref: "#/components/schemas/MetalUnit"
        unit_name:
          type: string
          description: "Display name for the unit of mass"
        purity:
          type: string
          description: "Purity grade code the instrument is quoted at, as per /metals/purities. Precious metals only."
        type:
          $ref: "#/components/schemas/MetalInstrumentType"
      example:
        symbol: XAUUSD
        alt: XAU/USD
        metal: XAU
        name: Gold
        category: precious_metal
        target: USD
        target_name: United States Dollar
        unit: oz_t
        unit_name: Troy Ounce
        type: spot
        purity: "1000"
    ResponseTime:
      type: number
      format: int32
      description: "Server response time in milliseconds"
    ApiUsage:
      type: number
      format: int32
      description: "The number of API calls consumed by this request"
    TimestampMillis:
      type: number
      format: int64
      description: "Milliseconds since Jan 1 1970 (unix timestamp with millisecond precision)"
      example: 1793870621899
    FxQuotePrice:
      type: "string"
      description: >-
        A bid or ask price, serialised as a JSON string so the exact precision of the
        source quote is preserved. Parse as a decimal rather than a float where precision
        matters. Deliberately kept separate from the metals price type so the two can
        evolve independently.
      example: "1.12422"
    TimestampMillisString:
      type: string
      pattern: "[0-9]+"
      description: >-
        Milliseconds since Jan 1 1970, serialised as a JSON string. Retained as-is on
        /fx/quote so existing integrations keep working; newer endpoints emit a number
        (see TimestampMillis).
      example: "1793870622328"
    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: "2026-11-04T15:30:00-05:00"
    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"
    Date:
      type: string
      pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}"
      description: "UTC/GMT date YYYY-MM-DD"
    DateOrDateTime:
      description: "A datetime value. If no timezone offset supplied, UTC/GMT is assumed. If only a date is supplied, time is assumed to be 00:00:00 UTC."
      oneOf:
        - $ref: "#/components/schemas/Date"
        - $ref: "#/components/schemas/DateTime"
        - $ref: "#/components/schemas/IsoDateTimeZone"
        - $ref: "#/components/schemas/TimestampMillis"
    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"
    DateTimeFormat:
      description: "Can be [ISO] ISO8601 datetime including timezone offset, [TSP] UNIX Timestamp in milliseconds, or [UTCYMD] 'YYYY-MM-DD HH:MM:SS' (UTC)."
      type: string
      enum: [ISO, TSP, UTCYMD]
    Duration:
      type: string
      description: "ISO8601 Duration. https://en.wikipedia.org/wiki/ISO_8601#Durations"
    PriceType:
      type: string
      description: "bid or ask"
      enum: [bid, ask]
    QuoteSize:
      type: number
      format: int32
      description: "Size of the quote is units of the base currency/symbol. Usually 1."
  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
externalDocs:
  description: "Find out more about fastFOREX API"
  url: "https://www.fastforex.io"
x-samples-languages:
  - curl
  - node
  - ruby
  - javascript
  - python
  - php
  - go
  - java
  - swift
x-proxy-enabled: false
