Spiko Accounts API

The Accounts API from Spiko — 7 operation(s) for accounts.

OpenAPI Specification

spiko-accounts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spiko Distributor Account transactions Accounts 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: Accounts
paths:
  /v0/accounts:
    post:
      tags:
      - Accounts
      operationId: accounts.createAccount
      parameters: []
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - investorId
                - walletId
                - address
                - network
                - createdAt
                - name
                - shareClassIds
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  walletId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  address:
                    anyOf:
                    - type: string
                      title: Ethereum address
                      description: a valid Ethereum address, starting with 0x and followed by 40 hexadecimal characters e.g. "0xb794f5ea0ba39494ce839613fffba74279579268"
                    - title: StarknetAddress
                      type: string
                      description: a valid Starknet address, starting with 0x and followed by 64 hexadecimal characters e.g. "0x0000000000000000000000000000000000000000000000000000000000000000"
                    - anyOf:
                      - title: StellarAccountAddress
                        type: string
                        description: a valid Stellar account address, starting with G and followed by 55 hexadecimal characters e.g. "GBYIQXBKEB655EB3WTRITS6RR5GXEP6SQRBLPREZHNFYKT7WBMTMPR3H"
                      - title: StellarContractAddress
                        type: string
                        description: a valid Stellar contract address, starting with C and followed by 55 hexadecimal characters e.g. "CCAANR7HZNOXYZD7SXS2WQLV5BAOXSRZ7V4O43IANSB355QN2RNG7WVC"
                    - type: string
                      title: Solana address
                      description: a valid Solana address, consisting of 32 to 44 base58 characters
                    deprecated: true
                    description: Deprecated. Use the wallet API instead.
                  network:
                    type: string
                    enum:
                    - Sepolia
                    - PolygonAmoy
                    - BaseSepolia
                    - ArbitrumSepolia
                    - EtherlinkTestnet
                    - Ethereum
                    - Polygon
                    - Base
                    - Arbitrum
                    - Etherlink
                    - Starknet
                    - StarknetSepolia
                    - Stellar
                    - StellarTestnet
                    - Solana
                    - SolanaDevnet
                    description: Deprecated. Use the wallet API instead.
                    title: Network
                    deprecated: true
                  createdAt:
                    anyOf:
                    - $ref: '#/components/schemas/Date'
                    - type: 'null'
                  name:
                    anyOf:
                    - type: object
                      required:
                      - _tag
                      properties:
                        _tag:
                          type: string
                          enum:
                          - None
                      additionalProperties: false
                      description: NoneEncoded
                    - type: object
                      required:
                      - _tag
                      - value
                      properties:
                        _tag:
                          type: string
                          enum:
                          - Some
                        value:
                          $ref: '#/components/schemas/NonEmptyTrimmedString'
                      additionalProperties: false
                      description: SomeEncoded<NonEmptyTrimmedString>
                    description: OptionEncoded<NonEmptyTrimmedString>
                  shareClassIds:
                    type: array
                    items:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                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/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: Create an account for an investor
      summary: Create an account
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - investorId
              properties:
                investorId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
                name:
                  type: string
                  description: a string that will be trimmed
                shareClassIds:
                  type: array
                  items:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
              additionalProperties: false
        required: true
    get:
      tags:
      - Accounts
      operationId: accounts.getAccounts
      parameters:
      - name: investorId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - investorId
                  - walletId
                  - address
                  - network
                  - createdAt
                  - name
                  - shareClassIds
                  properties:
                    id:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    investorId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    walletId:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                    address:
                      anyOf:
                      - type: string
                        title: Ethereum address
                        description: a valid Ethereum address, starting with 0x and followed by 40 hexadecimal characters e.g. "0xb794f5ea0ba39494ce839613fffba74279579268"
                      - title: StarknetAddress
                        type: string
                        description: a valid Starknet address, starting with 0x and followed by 64 hexadecimal characters e.g. "0x0000000000000000000000000000000000000000000000000000000000000000"
                      - anyOf:
                        - title: StellarAccountAddress
                          type: string
                          description: a valid Stellar account address, starting with G and followed by 55 hexadecimal characters e.g. "GBYIQXBKEB655EB3WTRITS6RR5GXEP6SQRBLPREZHNFYKT7WBMTMPR3H"
                        - title: StellarContractAddress
                          type: string
                          description: a valid Stellar contract address, starting with C and followed by 55 hexadecimal characters e.g. "CCAANR7HZNOXYZD7SXS2WQLV5BAOXSRZ7V4O43IANSB355QN2RNG7WVC"
                      - type: string
                        title: Solana address
                        description: a valid Solana address, consisting of 32 to 44 base58 characters
                      deprecated: true
                      description: Deprecated. Use the wallet API instead.
                    network:
                      type: string
                      enum:
                      - Sepolia
                      - PolygonAmoy
                      - BaseSepolia
                      - ArbitrumSepolia
                      - EtherlinkTestnet
                      - Ethereum
                      - Polygon
                      - Base
                      - Arbitrum
                      - Etherlink
                      - Starknet
                      - StarknetSepolia
                      - Stellar
                      - StellarTestnet
                      - Solana
                      - SolanaDevnet
                      description: Deprecated. Use the wallet API instead.
                      title: Network
                      deprecated: true
                    createdAt:
                      anyOf:
                      - $ref: '#/components/schemas/Date'
                      - type: 'null'
                    name:
                      anyOf:
                      - type: object
                        required:
                        - _tag
                        properties:
                          _tag:
                            type: string
                            enum:
                            - None
                        additionalProperties: false
                        description: NoneEncoded
                      - type: object
                        required:
                        - _tag
                        - value
                        properties:
                          _tag:
                            type: string
                            enum:
                            - Some
                          value:
                            $ref: '#/components/schemas/NonEmptyTrimmedString'
                        additionalProperties: false
                        description: SomeEncoded<NonEmptyTrimmedString>
                      description: OptionEncoded<NonEmptyTrimmedString>
                    shareClassIds:
                      type: array
                      items:
                        type: string
                        description: a Universally Unique Identifier
                        format: uuid
                  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/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: Retrieve all accounts associated with a specific investor. Returns a list of accounts that can be used for deposits and withdrawals.
      summary: Get accounts of an investor
  /v0/accounts/{accountId}/lines:
    post:
      tags:
      - Accounts
      operationId: accounts.addAccountLine
      parameters:
      - name: accountId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - investorId
                - walletId
                - address
                - network
                - createdAt
                - name
                - shareClassIds
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  walletId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  address:
                    anyOf:
                    - type: string
                      title: Ethereum address
                      description: a valid Ethereum address, starting with 0x and followed by 40 hexadecimal characters e.g. "0xb794f5ea0ba39494ce839613fffba74279579268"
                    - title: StarknetAddress
                      type: string
                      description: a valid Starknet address, starting with 0x and followed by 64 hexadecimal characters e.g. "0x0000000000000000000000000000000000000000000000000000000000000000"
                    - anyOf:
                      - title: StellarAccountAddress
                        type: string
                        description: a valid Stellar account address, starting with G and followed by 55 hexadecimal characters e.g. "GBYIQXBKEB655EB3WTRITS6RR5GXEP6SQRBLPREZHNFYKT7WBMTMPR3H"
                      - title: StellarContractAddress
                        type: string
                        description: a valid Stellar contract address, starting with C and followed by 55 hexadecimal characters e.g. "CCAANR7HZNOXYZD7SXS2WQLV5BAOXSRZ7V4O43IANSB355QN2RNG7WVC"
                    - type: string
                      title: Solana address
                      description: a valid Solana address, consisting of 32 to 44 base58 characters
                    deprecated: true
                    description: Deprecated. Use the wallet API instead.
                  network:
                    type: string
                    enum:
                    - Sepolia
                    - PolygonAmoy
                    - BaseSepolia
                    - ArbitrumSepolia
                    - EtherlinkTestnet
                    - Ethereum
                    - Polygon
                    - Base
                    - Arbitrum
                    - Etherlink
                    - Starknet
                    - StarknetSepolia
                    - Stellar
                    - StellarTestnet
                    - Solana
                    - SolanaDevnet
                    description: Deprecated. Use the wallet API instead.
                    title: Network
                    deprecated: true
                  createdAt:
                    anyOf:
                    - $ref: '#/components/schemas/Date'
                    - type: 'null'
                  name:
                    anyOf:
                    - type: object
                      required:
                      - _tag
                      properties:
                        _tag:
                          type: string
                          enum:
                          - None
                      additionalProperties: false
                      description: NoneEncoded
                    - type: object
                      required:
                      - _tag
                      - value
                      properties:
                        _tag:
                          type: string
                          enum:
                          - Some
                        value:
                          $ref: '#/components/schemas/NonEmptyTrimmedString'
                      additionalProperties: false
                      description: SomeEncoded<NonEmptyTrimmedString>
                    description: OptionEncoded<NonEmptyTrimmedString>
                  shareClassIds:
                    type: array
                    items:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                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'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Unauthorized'
                - $ref: '#/components/schemas/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
        '409':
          description: Conflict
      description: Add a new line to an internal account for a given share class. This enables the investor to hold and subscribe to that share class within the account. Returns 409 if the account already has a line for the specified share class.
      summary: Add a share-class line to an account
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - shareClassId
              properties:
                shareClassId:
                  type: string
                  description: a Universally Unique Identifier
                  format: uuid
              additionalProperties: false
        required: true
  /v0/accounts/{accountId}:
    get:
      tags:
      - Accounts
      operationId: accounts.getAccount
      parameters:
      - name: accountId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - investorId
                - walletId
                - address
                - network
                - createdAt
                - name
                - shareClassIds
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  walletId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  address:
                    anyOf:
                    - type: string
                      title: Ethereum address
                      description: a valid Ethereum address, starting with 0x and followed by 40 hexadecimal characters e.g. "0xb794f5ea0ba39494ce839613fffba74279579268"
                    - title: StarknetAddress
                      type: string
                      description: a valid Starknet address, starting with 0x and followed by 64 hexadecimal characters e.g. "0x0000000000000000000000000000000000000000000000000000000000000000"
                    - anyOf:
                      - title: StellarAccountAddress
                        type: string
                        description: a valid Stellar account address, starting with G and followed by 55 hexadecimal characters e.g. "GBYIQXBKEB655EB3WTRITS6RR5GXEP6SQRBLPREZHNFYKT7WBMTMPR3H"
                      - title: StellarContractAddress
                        type: string
                        description: a valid Stellar contract address, starting with C and followed by 55 hexadecimal characters e.g. "CCAANR7HZNOXYZD7SXS2WQLV5BAOXSRZ7V4O43IANSB355QN2RNG7WVC"
                    - type: string
                      title: Solana address
                      description: a valid Solana address, consisting of 32 to 44 base58 characters
                    deprecated: true
                    description: Deprecated. Use the wallet API instead.
                  network:
                    type: string
                    enum:
                    - Sepolia
                    - PolygonAmoy
                    - BaseSepolia
                    - ArbitrumSepolia
                    - EtherlinkTestnet
                    - Ethereum
                    - Polygon
                    - Base
                    - Arbitrum
                    - Etherlink
                    - Starknet
                    - StarknetSepolia
                    - Stellar
                    - StellarTestnet
                    - Solana
                    - SolanaDevnet
                    description: Deprecated. Use the wallet API instead.
                    title: Network
                    deprecated: true
                  createdAt:
                    anyOf:
                    - $ref: '#/components/schemas/Date'
                    - type: 'null'
                  name:
                    anyOf:
                    - type: object
                      required:
                      - _tag
                      properties:
                        _tag:
                          type: string
                          enum:
                          - None
                      additionalProperties: false
                      description: NoneEncoded
                    - type: object
                      required:
                      - _tag
                      - value
                      properties:
                        _tag:
                          type: string
                          enum:
                          - Some
                        value:
                          $ref: '#/components/schemas/NonEmptyTrimmedString'
                      additionalProperties: false
                      description: SomeEncoded<NonEmptyTrimmedString>
                    description: OptionEncoded<NonEmptyTrimmedString>
                  shareClassIds:
                    type: array
                    items:
                      type: string
                      description: a Universally Unique Identifier
                      format: uuid
                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/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: NotFound
      description: Retrieve account information (including the investor who owns it) by providing the account ID.
      summary: Get account
  /v0/accounts/{accountId}/deposit-instructions:
    get:
      tags:
      - Accounts
      operationId: accounts.getDepositInstructions
      parameters:
      - name: accountId
        in: path
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: shareClassId
        in: query
        schema:
          type: string
          description: a Universally Unique Identifier
          format: uuid
        required: true
        description: a Universally Unique Identifier
      - name: subscriptionCurrency
        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"
      security:
      - basicAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - shareClassCurrency
                - accounts
                properties:
                  shareClassCurrency:
                    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"
                  accounts:
                    type: array
                    items:
                      type: object
                      required:
                      - accountDetails
                      - bankName
                      - beneficiaryName
                      - rails
                      properties:
                        accountDetails:
                          anyOf:
                          - type: object
                            required:
                            - sortCode
                            - accountNumber
                            properties:
                              sortCode:
                                type: string
                                description: a string matching the pattern ^\d{2}-\d{2}-\d{2}$
                                pattern: ^\d{2}-\d{2}-\d{2}$
                              accountNumber:
                                type: string
                                title: UK Bank Account Number
                                description: a valid UK Bank Account Number (8 digits)
                            additionalProperties: false
                          - type: object
                            required:
                            - iban
                            - bic
                            properties:
                              iban:
                                title: IBAN
                                type: string
                                description: a valid IBAN (International Bank Account Number)
                              bic:
                                title: BIC
                                type: string
                                description: A valid BIC (Bank Identifier Code)
                            additionalProperties: false
                        bankName:
                          type: string
                          enum:
                          - Memo Bank
                          - Banking Circle
                          - CACEIS
                        beneficiaryName:
                          $ref: '#/components/schemas/NonEmptyString'
                        rails:
                          type: array
                          items:
                            type: string
                            enum:
                            - SCT
                            - SCT Instant
                            - SWIFT
                            - Faster Payments
                            - CHAPS
                            - BACS
                      additionalProperties: false
                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/DistributorAuthenticationError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ForbiddenError'
                - $ref: '#/components/schemas/Forbidden'
        '404':
          description: NotFound
      description: "\n**Retrieve virtual IBAN deposit instructions for a given account, share class, and subscription currency.**\n\nReturns a list of virtual bank accounts, each with its supported payment rails. An empty list means no virtual bank account has been provisioned (feature not available).\n\nEach entry includes payment informations and supported rails:\n- `SCT` / `SCT Instant` - SEPA Credit Transfer (EUR)\n- `Faster Payments` / `CHAPS` / `BACS` - UK local transfers (GBP); also includes `gbpLocalDetails` with sort code and account number\n- `SWIFT` - international wire\n          "
      summary: Get deposit instructions
  /accounts/:
    post:
      tags:
      - Accounts
      operationId: accounts.createAccount
      parameters: []
      security:
      - basicAuth: []
      - oauth2: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - investorId
                - blockchainAccount
                - type
                - createdAt
                - name
                properties:
                  id:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  investorId:
                    type: string
                    description: a Universally Unique Identifier
                    format: uuid
                  blockchainAccount:
                    anyOf:
                    - type: object
                      required:
                      - address
                      - network
                      - permissionGroups
                      properties:
                        address:
                          type: string
                          title: Ethereum address
                          description: a valid Ethereum address, starting with 0x and followed by 40 hexadecimal characters e.g. "0xb794f5ea0ba39494ce839613fffba74279579268"
                        network:
                          $ref: '#/components/schemas/EVMNetwork'
                        p

# --- truncated at 32 KB (64 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/spiko/refs/heads/main/openapi/spiko-accounts-api-openapi.yml