Spiko Exchange Rates API

The Exchange Rates API from Spiko — 2 operation(s) for exchange rates.

OpenAPI Specification

spiko-exchange-rates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spiko Distributor Account transactions Exchange Rates API
  version: v0
  description: The Distributor API allows third parties like SaaS providers, fintechs or Web3 companies to distribute the Spiko Funds to their customers. With this API, you can programmatically manage investors, send subscription and redemption orders, and access real-time portfolio information.
servers:
- url: https://distributor-api.spiko.io
  description: Production Server
- url: https://distributor-api.preprod.spiko.io
  description: Pre-production Server
security: []
tags:
- name: Exchange Rates
paths:
  /exchange-rates/{exchangeRateId}:
    get:
      tags:
      - Exchange Rates
      operationId: Get Exchange Rate by ID
      parameters:
      - name: exchangeRateId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - fundId
                - day
                - baseCurrency
                - quoteCurrency
                - fxRate
                - updatedAt
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  fundId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  day:
                    type: string
                    title: Day
                    description: a day in ISO format "YYYY-MM-DD"
                  baseCurrency:
                    type: string
                    enum:
                    - EUR
                    - USD
                    - GBP
                    - CHF
                    - JPY
                    - SGD
                    title: Currency code
                    identifier: CurrencyCode
                    description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
                  quoteCurrency:
                    type: string
                    enum:
                    - EUR
                    - USD
                    - GBP
                    - CHF
                    - JPY
                    - SGD
                    title: Currency code
                    identifier: CurrencyCode
                    description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
                  fxRate:
                    $ref: '#/components/schemas/BigDecimal'
                  kind:
                    type: string
                    enum:
                    - indicative
                    - execution
                  updatedAt:
                    type: string
                    title: valid range date
                    description: A valid date within the range 2020-2100
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '404':
          description: NotFound
  /exchange-rates/latest:
    get:
      tags:
      - Exchange Rates
      operationId: Get Latest Exchange Rate
      parameters:
      - name: fundId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: quoteCurrency
        in: query
        schema:
          type: string
          enum:
          - EUR
          - USD
          - GBP
          - CHF
          - JPY
          - SGD
          title: Currency code
          identifier: CurrencyCode
          description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
        required: true
        description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
      - name: baseCurrency
        in: query
        schema:
          type: string
          enum:
          - EUR
          - USD
          - GBP
          - CHF
          - JPY
          - SGD
          title: Currency code
          identifier: CurrencyCode
          description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
        required: true
        description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
      - name: latestUpdateDate
        in: query
        schema:
          $ref: '#/components/schemas/Date'
        required: false
      - name: fallbackToAnyOtherFund
        in: query
        schema:
          $ref: '#/components/schemas/BooleanFromString'
        required: false
      security: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - fundId
                - day
                - baseCurrency
                - quoteCurrency
                - fxRate
                - updatedAt
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  fundId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  day:
                    type: string
                    title: Day
                    description: a day in ISO format "YYYY-MM-DD"
                  baseCurrency:
                    type: string
                    enum:
                    - EUR
                    - USD
                    - GBP
                    - CHF
                    - JPY
                    - SGD
                    title: Currency code
                    identifier: CurrencyCode
                    description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
                  quoteCurrency:
                    type: string
                    enum:
                    - EUR
                    - USD
                    - GBP
                    - CHF
                    - JPY
                    - SGD
                    title: Currency code
                    identifier: CurrencyCode
                    description: a currency code among "EUR", "USD", "GBP", "CHF", "JPY", "SGD"
                  fxRate:
                    $ref: '#/components/schemas/BigDecimal'
                  kind:
                    type: string
                    enum:
                    - indicative
                    - execution
                  updatedAt:
                    type: string
                    title: valid range date
                    description: A valid date within the range 2020-2100
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '404':
          description: NotFound
components:
  schemas:
    HttpApiDecodeError:
      type: object
      required:
      - issues
      - message
      - _tag
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
        message:
          type: string
        _tag:
          type: string
          enum:
          - HttpApiDecodeError
      additionalProperties: false
      description: The request did not match the expected schema
    Issue:
      type: object
      required:
      - _tag
      - path
      - message
      properties:
        _tag:
          type: string
          enum:
          - Pointer
          - Unexpected
          - Missing
          - Composite
          - Refinement
          - Transformation
          - Type
          - Forbidden
          description: The tag identifying the type of parse issue
        path:
          type: array
          items:
            $ref: '#/components/schemas/PropertyKey'
          description: The path to the property where the issue occurred
        message:
          type: string
          description: A descriptive message explaining the issue
      additionalProperties: false
      description: Represents an error encountered while parsing a value to match the schema
    BooleanFromString:
      type: string
      enum:
      - 'true'
      - 'false'
      description: a string to be decoded into a boolean
    BigDecimal:
      type: string
      description: a string to be decoded into a BigDecimal
    Date:
      type: string
      description: a string to be decoded into a Date
    PropertyKey:
      anyOf:
      - type: string
      - type: number
      - type: object
        required:
        - _tag
        - key
        properties:
          _tag:
            type: string
            enum:
            - symbol
          key:
            type: string
        additionalProperties: false
        description: an object to be decoded into a globally shared symbol
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your API client_id as username and client_secret as password.