Spiko Transfer Orders API

The Transfer Orders API from Spiko — 2 operation(s) for transfer orders.

OpenAPI Specification

spiko-transfer-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spiko Distributor Account transactions Transfer Orders 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: Transfer Orders
paths:
  /transfer-orders/:
    post:
      tags:
      - Transfer Orders
      operationId: transferOrders.createTransferOrder
      parameters: []
      security:
      - basicAuth: []
      - oauth2: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - fromInvestorId
                - fromAccountId
                - toInvestorId
                - toAccountId
                - shareClassId
                - amount
                - sharesAmount
                - status
                - createdAt
                - executedAt
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  fromInvestorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  fromAccountId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  toInvestorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  toAccountId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  shareClassId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  amount:
                    $ref: '#/components/schemas/Amount'
                  sharesAmount:
                    $ref: '#/components/schemas/BigDecimal'
                  status:
                    type: string
                    enum:
                    - pending
                    - executed
                    - failed
                    - canceled
                  createdAt:
                    $ref: '#/components/schemas/Date'
                  executedAt:
                    anyOf:
                    - $ref: '#/components/schemas/Date'
                    - type: 'null'
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/HttpApiDecodeError'
                - $ref: '#/components/schemas/BadRequest'
                - $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/InvestorAuthenticationError'
        '403':
          description: Forbidden
        '409':
          description: Conflict
      description: Create a transfer order between two accounts owned by the investor
      summary: Create a new transfer order
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - investorId
              - fromAccountId
              - toAccountId
              - shareClassId
              - transferAmount
              properties:
                investorId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                fromAccountId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                toAccountId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                shareClassId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                transferAmount:
                  anyOf:
                  - type: object
                    required:
                    - type
                    properties:
                      type:
                        type: string
                        enum:
                        - total
                    additionalProperties: false
                  - type: object
                    required:
                    - type
                    - sharesAmount
                    properties:
                      type:
                        type: string
                        enum:
                        - in-shares
                      sharesAmount:
                        $ref: '#/components/schemas/BigDecimal'
                    additionalProperties: false
                  - type: object
                    required:
                    - type
                    - amount
                    properties:
                      type:
                        type: string
                        enum:
                        - in-amount
                      amount:
                        $ref: '#/components/schemas/NonNegativeAmount'
                    additionalProperties: false
              additionalProperties: false
        required: true
    get:
      tags:
      - Transfer Orders
      operationId: transferOrders.getTransferOrders
      parameters:
      - name: investorId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: status
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - pending
            - executed
            - failed
            - canceled
        required: false
      security:
      - basicAuth: []
      - oauth2: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - fromInvestorId
                  - fromAccountId
                  - toInvestorId
                  - toAccountId
                  - shareClassId
                  - amount
                  - sharesAmount
                  - status
                  - createdAt
                  - executedAt
                  properties:
                    id:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    fromInvestorId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    fromAccountId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    toInvestorId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    toAccountId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    shareClassId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    amount:
                      $ref: '#/components/schemas/Amount'
                    sharesAmount:
                      $ref: '#/components/schemas/BigDecimal'
                    status:
                      type: string
                      enum:
                      - pending
                      - executed
                      - failed
                      - canceled
                    createdAt:
                      $ref: '#/components/schemas/Date'
                    executedAt:
                      anyOf:
                      - $ref: '#/components/schemas/Date'
                      - type: 'null'
                  additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/InvestorAuthenticationError'
        '403':
          description: Forbidden
        '404':
          description: NotFound
      description: '

        Get all transfer orders for a given investor with optional status filter.


        > ⚠️ **For displaying an account''s activity, prefer the [account transaction history endpoint](#tag/Account-Transactions/operation/accountTransactions.getAccountTransactions).** It returns deposits, withdrawals, transfers and yield accruals as a single time-ordered stream, with cursor pagination, so you don''t need to call multiple per-order-type endpoints and reconcile their results.

        '
      summary: Get list of an investor's transfer orders
  /transfer-orders/{transferOrderId}:
    get:
      tags:
      - Transfer Orders
      operationId: transferOrders.getTransferOrder
      parameters:
      - name: transferOrderId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      - oauth2: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - fromInvestorId
                - fromAccountId
                - toInvestorId
                - toAccountId
                - shareClassId
                - amount
                - sharesAmount
                - status
                - createdAt
                - executedAt
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  fromInvestorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  fromAccountId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  toInvestorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  toAccountId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  shareClassId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  amount:
                    $ref: '#/components/schemas/Amount'
                  sharesAmount:
                    $ref: '#/components/schemas/BigDecimal'
                  status:
                    type: string
                    enum:
                    - pending
                    - executed
                    - failed
                    - canceled
                  createdAt:
                    $ref: '#/components/schemas/Date'
                  executedAt:
                    anyOf:
                    - $ref: '#/components/schemas/Date'
                    - type: 'null'
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpApiDecodeError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/InvestorAuthenticationError'
        '403':
          description: Forbidden
        '404':
          description: NotFound
      description: Get info of a specific transfer order by its ID
      summary: Get transfer order
components:
  schemas:
    BadRequestError:
      type: object
      required:
      - reason
      - _tag
      properties:
        reason:
          type: string
        _tag:
          type: string
          enum:
          - BadRequestError
      additionalProperties: false
      description: Bad Request
    Amount:
      type: object
      required:
      - value
      - currency
      properties:
        value:
          type: string
          title: decimal number as a string
          description: a string representation of a decimal number e.g. "10000", "0.00" or "-7432092.04"
        currency:
          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"
      additionalProperties: false
    InvestorAuthenticationError:
      type: object
      required:
      - reason
      - _tag
      properties:
        reason:
          type: string
        _tag:
          type: string
          enum:
          - InvestorAuthenticationError
      additionalProperties: false
      description: Authentication Error
    BadRequest:
      $id: /schemas/void
      title: BadRequest
    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
    Unauthorized:
      $id: /schemas/void
      title: Unauthorized
    NonNegativeAmount:
      type: object
      required:
      - value
      - currency
      properties:
        value:
          type: string
          title: non-negative decimal number as a string
          description: a string representation of a non-negative decimal number e.g. "10000", "0.00" or "3420.92"
        currency:
          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"
      additionalProperties: false
      title: Non-Negative Amount
    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.