openapi: 3.0.1
info:
  title: Bitcoin Suisse API
  description: >-

    The Bitcoin Suisse API allows customers of Bitcoin Suisse to automate
    activities like trading, custody, staking and reporting using their own
    tools.


    Have a look at the [Developer Portal](https://docs.bitcoinsuisse.com/) to
    find out how to get an API key and how authentication works.
  termsOfService: https://bitcoinsuisse.com/legal
  contact:
    name: Bitcoin Suisse AG
    url: https://bitcoinsuisse.com
    email: platform@bitcoinsuisse.com
  license:
    name: Copyright © Bitcoin Suisse AG - 2026
    url: https://bitcoinsuisse.com
  version: 1.5.0
  x-logo:
    url: https://asset.brandfetch.io/idVvx7mhLV/idSQXYvM-v.png
servers:
  - url: https://api.bitcoinsuisse.com
    description: Bitcoin Suisse API
  - url: https://sandbox-api.btcsqa.net
    description: Bitcoin Suisse Sandbox API
paths:
  /custody/v1/Accounts:
    get:
      tags:
        - Accounts
      summary: List Accounts
      description: >-
        List all accounts of the customer selected using the `customer-number`
        header
      operationId: ListAccounts
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Account'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
  /custody/v1/Accounts/{accountId}:
    get:
      tags:
        - Accounts
      summary: Get Account
      description: Get a single account by its account ID
      operationId: GetAccountById
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
  /custody/v1/Accounts/OnchainInfo:
    get:
      tags:
        - Accounts
      summary: List Onchain Information
      description: >-
        List all onchain information associated with the accounts of the
        customer selected using the `customer-number` header<br><br>

        Note: the blockchain addresses provided in the API response are for
        informational purposes only. Do not deposit directly to them. For making
        deposits, please use the deposit instructions provided through your
        [Bitcoin Suisse Online
        Account](https://online.bitcoinsuisse.com/transfers/deposit)
      operationId: ListOnchainInfo
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountOnchainInfo'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
  /custody/v1/Accounts/OnchainInfo/{accountId}:
    get:
      tags:
        - Accounts
      summary: Get Onchain Information For Account
      description: >-
        Get onchain information for a single account by its account ID<br><br>

        Note: the blockchain addresses provided in the API response are for
        informational purposes only. Do not deposit directly to them. For making
        deposits, please use the deposit instructions provided through your
        [Bitcoin Suisse Online
        Account](https://online.bitcoinsuisse.com/transfers/deposit)
      operationId: GetOnchainInfo
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountOnchainInfo'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
  /custody/v1/HistoricalPortfolioValue:
    get:
      tags:
        - HistoricalPortfolioValue
      summary: Get Historical Portfolio Value
      description: Get the total portfolio value for a customer over a specified time range
      operationId: GetHistoricalPortfolioValue
      parameters:
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: to
          in: query
          schema:
            type: string
            format: date
        - name: referenceAssetSymbol
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ReferenceAssetSymbol'
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalPortfolioValue'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/Accounts:
    get:
      tags:
        - Trading Accounts
      summary: List Accounts
      description: >-
        Get (trading) account information including metadata, balances and
        reservations
      operationId: GetAccounts
      parameters:
        - name: onlyTradingAccounts
          in: query
          description: 'true: Get only trading accounts, false: Get all accounts'
          schema:
            type: boolean
            default: false
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountBalance'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/Configuration:
    get:
      tags:
        - Trading Configuration
      summary: Get Configuration
      description: Get the trading status data
      operationId: GetTradingConfiguration
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradingConfigurationResult'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/Instruments:
    get:
      tags:
        - Trading Instruments
      summary: List Instruments
      operationId: ListInstruments
      parameters:
        - name: symbols
          in: query
          description: 'Symbols to include, example: ''BTC/CHF'''
          schema:
            type: array
            items:
              type: string
        - name: baseCurrencies
          in: query
          description: 'Include instruments with certain base currencies, example: ''BTC'''
          schema:
            type: array
            items:
              type: string
        - name: quoteCurrencies
          in: query
          description: 'Include instruments with certain quote currencies, example: ''BTC'''
          schema:
            type: array
            items:
              type: string
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SecurityListEntry'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/MarketData:
    get:
      tags:
        - Market Data
      summary: Get Market Data
      description: Get top of book market data
      operationId: GetMarketData
      parameters:
        - name: symbols
          in: query
          description: 'Symbols to get market data for, example: ''BTC/CHF'''
          schema:
            type: array
            items:
              type: string
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMarketDataResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/MarketData/HistoricMarketData:
    get:
      tags:
        - Market Data
      summary: Get Historic Market Data
      description: Get market data for a point in time in the past
      operationId: GetHistoricMarketData
      parameters:
        - name: symbols
          in: query
          description: 'Symbols to get market data for, example: ''BTC/CHF'''
          required: true
          schema:
            type: array
            items:
              type: string
        - name: timestamp
          in: query
          description: >-
            The timestamp to get the market data for, must in the past but not
            before 2020
          required: true
          schema:
            type: string
            format: date-time
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetHistoricMarketDataResponse'
        '400':
          description: Bad request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/Orders:
    post:
      tags:
        - Trading Orders
      summary: Place Order
      description: Place a new order, this endpoint is used for all supported order types
      operationId: CreateTradingOrder
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrder'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrder'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrder'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrder'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionReport'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionReport'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Unavailable
          content:
            text/plain:
              schema:
                type: string
    get:
      tags:
        - Trading Orders
      summary: List Orders
      description: Get status of all orders, can be filtered using optional query params
      operationId: ListTradingOrders
      parameters:
        - name: scope
          in: query
          description: Filter for all or only open orders
          schema:
            allOf:
              - $ref: '#/components/schemas/MassStatusScope'
        - name: account
          in: query
          description: Filter by account id
          schema:
            type: string
        - name: orderTypes
          in: query
          description: Filter by order type(s)
          schema:
            type: array
            items:
              $ref: '#/components/schemas/TradeOrderType'
        - name: status
          in: query
          description: Filter by order status
          schema:
            type: array
            items:
              $ref: '#/components/schemas/OrderStatus'
        - name: symbols
          in: query
          description: 'Filter by symbols, example: ''BTC/CHF'''
          schema:
            type: array
            items:
              type: string
        - name: side
          in: query
          description: Filter by side
          schema:
            allOf:
              - $ref: '#/components/schemas/Side'
        - name: transactionTimeMin
          in: query
          description: Filter by min transaction time
          schema:
            type: string
            format: date-time
        - name: transactionTimeMax
          in: query
          description: Filter by max transaction time
          schema:
            type: string
            format: date-time
        - name: timeInForce
          in: query
          description: Filter by time in force
          schema:
            allOf:
              - $ref: '#/components/schemas/TimeInForce'
        - name: expiresTimeMin
          in: query
          description: Filter by min expiration time
          schema:
            type: string
            format: date-time
        - name: expiresTimeMax
          in: query
          description: Filter by max expiration time
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          description: 'Pagination: Page'
          schema:
            type: integer
            format: int32
            default: 1
        - name: pageSize
          in: query
          description: 'Pagination: Page size'
          schema:
            type: integer
            format: int32
            default: 50
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionReportPagedResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestError'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
    delete:
      tags:
        - Trading Orders
      summary: Cancel Order
      description: >-
        Besides the required properties, either an orderId or a clientOrderId
        must be provided to cancel an order
      operationId: CancelTradingOrder
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrderCancelRequest'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrderCancelRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrderCancelRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeOrderCancelRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionReport'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCancelReject'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/Orders/{id}:
    get:
      tags:
        - Trading Orders
      summary: Get Order
      description: >-
        Provide either an orderId or a clientOrderId to get details about the
        order
      operationId: GetTradingOrder
      parameters:
        - name: id
          in: path
          description: >-
            The Bitcoin Suisse order id (unsigned long integer) or customer's
            clientOrderId
          required: true
          schema:
            type: string
        - name: isClientOrderId
          in: query
          description: Flag, true if id is clientOrderId
          schema:
            type: boolean
            default: false
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionReport'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestError'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server error
          content:
            text/plain:
              schema:
                type: string
  /trading/api/v3/Orders/QuoteRequest:
    post:
      tags:
        - Trading Orders
      summary: Request For Quote
      description: Create a quote that is valid for a short amount of time
      operationId: CreateTradingQuote
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeQuoteRequest'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeQuoteRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeQuoteRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/TradeQuoteRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteRequestReject'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: Service Unavailable
          content:
            text/plain:
              schema:
                type: string
  /staking/v5/operatingUnits/{operatingUnit}/stakingRewardData:
    get:
      tags:
        - Public
      summary: Lists performance data
      description: >-
        Lists staking performance data from StakingRewards.com along with our
        own validator's performance.

        This endpoint requires no Authentication.
      operationId: GetStakingRewardData
      parameters:
        - name: operatingUnit
          in: path
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/OperatingUnit'
        - name: publiclyAvailableOnly
          in: query
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StakingData'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - {}
  /staking/v5/products:
    get:
      tags:
        - Staking Products
      summary: List Staking Products
      description: ''
      operationId: GetProducts
      parameters:
        - name: includeProductInformation
          in: query
          schema:
            type: boolean
            default: false
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Product'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingAccounts:
    get:
      tags:
        - Staking Accounts
      summary: List Staking Accounts
      operationId: GetStakingAccounts
      parameters:
        - name: includeOrdersInProgress
          in: query
          schema:
            type: boolean
            default: false
        - name: includeRewards
          in: query
          schema:
            type: boolean
            default: false
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StakingAccount'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingAccounts/{accountNumber}:
    get:
      tags:
        - Staking Accounts
      operationId: GetStakingAccount
      parameters:
        - name: accountNumber
          in: path
          required: true
          schema:
            pattern: ^[0-9]{12}$
            type: string
        - name: includeOrdersInProgress
          in: query
          schema:
            type: boolean
            default: false
        - name: includeRewards
          in: query
          schema:
            type: boolean
            default: false
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StakingAccount'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingAccounts/{stakingAccountNumber}:
    patch:
      tags:
        - Staking Accounts
      summary: Update Payout Account
      description: >-
        Please be aware that not all products allow you to choose a payout
        account of all account types. What is supported can be seen by
        supportedPayoutAccountTypes on the product.
      operationId: PatchStakingAccount
      parameters:
        - name: stakingAccountNumber
          in: path
          description: A 12 digit staking account number.
          required: true
          schema:
            pattern: ^[0-9]{12}$
            type: string
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdatePayoutAccountRequest'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdatePayoutAccountRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdatePayoutAccountRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdatePayoutAccountRequest'
      responses:
        '200':
          description: Success
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingOrders:
    get:
      tags:
        - Staking Orders
      summary: List Staking Orders
      description: >-
        The purpose of this endpoint is to return a status regarding the
        customer's active 

        staking orders, i.e. how much money is waiting to stake, how much is
        currently staking 

        and how much is in the process of exiting staking.
      operationId: GetStakingOrders
      parameters:
        - name: accountNumber
          in: query
          description: Filter on account number.
          schema:
            pattern: ^[0-9]{12}$
            type: string
        - name: externalReference
          in: query
          description: Filter on external reference.
          schema:
            pattern: ^[0-9A-Z]{10}$
            type: string
        - name: orderType
          in: query
          description: Filter on order type.
          schema:
            allOf:
              - $ref: '#/components/schemas/StakingOrderType'
        - name: states
          in: query
          description: Filter on order states
          schema:
            type: array
            items:
              $ref: '#/components/schemas/StakingOrderState'
        - name: page
          in: query
          description: Page.
          schema:
            type: integer
            format: int32
            default: 1
        - name: pageSize
          in: query
          description: 'Page size. Default: 10.'
          schema:
            type: integer
            format: int32
            default: 10
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StakingOrderPagedResult'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingOrders/{id}:
    put:
      tags:
        - Staking Orders
      summary: Create Staking Order
      description: ''
      operationId: PutStakingOrder
      parameters:
        - name: id
          in: path
          description: Unique identifier.
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateStakingOrder'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateStakingOrder'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateStakingOrder'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateStakingOrder'
      responses:
        '200':
          description: Success
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
    get:
      tags:
        - Staking Orders
      summary: Get Staking Order
      operationId: GetStakingOrder
      parameters:
        - name: id
          in: path
          description: Order ID or number.
          required: true
          schema:
            type: string
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StakingOrder'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingRewards:
    get:
      tags:
        - Staking Rewards
      summary: List Staking Rewards
      description: >-
        The staking account is used to calculate the reward distribution, but
        isn't 

        always the destination account. This depends on the configured payout
        account.
      operationId: GetStakingRewards
      parameters:
        - name: accountNumber
          in: query
          description: Filter on account number.
          schema:
            pattern: ^[0-9]{12}$
            type: string
        - name: payoutTimeAfterInclusive
          in: query
          description: Filter on rewards paid out after timestamp (inclusive).
          schema:
            type: string
            format: date-time
        - name: payoutTimeBeforeExclusive
          in: query
          description: Filter on rewards paid out before timestamp (exclusive).
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          description: Page.
          schema:
            type: integer
            format: int32
            default: 1
        - name: pageSize
          in: query
          description: 'Page size. Default: 10.'
          schema:
            type: integer
            format: int32
            default: 10
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardPagedResult'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /staking/v5/stakingRewards/{id}:
    get:
      tags:
        - Staking Rewards
      summary: Get Staking Reward
      operationId: GetStakingReward
      parameters:
        - name: id
          in: path
          description: External reference.
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reward'
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: []
        - Bearer: []
  /reporting/api/v1/accountordersstatement:
    post:
      tags:
        - Reports
      summary: Create Account Orders Statement
      description: Starts Orders Statement creation. Provides overview on orders.
      operationId: CreateAccountOrdersStatement
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountOrdersStatementRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/AccountOrdersStatementRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AccountOrdersStatementRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
  /reporting/api/v1/accountordersstatement/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Account Orders Statement
      description: Gets Orders Statement. Provides overview on orders.
      operationId: GetAccountOrdersStatement
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountOrdersStatementReportResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Server Error
  /reporting/api/v1/accountstatement:
    post:
      tags:
        - Reports
      summary: Create Account Statement
      description: >-
        Starts Account Statement creation. Provides overview on transactions per
        account.
      operationId: CreateAccountStatement
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountStatementRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/AccountStatementRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AccountStatementRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
  /reporting/api/v1/accountstatement/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Account Statement
      description: Gets Account Statement. Provides overview on transactions per account.
      operationId: GetAccountStatement
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountStatementReportResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Server Error
  /reporting/api/v1/balancestatement:
    post:
      tags:
        - Reports
      summary: Create Balance Statement
      description: >-
        Starts Balance Statement creation. Provides overview on balance at given
        date.
      operationId: CreateBalanceStatement
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BalanceStatementRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/BalanceStatementRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/BalanceStatementRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
  /reporting/api/v1/balancestatement/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Balance Statement
      description: Gets Balance Statement. Provides overview on balance at given date.
      operationId: GetBalanceStatement
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceStatementReportResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Server Error
  /reporting/api/v1/exchangeratesstatement:
    post:
      tags:
        - Reports
      summary: Create Exchange Rates Statement
      description: >-
        Starts Exchange Rates Statement creation. Provides overview of exchange
        rates.
      operationId: CreateExchangeRatesStatement
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExchangeRatesStatementRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ExchangeRatesStatementRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ExchangeRatesStatementRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
  /reporting/api/v1/exchangeratesstatement/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Exchange Rates Statement
      description: Gets Exchange Rates Statement. Provides overview of exchange rates.
      operationId: GetExchangeRatesStatement
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeRatesStatementReportResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Server Error
  /reporting/api/v1/guaranteestatement:
    post:
      tags:
        - Reports
      summary: Create Guarantee Statement
      description: >-
        Starts Guarantee Statement creation. Informs on funds backed by bank
        guarantee and segregated custody.
      operationId: CreateGuaranteeStatement
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuaranteeStatementRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/GuaranteeStatementRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GuaranteeStatementRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
  /reporting/api/v1/guaranteestatement/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Guarantee Statement
      description: >-
        Gets Guarantee Statement. Informs on funds backed by bank guarantee and
        segregated custody.
      operationId: GetGuaranteeStatement
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuaranteeStatementReportResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Server Error
  /reporting/api/v1/stakingrewardsstatement:
    post:
      tags:
        - Reports
      summary: Create Staking Rewards Statement
      description: >-
        Starts Staking Rewards Statement creation. Provides overview on staking
        rewards collected.
      operationId: CreateStakingRewardsStatement
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StakingRewardsStatementRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/StakingRewardsStatementRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/StakingRewardsStatementRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
  /reporting/api/v1/stakingrewardsstatement/{reportId}:
    get:
      tags:
        - Reports
      summary: Get Staking Rewards Statement
      description: >-
        Gets Staking Rewards Statement. Provides overview on staking rewards
        collected.
      operationId: GetStakingRewardsStatement
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StakingRewardsStatementReportResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Server Error
  /trading/api/account/getaccountstatement:
    post:
      tags:
        - TradingApi
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAccountStatement'
          text/json:
            schema:
              $ref: '#/components/schemas/GetAccountStatement'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GetAccountStatement'
      responses:
        '200':
          description: Success
  /trading/api/account/getaccountstatementsforclient:
    post:
      tags:
        - TradingApi
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAccountStatementsForClient'
          text/json:
            schema:
              $ref: '#/components/schemas/GetAccountStatementsForClient'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GetAccountStatementsForClient'
      responses:
        '200':
          description: Success
  /auth/api/v1/Customers:
    get:
      tags:
        - Customers
      summary: List Customers
      description: Get all customers that can be accessed by your API key
      operationId: ListCustomers
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /loans/v1/report/borrow:
    get:
      tags:
        - Loan Report
      summary: List Borrowing Reports
      description: Get list of loan reports where specified client is borrower
      operationId: GetBorrowLoanReport
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BorrowLendReport'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
  /loans/v1/report/lend:
    get:
      tags:
        - Loan Report
      summary: List Lending Reports
      description: Get list of loan reports where specified client is lender
      operationId: GetLendLoanReport
      parameters:
        - name: customer-number
          in: header
          description: >-
            Defines which customer the request is executed for. If you manage
            multiple customers, this is how you switch between them. Use the
            _Customer Management_ API endpoints to get the customer data.
            Example: 'BTCS-CUS-123456'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BorrowLendReport'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    Account:
      type: object
      properties:
        id:
          type: integer
          format: int64
        assetSymbol:
          type: string
          nullable: true
        state:
          $ref: '#/components/schemas/CustodyAccountState'
        type:
          $ref: '#/components/schemas/CustodyAccountType'
        subType:
          $ref: '#/components/schemas/CustodyAccountSubType'
        flags:
          type: array
          items:
            $ref: '#/components/schemas/CustodyAccountFlag'
          nullable: true
        balance:
          type: number
          format: decimal
        available:
          type: number
          format: decimal
        reserved:
          type: number
          format: decimal
        disposable:
          type: number
          format: decimal
        creditLine:
          type: number
          format: decimal
        name:
          type: string
          nullable: true
      additionalProperties: false
    AccountOnchainInfo:
      type: object
      properties:
        accountId:
          type: integer
          format: int64
        assetSymbol:
          type: string
          nullable: true
        balance:
          type: number
          format: decimal
        onchainInfo:
          type: array
          items:
            $ref: '#/components/schemas/OnchainInfo'
          nullable: true
      additionalProperties: false
    CustodyAccountFlag:
      enum:
        - Unknown
        - Dormant
        - CashWithdrawalsBlocked
        - CashInpaymentsBlocked
        - DebitsAndCashInpaymentBlocked
        - NotBookable
        - Blocked
        - DebitFreeze
        - CreditFreeze
        - Active
      type: string
    CustodyAccountState:
      enum:
        - Unknown
        - Active
        - Inactive
        - Closed
        - Invalid
      type: string
    CustodyAccountSubType:
      enum:
        - Unknown
        - Normal
        - Collateral
        - Advisory
        - AdvisoryPassive
      type: string
    CustodyAccountType:
      enum:
        - Unknown
        - Trading
        - Staking
        - Vault
        - VaultStaking
        - Loan
      type: string
    HistoricalPortfolioValue:
      type: object
      properties:
        referenceAssetSymbol:
          $ref: '#/components/schemas/ReferenceAssetSymbol'
        portfolioValues:
          type: array
          items:
            $ref: '#/components/schemas/PortfolioValue'
          nullable: true
      additionalProperties: false
    OnchainInfo:
      type: object
      properties:
        address:
          type: string
          nullable: true
      additionalProperties: false
    PortfolioValue:
      type: object
      properties:
        date:
          type: string
          format: date
        value:
          type: number
          format: decimal
      additionalProperties: false
    ReferenceAssetSymbol:
      enum:
        - CHF
        - USD
        - EUR
        - GBP
        - DKK
        - BTC
        - ETH
        - AED
      type: string
    AccountBalance:
      type: object
      properties:
        number:
          type: string
          nullable: true
        currency:
          type: string
          nullable: true
        balance:
          type: number
          format: decimal
        availableToTrade:
          type: number
          format: decimal
        reservedBalance:
          type: number
          format: decimal
        creditLine:
          type: number
          format: decimal
        filledButNotSettledAmount:
          type: number
          format: decimal
        state:
          allOf:
            - $ref: '#/components/schemas/AccountState'
        type:
          allOf:
            - $ref: '#/components/schemas/AccountType'
      additionalProperties: false
    AccountState:
      enum:
        - Unknown
        - Active
        - Inactive
        - Closed
        - Invalid
        - PendingDisbursement
      type: string
    AccountType:
      enum:
        - Unknown
        - Trading
        - Staking
        - Vault
      type: string
    CancelReject:
      enum:
        - Unknown
        - CancelRequest
        - ReplaceRequest
      type: string
    CommissionRule:
      type: object
      properties:
        symbol:
          type: string
          nullable: true
        orderType:
          allOf:
            - $ref: '#/components/schemas/OrderType'
        side:
          allOf:
            - $ref: '#/components/schemas/Side'
        volumeLimit:
          type: number
          format: decimal
        volumeLimitQuote:
          type: number
          format: decimal
        commissionPct:
          type: number
          format: decimal
        baseFee:
          type: number
          format: decimal
      additionalProperties: false
    DurationUnitEnum:
      enum:
        - Unknown
        - Day
        - Hour
        - Month
        - Minute
        - Week
      type: string
    ExecutionReport:
      required:
        - legs
      type: object
      properties:
        account:
          type: integer
          format: int64
        clientOrderId:
          type: string
          nullable: true
        orderId:
          type: integer
          format: int64
        quoteId:
          type: integer
          format: int64
        side:
          allOf:
            - $ref: '#/components/schemas/Side'
        orderType:
          allOf:
            - $ref: '#/components/schemas/OrderType'
        symbol:
          type: string
          nullable: true
        currency:
          type: string
          nullable: true
        quantity:
          type: number
          format: decimal
        price:
          type: number
          format: decimal
        stopPrice:
          type: number
          format: decimal
        timeInForce:
          allOf:
            - $ref: '#/components/schemas/TimeInForce'
        transactionTime:
          type: string
          format: date-time
        expireTime:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        toAccount:
          type: integer
          format: int64
        executionId:
          type: string
          nullable: true
        executionType:
          allOf:
            - $ref: '#/components/schemas/ExecutionType'
        indicativePrice:
          type: number
          format: decimal
        status:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
        lastPrice:
          type: number
          format: decimal
        lastQuantity:
          type: number
          format: decimal
        cumulativeQuantity:
          type: number
          format: decimal
        leavesQuantity:
          type: number
          format: decimal
        rejectionCode:
          type: integer
          format: int32
        text:
          type: string
          nullable: true
        availableToTrade:
          type: number
          format: decimal
        commissionCurrency:
          type: string
          nullable: true
        commission:
          type: number
          format: decimal
        settlementDate:
          type: string
          format: date-time
        venueId:
          type: integer
          format: int32
        tenor:
          allOf:
            - $ref: '#/components/schemas/Tenor'
        prosecoFuseco:
          type: boolean
        isTwap:
          type: boolean
        isCommissionIncluded:
          type: boolean
        legPrice:
          type: number
          format: decimal
        legSymbol:
          type: string
          nullable: true
        settlementAmount:
          type: number
          format: decimal
        fromAmount:
          type: number
          format: decimal
        toAmount:
          type: number
          format: decimal
        isSettled:
          type: boolean
        appliedCommissionPct:
          type: number
          format: decimal
        targetStrategy:
          allOf:
            - $ref: '#/components/schemas/TargetStrategyBtcs'
        durationUnit:
          allOf:
            - $ref: '#/components/schemas/DurationUnitEnum'
        duration:
          type: integer
          format: int32
        pegOffsetType:
          allOf:
            - $ref: '#/components/schemas/PegOffsetType'
        pegOffsetValue:
          type: integer
          format: int32
        effectiveTime:
          type: string
          format: date-time
        parentClientOrderId:
          type: integer
          format: int64
        source:
          type: integer
          format: int32
        isMinimumCommissionApplied:
          type: boolean
        legs:
          type: array
          items:
            $ref: '#/components/schemas/Leg'
      additionalProperties: false
    ExecutionReportPagedResult:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionReport'
          nullable: true
        count:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    ExecutionType:
      enum:
        - Unknown
        - New
        - Cancelled
        - Replaced
        - PendingCancel
        - Rejected
        - Expired
        - Trade
        - Void
        - OrderStatus
      type: string
    GetHistoricMarketDataResponse:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        entries:
          type: array
          items:
            $ref: '#/components/schemas/HistoricMarketDataEntry'
          nullable: true
      additionalProperties: false
    GetMarketDataResponse:
      type: object
      properties:
        marketDataList:
          type: array
          items:
            $ref: '#/components/schemas/MarketDataListing'
          nullable: true
      additionalProperties: false
    HistoricMarketDataEntry:
      type: object
      properties:
        symbol:
          type: string
          nullable: true
        last:
          type: number
          format: decimal
        ask:
          type: number
          format: decimal
        bid:
          type: number
          format: decimal
      additionalProperties: false
    InstrumentClassificationEnum:
      enum:
        - Unknown
        - FiatFiat
        - CryptoFiat
        - CryptoCrypto
      type: string
    InstrumentOrderTypeLimits:
      type: object
      properties:
        orderType:
          allOf:
            - $ref: '#/components/schemas/OrderType'
        timeInForce:
          allOf:
            - $ref: '#/components/schemas/TimeInForce'
        minOrderSize:
          type: number
          format: decimal
        maxOrderSize:
          type: number
          format: decimal
        minOrderSizeQuote:
          type: number
          format: decimal
        maxOrderSizeQuote:
          type: number
          format: decimal
      additionalProperties: false
    Leg:
      type: object
      properties:
        symbol:
          type: string
          nullable: true
        side:
          allOf:
            - $ref: '#/components/schemas/Side'
        isFiatToFiat:
          type: boolean
        rate:
          type: number
          format: decimal
        baseQuantity:
          type: number
          format: decimal
        venue:
          type: string
          nullable: true
      additionalProperties: false
    MarketDataListing:
      type: object
      properties:
        symbol:
          type: string
          nullable: true
        bidPrice:
          type: number
          format: decimal
        askPrice:
          type: number
          format: decimal
      additionalProperties: false
    MassStatusScope:
      enum:
        - All
        - Open
      type: string
    MessageType:
      enum:
        - Unknown
        - GenericError
        - ExecutionReport
        - MarketDataRequest
        - MarketDataRequestReject
        - MarketDataRefreshSubscription
        - OrderMassStatusRequest
        - NewOrder
        - OrderCancelReject
        - OrderCancelReplaceRequest
        - OrderCancelRequest
        - OrderStatusRequest
        - Quote
        - QuoteRequest
        - QuoteRequestReject
        - SecurityList
        - UnsubscribeAllMarketData
        - CallbackRegister
        - Instrument
        - TimedEvent
        - InstrumentsBegin
        - InstrumentsEnd
      type: string
    OrderCancelReject:
      type: object
      properties:
        messageType:
          allOf:
            - $ref: '#/components/schemas/MessageType'
        cancelRequestId:
          type: string
          nullable: true
        originalClientOrderId:
          type: string
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
        rejectionCode:
          type: integer
          format: int32
        rejectionText:
          type: string
          nullable: true
        rejectResponseTo:
          allOf:
            - $ref: '#/components/schemas/CancelReject'
      additionalProperties: false
    OrderStatus:
      enum:
        - Unknown
        - New
        - PartiallyFilled
        - Filled
        - Cancelled
        - PendingCancel
        - Rejected
        - PendingNew
        - Expired
        - Draft
        - Error
        - Submitted
        - Void
        - Cancelling
        - CancelError
      type: string
    OrderType:
      enum:
        - Unknown
        - Market
        - Limit
        - Stop
        - StopLimit
        - PreviouslyQuoted
        - BestExecution
      type: string
    PegOffsetType:
      enum:
        - None
        - BasisPoints
      type: string
    Quote:
      type: object
      properties:
        messageType:
          allOf:
            - $ref: '#/components/schemas/MessageType'
        quoteRequestId:
          type: string
          nullable: true
        quoteId:
          type: integer
          format: int64
        expireTime:
          type: string
          format: date-time
        symbol:
          type: string
          nullable: true
        currency:
          type: string
          nullable: true
        quantity:
          type: number
          format: decimal
        bidPrice:
          type: number
          format: decimal
        askPrice:
          type: number
          format: decimal
        commission:
          type: number
          format: decimal
        commissionCurrency:
          type: string
          nullable: true
        transactionTime:
          type: string
          format: date-time
        fromAmount:
          type: number
          format: decimal
        toAmount:
          type: number
          format: decimal
        settlementAmount:
          type: number
          format: decimal
        isMinimumCommissionApplied:
          type: boolean
      additionalProperties: false
    QuoteRequestReject:
      type: object
      properties:
        messageType:
          allOf:
            - $ref: '#/components/schemas/MessageType'
        quoteRequestId:
          type: string
          nullable: true
        rejectionCode:
          type: integer
          format: int32
        text:
          type: string
          nullable: true
      additionalProperties: false
    RequestError:
      type: object
      properties:
        code:
          type: integer
          format: int32
        text:
          type: string
          nullable: true
      additionalProperties: false
    SecurityListEntry:
      type: object
      properties:
        symbol:
          type: string
          nullable: true
        minBaseIncrement:
          type: number
          format: decimal
        minQuoteIncrement:
          type: number
          format: decimal
        minPriceIncrement:
          type: number
          format: decimal
        orderTypeLimits:
          type: array
          items:
            $ref: '#/components/schemas/InstrumentOrderTypeLimits'
          nullable: true
        basePrecision:
          type: integer
          format: int32
        quotePrecision:
          type: integer
          format: int32
        pricePrecision:
          type: integer
          format: int32
        commissions:
          type: object
          properties:
            Unknown:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
            Market:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
            Limit:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
            Stop:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
            StopLimit:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
            PreviouslyQuoted:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
            BestExecution:
              type: object
              properties:
                Unknown:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Buy:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
                Sell:
                  type: array
                  items:
                    $ref: '#/components/schemas/CommissionRule'
              additionalProperties: false
          additionalProperties: false
          nullable: true
        commissionCurrency:
          type: string
          nullable: true
        commissionPrecision:
          type: integer
          format: int32
        classification:
          allOf:
            - $ref: '#/components/schemas/InstrumentClassificationEnum'
        externallyTradeable:
          type: boolean
        internallyTradeable:
          type: boolean
        isTradingEnabledBuy:
          type: boolean
        isTradingEnabledSell:
          type: boolean
        isLimitOrderEnabled:
          type: boolean
        hasError:
          type: boolean
        isSynthetic:
          type: boolean
        routingSymbols:
          type: array
          items:
            type: string
          nullable: true
        principalLimitOrderMaxSize:
          type: number
          format: decimal
        principalLimitOrderMaxSizeQuote:
          type: number
          format: decimal
        agentLimitOrderMaxSize:
          type: number
          format: decimal
        agentLimitOrderMaxSizeQuote:
          type: number
          format: decimal
      additionalProperties: false
    Side:
      enum:
        - Unknown
        - Buy
        - Sell
      type: string
    TargetStrategyBtcs:
      enum:
        - None
        - Smart
        - TWAP
        - Scheduled
        - DCA
      type: string
    Tenor:
      enum:
        - Unknown
        - Spot
        - Instantly
      type: string
    TimeInForce:
      enum:
        - Unknown
        - GoodTillCancel
        - ImmediateOrCancel
        - FillOrKill
        - GoodTilDate
      type: string
    TradeOrder:
      required:
        - currency
        - fromAccount
        - orderType
        - quantity
        - side
        - symbol
        - timeInForce
        - transactionTime
      type: object
      properties:
        symbol:
          minLength: 1
          type: string
          description: 'The instrument symbol, example: ''BTC/CHF'''
        currency:
          minLength: 1
          type: string
          description: 'The currency to trade, example: ''BTC'''
        transactionTime:
          type: string
          description: >-
            Current timestamp (UTC), if the timestamp is too old when the
            request reaches the server, the order is rejected
          format: date-time
        orderType:
          allOf:
            - $ref: '#/components/schemas/TradeOrderType'
        timeInForce:
          allOf:
            - $ref: '#/components/schemas/TradeTimeInForce'
        fromAccount:
          type: integer
          description: The account id to be debited
          format: int64
        clientOrderId:
          type: string
          description: >-
            A custom id for this order, can be used to get or cancel the order
            after creation. Must be unique for each order.
          nullable: true
        quoteId:
          type: integer
          description: >-
            Provide a quote id to execute a quote that was created using the
            quote request endpoint, required for OrderType 'PreviouslyQuoted'
          format: int64
        side:
          allOf:
            - $ref: '#/components/schemas/TradeSide'
          description: The direction of the trade, related to the Symbol
        quantity:
          type: number
          description: The amount to trade in the provided Currency
          format: decimal
        limitPrice:
          type: number
          description: Required for OrderType 'Limit'
          format: decimal
        stopPrice:
          type: number
          description: Required for OrderType 'Stop'
          format: decimal
        expireTime:
          type: string
          description: >-
            The timestamp when the order is automatically cancelled (UTC), only
            applicable for TimeInForce 'GoodTillCancel'
          format: date-time
        toAccount:
          type: integer
          description: >-
            The account where the proceeds of the trade will be booked to,
            automatically determined if not provided
          format: int64
        isCommissionIncluded:
          type: boolean
          description: >-
            Set to 'true' to deduct the trading fees from the Quantity,
            otherwise the fees are added on top
        targetStrategy:
          allOf:
            - $ref: '#/components/schemas/TradeTargetStrategy'
          description: Required for OrderType 'Market' and TimeInForce 'GoodTillCancel'
      additionalProperties: false
    TradeOrderCancelRequest:
      required:
        - account
        - transactionTime
      type: object
      properties:
        account:
          type: integer
          description: The account id of the traded currency of the order to cancel
          format: int64
        clientOrderId:
          type: string
          description: The custom defined client order id
          nullable: true
        orderId:
          type: integer
          description: The Bitcoin Suisse order id
          format: int64
        cancelRequestId:
          type: string
          description: >-
            A custom id for this request, can be used for tracing purposes in
            case of rejection
          nullable: true
        transactionTime:
          type: string
          description: >-
            Current timestamp (UTC), if the timestamp is too old when the
            request reaches the server, it is rejected
          format: date-time
      additionalProperties: false
    TradeOrderType:
      enum:
        - Market
        - Limit
        - Stop
        - PreviouslyQuoted
      type: string
    TradeQuoteRequest:
      required:
        - account
        - currency
        - isCommissionIncluded
        - quantity
        - quoteRequestId
        - symbol
      type: object
      properties:
        account:
          type: integer
          description: The account id of the traded currency
          format: int64
        quoteRequestId:
          minLength: 1
          type: string
        symbol:
          minLength: 1
          type: string
          description: 'The instrument symbol, example: ''BTC/CHF'''
        currency:
          minLength: 1
          type: string
          description: 'The currency to trade, example: ''BTC'''
        quantity:
          type: number
          description: The amount to trade in the provided Currency
          format: decimal
        side:
          type: string
          allOf:
            - $ref: '#/components/schemas/TradeSide'
          description: The direction of the trade, related to the Symbol
          nullable: true
        isCommissionIncluded:
          type: boolean
          description: >-
            Set to true if the fee should already be deducted from the quoted
            amount, otherwise added on top
      additionalProperties: false
    TradeSide:
      enum:
        - Buy
        - Sell
      type: string
    TradeTargetStrategy:
      enum:
        - None
        - Smart
      type: string
    TradeTimeInForce:
      enum:
        - GoodTillCancel
        - FillOrKill
      type: string
    TradingConfigurationResult:
      type: object
      properties:
        isTradingEnabled:
          type: boolean
        limitOrderMaxPriceDeviationPct:
          type: number
          format: decimal
      additionalProperties: false
    AggregatedStakingPerformanceData:
      type: object
      properties:
        latestAnnualPercentageYield:
          type: number
          format: decimal
          nullable: true
        annualPercentageYieldOverride:
          type: number
          format: decimal
          nullable: true
        lastWeeksAnnualPercentageYield:
          type: number
          format: decimal
          nullable: true
        lastMonthsAnnualPercentageYield:
          type: number
          format: decimal
          nullable: true
        lastQuartersAnnualPercentageYield:
          type: number
          format: decimal
          nullable: true
        lastHalfYearsAnnualPercentageYield:
          type: number
          format: decimal
          nullable: true
        lastYearsAnnualPercentageYield:
          type: number
          format: decimal
          nullable: true
      additionalProperties: false
    CreateStakingOrder:
      type: object
      properties:
        fromAccountNumber:
          pattern: ^[0-9]{12}$
          type: string
          description: Account that is debited.
        toAccountNumber:
          pattern: ^[0-9]{12}$
          type: string
          description: Account that is credited.
          nullable: true
        productId:
          type: string
          description: >-
            Id of product to stake for. Required if ToAccountNumber is null. 

            If ToAccountNumber is set, it uses the product of the staking
            account 

            - in that case ProductId cannot be input.
          format: uuid
          nullable: true
        amount:
          type: number
          description: Amount to move from debit to credit account.
          format: decimal
        externalReference:
          maxLength: 50
          pattern: ^[0-9A-Z]{10}$
          type: string
          description: >-
            External reference (not unique, not required) to allow the source
            system

            to correlate external events within the Staking system.
          nullable: true
      additionalProperties: false
    OperatingUnit:
      enum:
        - UNKNOWN
        - CH
        - LI
        - AE
      type: string
    OrderDetails:
      type: object
      properties:
        entriesInProgress:
          type: object
          allOf:
            - $ref: '#/components/schemas/StakingOrderAggregation'
          description: Aggregation of entry orders in progress.
          nullable: true
        exitsInProgress:
          type: object
          allOf:
            - $ref: '#/components/schemas/StakingOrderAggregation'
          description: Aggregation of entry orders in progress.
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errorCode:
          type: integer
          format: int32
        traceId:
          type: string
          nullable: true
      additionalProperties: false
    Product:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier.
          format: uuid
        name:
          type: string
          description: User-friendly name.
        publiclyAvailable:
          type: boolean
          description: True if the product is Publicly available for all customers.
        stakingAccountAssetSymbol:
          type: string
          description: >-
            Required asset symbol on a staking account used for staking order or
            reward account.
        tradingAccountAssetSymbol:
          type: string
          description: >-
            Required asset symbol on a trading account used for staking order or
            reward account.
        payoutAssetSymbol:
          type: string
          description: Asset symbol used for payouts.
        supportedPayoutAccountTypes:
          type: array
          items:
            $ref: '#/components/schemas/AccountType'
          description: >-
            The types of payout accounts that can be chosen if staking on this
            product.
        minimumStakingAccountBalance:
          type: number
          description: >-
            If not empty, new staking account balance must be 0 or at least this
            minimum amount.
          format: decimal
          nullable: true
        minimumStakingAccountBalanceChf:
          type: number
          description: >-
            If not empty, new staking account balance in CHF must be 0 or at
            least this minimum amount.
          format: decimal
          nullable: true
        minimumStakingAccountBalanceMultiplier:
          type: number
          description: >-
            If not empty, new staking account balance must be a multiple of this
            amount.
          format: decimal
          nullable: true
        minimumEntryStakingOrderAmount:
          type: number
          description: >-
            If not empty, an entry order amount must be at least this minimum
            amount.
          format: decimal
          nullable: true
        minimumEntryStakingOrderAmountChf:
          type: number
          description: >-
            If not empty, anentry order amount in CHF must be at least this
            minimum amount.
          format: decimal
          nullable: true
        minimumExitStakingOrderAmount:
          type: number
          description: >-
            If not empty, an exit order amount must be at least this minimum
            amount.
          format: decimal
          nullable: true
        minimumExitStakingOrderAmountChf:
          type: number
          description: >-
            If not empty, an exit order amount in CHF must be at least this
            minimum amount.
          format: decimal
          nullable: true
        maximumEntryStakingOrderAmount:
          type: number
          description: If set, the maximum entry size of an order.
          format: decimal
          nullable: true
        maximumExitStakingOrderAmount:
          type: number
          description: If set, the maximum exit size of an order.
          format: decimal
          nullable: true
        entryOrdersDisabled:
          type: boolean
          description: >-
            If set, it is not possible to place entries orders at all. 

            If online is used, the client is informed in Online that entries are
            no longer offered (not even via a Relationship Manager)
        entryOrdersViaRmOnly:
          type: boolean
          description: >-
            If set, it is only possible to place entry orders via a Relationship
            Manager.

            If online is used, the client is informed in online that the
            Relationship Manager must be contacted for entries.
        exitOrdersViaRmOnly:
          type: boolean
          description: >-
            If set, it is only possible to place exit orders via a Relationship
            Manager.

            If Online is used, the client is informed in online that the
            Relationship Manager must be contacted for exits.
        productInformation:
          type: object
          allOf:
            - $ref: '#/components/schemas/ProductInformationDto'
          description: Product information such as reward and locking times.
          nullable: true
      additionalProperties: false
    ProductInformationDto:
      type: object
      properties:
        expectedTimeToNextPayout:
          type: string
          description: Expected timestamp of the next payout.
          format: time-span
          nullable: true
        nextPayoutStatus:
          type: string
          allOf:
            - $ref: '#/components/schemas/RewardPeriodStatus'
          description: Status of the next reward payout.
          nullable: true
        expectedPayoutDelay:
          type: string
          description: The delay for reward payouts if a client exits Staking.
          format: time-span
        expectedPayoutFrequency:
          type: string
          description: The expected frequency of reward payouts.
          format: time-span
        historicPayoutFrequency:
          type: string
          description: >-
            The last frequency of reward payouts. Should closely match 'Expected
            Payout Frequency'.
          format: time-span
          nullable: true
        entranceNoRewardsPeriod:
          type: string
          description: >-
            The time it takes before a client's funds generate rewards after
            entering Staking.
          format: time-span
        entranceExpectedStartEarning:
          type: string
          description: >-
            The time a client's funds are expected to start generating rewards
            after entering Staking.
          format: date-time
          nullable: true
        entranceExpectedFirstPayout:
          type: string
          description: >-
            The time a client is expected to receive the first payout after
            entering Staking.
          format: date-time
          nullable: true
        entranceLockedPeriod:
          type: string
          description: The time a client's funds are locked after entering Staking.
          format: time-span
        entranceExpectedUnlockTime:
          type: string
          description: >-
            The time a client's funds are expected to unlock after entering
            Staking.
          format: date-time
        rewardsLockedPeriod:
          type: string
          description: The time validator rewards are locked after exiting Staking.
          format: time-span
        exitRewardsPeriod:
          type: string
          description: >-
            The time a client's funds keep earning rewards after exiting
            Staking.
          format: time-span
        exitExpectedEndEarning:
          type: string
          description: >-
            The time a client's funds are expected to stop generating rewards
            after exiting Staking.
          format: date-time
          nullable: true
        exitExpectedLastPayout:
          type: string
          description: >-
            The time a client is expected to receive the last payout after
            exiting Staking.
          format: date-time
          nullable: true
        exitLockedPeriod:
          type: string
          description: The time a client's funds are locked after exiting Staking.
          format: time-span
        exitExpectedUnlockTime:
          type: string
          description: >-
            The time a client's funds are expected to unlock after exiting
            Staking.
          format: date-time
      additionalProperties: false
    Reward:
      type: object
      properties:
        id:
          type: string
          description: >-
            Can be found as an external reference for Reward in other systems.

            N.B. Commission bookings are a different transaction, with a
            different external reference.
          format: uuid
        targetAccountNumber:
          type: string
          description: Account that the rewards were paid out to.
        stakingAccountNumber:
          type: string
          description: Staking account that earned the rewards.
        amount:
          type: number
          description: Gross amount of rewards paid out.
          format: decimal
        assetSymbol:
          type: string
          description: Asset Symbol for rewards.
        commissionPercentage:
          type: number
          description: Commission percentage (0 to 100) taken from the gross reward amount.
          format: decimal
        commission:
          type: number
          description: Commission amount taken from the gross reward amount.
          format: decimal
        finalAmount:
          type: number
          description: Net reward amount paid out to the target account after commissions.
          format: decimal
        createdOn:
          type: string
          description: >-
            Timestamp for when it was decided that the rewards should be paid
            out.

            Note that actual payout time differs.
          format: date-time
        executionLayerAmount:
          type: number
          description: >-
            Gross amount of execution layer rewards. Only applicable to
            Pre-Pectra Ethereum rewards.
          format: decimal
          nullable: true
        consensusLayerAmount:
          type: number
          description: >-
            Gross amount of consensus layer rewards. Only applicable to
            Pre-Pectra Ethereum rewards.
          format: decimal
          nullable: true
        periodFrom:
          type: string
          description: >-
            Timestamp indicating the start of the period in which the rewards
            were earned. 

            This is only available for automated payouts.
          format: date-time
          nullable: true
        periodTo:
          type: string
          description: >-
            Timestamp indicating the end of the period in which the rewards were
            earned. 

            This is only available for automated payouts.
          format: date-time
          nullable: true
        lockedAmount:
          type: number
          description: Amount of rewards that are locked.
          format: decimal
          nullable: true
        lockedTill:
          type: string
          description: >-
            Timestamp indicating expiration of the lock, if the rewards are
            locked.
          format: date-time
          nullable: true
      additionalProperties: false
    RewardDetails:
      type: object
      properties:
        rewardsToDate:
          type: number
          description: Sum of rewards paid out for the staking account.
          format: decimal
        rewardsToDateAfterCommissions:
          type: number
          description: Sum of rewards paid out for the staking account after commissions.
          format: decimal
        payoutAssetSymbol:
          type: string
          description: Asset symbol used for payouts.
      additionalProperties: false
    RewardPagedResult:
      type: object
      properties:
        count:
          type: integer
          format: int32
        page:
          type: integer
          format: int32
        totalCount:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/Reward'
      additionalProperties: false
    RewardPeriodStatus:
      enum:
        - NotReady
        - Pending
        - Missing
      type: string
    StakingAccount:
      type: object
      properties:
        accountNumber:
          type: string
          description: Staking account number.
        stakingAccountType:
          allOf:
            - $ref: '#/components/schemas/AccountType'
          description: The account type of the staking account.
        assetSymbol:
          type: string
          description: Asset Symbol for the Staking Account.
        payoutAccount:
          type: string
          description: Configured payout account that gets rewards earned.
          nullable: true
        commission:
          type: number
          description: >-
            The commission taken on staking rewards to the account as a
            percentage.
          format: decimal
        productId:
          type: string
          description: Product ID of the staking account.
          format: uuid
        rewardDetails:
          type: object
          allOf:
            - $ref: '#/components/schemas/RewardDetails'
          description: Details about the rewards for the Staking Account
          nullable: true
        orderDetails:
          type: object
          allOf:
            - $ref: '#/components/schemas/OrderDetails'
          description: Details about the Staking Orders for the Staking Account
          nullable: true
        isSafeToClose:
          type: boolean
          description: Whether it is safe to close the account.
          nullable: true
      additionalProperties: false
    StakingData:
      type: object
      properties:
        assetSymbol:
          type: string
          description: Asset Symbol for staking currency.
        aggregatedStakingPerformanceData:
          allOf:
            - $ref: '#/components/schemas/AggregatedStakingPerformanceData'
          description: Staking reward data based on our own validators' performance.
        stakingRewardsDotComData:
          allOf:
            - $ref: '#/components/schemas/StakingRewardsDotComData'
          description: Staking reward data from www.stakingrewards.com.
      additionalProperties: false
    StakingOrder:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier.
          format: uuid
        amount:
          type: number
          description: Amount to move from debit to credit account.
          format: decimal
        assetSymbol:
          type: string
          description: Symbol corresponding to the TokenMaster asset.
        orderNumber:
          type: string
          description: >-
            User-friendly, uniquely assigned order number. 

            Can be found as an external reference for staking order in other
            systems.
        fromAccountNumber:
          type: string
          description: Account that is credited.
        toAccountNumber:
          type: string
          description: Account that is credited.
          nullable: true
        customerNumber:
          type: integer
          description: Customer that owns the accounts.
          format: int32
        createdOn:
          type: string
          description: Timestamp for when the order was stored in the database.
          format: date-time
        estimatedEffectuatedTime:
          type: string
          description: >-
            Timestamp for when no-reward (entries) or reward period (exits) has
            ended.
          format: date-time
          nullable: true
        estimatedCompletedTime:
          type: string
          description: Timestamp for when locking has ended.
          format: date-time
          nullable: true
        effectuated:
          type: boolean
          description: True if internal state is Effectuated or Released.
        state:
          allOf:
            - $ref: '#/components/schemas/StakingOrderState'
          description: State of the order.
        type:
          allOf:
            - $ref: '#/components/schemas/StakingOrderType'
          description: 'Type: Entrance or exit.'
        externalComment:
          type: string
          description: External comment.
          nullable: true
        transactionReference:
          type: string
          description: Transaction reference.
          nullable: true
      additionalProperties: false
    StakingOrderAggregation:
      type: object
      properties:
        count:
          type: integer
          description: The number of orders in the aggregation.
          format: int32
        totalAmount:
          type: number
          description: The total sum of amounts of all orders in the aggregation.
          format: decimal
      additionalProperties: false
    StakingOrderPagedResult:
      type: object
      properties:
        count:
          type: integer
          format: int32
        page:
          type: integer
          format: int32
        totalCount:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/StakingOrder'
      additionalProperties: false
    StakingOrderState:
      enum:
        - Open
        - Processing
        - Completed
        - Cancelled
      type: string
    StakingOrderType:
      enum:
        - Unknown
        - Entry
        - Exit
      type: string
    StakingRewardsDotComData:
      type: object
      properties:
        assetName:
          type: string
        adjReward:
          type: number
          format: decimal
        algorithmType:
          type: string
        averageValidatorFee:
          type: number
          format: decimal
          nullable: true
        engagedBalance:
          type: number
          format: decimal
        inflation:
          type: number
          format: decimal
        marketcap:
          type: integer
          format: int64
        price:
          type: number
          format: decimal
        reward:
          type: number
          format: decimal
        reward24hChange:
          type: number
          format: decimal
        reward30dChange:
          type: number
          format: decimal
        score:
          type: number
          format: decimal
        stakedValue:
          type: number
          format: decimal
        totalStaked:
          type: number
          format: decimal
        volume24h:
          type: integer
          format: int64
        modifiedOn:
          type: string
          format: date-time
      additionalProperties: false
    UpdatePayoutAccountRequest:
      type: object
      properties:
        payoutAccountNumber:
          pattern: ^[0-9]{12}$
          type: string
          description: Account number of new payout account.
      additionalProperties: false
    AccountOrdersStatement:
      required:
        - dateFrom
        - dateTo
        - items
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
        items:
          type: array
          items:
            $ref: '#/components/schemas/AccountOrdersStatementItem'
      additionalProperties: false
    AccountOrdersStatementItem:
      required:
        - date
        - description
        - time
        - trackingNumber
        - transactionState
        - transactionType
      type: object
      properties:
        date:
          type: string
          format: date
        time:
          type: string
          format: time
        trackingNumber:
          minLength: 1
          type: string
        description:
          minLength: 1
          type: string
        creditAccount:
          type: string
          nullable: true
        creditAmount:
          type: number
          format: double
          nullable: true
        creditCurrency:
          type: string
          nullable: true
        debitAccount:
          type: string
          nullable: true
        debitAmount:
          type: number
          format: double
          nullable: true
        debitCurrency:
          type: string
          nullable: true
        commissionPercentage:
          type: number
          format: double
          nullable: true
        commissionCurrency:
          type: string
          nullable: true
        commissionAmount:
          type: number
          format: double
          nullable: true
        transactionState:
          minLength: 1
          type: string
        transactionType:
          minLength: 1
          type: string
        tradeOrderDetails:
          $ref: '#/components/schemas/AccountOrdersStatementItem_TradeOrderDetails'
      additionalProperties: false
    AccountOrdersStatementItem_TradeOrderDetails:
      type: object
      properties:
        side:
          type: string
          nullable: true
        instrument:
          type: string
          nullable: true
        limitPrice:
          type: number
          format: double
          nullable: true
        stopPrice:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    AccountOrdersStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/AccountOrdersStatement'
      additionalProperties: false
    AccountOrdersStatementRequest:
      required:
        - dateFrom
        - dateTo
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
      additionalProperties: false
    AccountStatement:
      required:
        - accounts
        - dateFrom
        - dateTo
        - referenceCurrency
        - totalValueInReferenceCurrency
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
        totalValueInReferenceCurrency:
          type: number
          format: double
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountStatementAccount'
      additionalProperties: false
    AccountStatementAccount:
      required:
        - account
        - accountCurrency
        - accountType
        - currentBalance
        - items
      type: object
      properties:
        account:
          minLength: 1
          type: string
        accountAddress:
          type: string
          nullable: true
        accountType:
          minLength: 1
          type: string
        accountCurrency:
          minLength: 1
          type: string
        currentBalance:
          type: number
          format: double
        items:
          type: array
          items:
            $ref: '#/components/schemas/AccountStatementItem'
      additionalProperties: false
    AccountStatementItem:
      required:
        - amount
        - balance
        - date
        - description
      type: object
      properties:
        date:
          type: string
          format: date
        description:
          minLength: 1
          type: string
        amount:
          type: number
          format: double
        balance:
          type: number
          format: double
      additionalProperties: false
    AccountStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/AccountStatement'
      additionalProperties: false
    AccountStatementRequest:
      required:
        - dateFrom
        - dateTo
        - referenceCurrency
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
      additionalProperties: false
    BalanceStatement:
      required:
        - accounts
        - balanceDate
        - referenceCurrency
      type: object
      properties:
        balanceDate:
          type: string
          format: date-time
        referenceCurrency:
          minLength: 1
          type: string
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/BalanceStatementAccount'
      additionalProperties: false
    BalanceStatementAccount:
      required:
        - account
        - balance
        - currency
        - type
      type: object
      properties:
        account:
          minLength: 1
          type: string
        type:
          minLength: 1
          type: string
        accountAddress:
          type: string
          nullable: true
        currency:
          minLength: 1
          type: string
        balance:
          type: number
          format: double
        exchangeRate:
          type: number
          format: double
          nullable: true
        valueInReferenceCurrency:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    BalanceStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/BalanceStatement'
      additionalProperties: false
    BalanceStatementRequest:
      required:
        - date
        - referenceCurrency
      type: object
      properties:
        date:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
      additionalProperties: false
    CreateResponse:
      type: object
      properties:
        reportId:
          type: string
          format: uuid
      additionalProperties: false
    ExchangeRatesStatement:
      required:
        - dateTime
        - items
        - referenceCurrency
      type: object
      properties:
        dateTime:
          type: string
          format: date-time
        referenceCurrency:
          minLength: 1
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeRatesStatementItem'
      additionalProperties: false
    ExchangeRatesStatementItem:
      required:
        - currency
        - exchangeRate
      type: object
      properties:
        currency:
          minLength: 1
          type: string
        exchangeRate:
          type: number
          format: double
      additionalProperties: false
    ExchangeRatesStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/ExchangeRatesStatement'
      additionalProperties: false
    ExchangeRatesStatementRequest:
      required:
        - date
        - referenceCurrency
      type: object
      properties:
        date:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
      additionalProperties: false
    FeeItemCategory:
      type: object
      properties:
        isTransactionBased:
          type: boolean
        label:
          type: string
          nullable: true
      additionalProperties: false
    FeeNoticeStatement:
      required:
        - fees
      type: object
      properties:
        fees:
          $ref: '#/components/schemas/FeeNoticeStatementFees'
      additionalProperties: false
    FeeNoticeStatementFees:
      required:
        - currency
        - periodicFees
        - total
        - transactionBasedFees
      type: object
      properties:
        periodicFees:
          type: array
          items:
            $ref: '#/components/schemas/FeeNoticeStatementItem'
        transactionBasedFees:
          type: array
          items:
            $ref: '#/components/schemas/FeeNoticeStatementItem'
        total:
          $ref: '#/components/schemas/FeeNoticeStatementTotal'
        currency:
          minLength: 1
          type: string
      additionalProperties: false
    FeeNoticeStatementItem:
      required:
        - category
        - count
        - grossAmount
        - totalAmount
      type: object
      properties:
        category:
          $ref: '#/components/schemas/FeeItemCategory'
        count:
          type: integer
          format: int32
        grossAmount:
          type: number
          format: double
        vatRatePercent:
          type: number
          format: double
          nullable: true
        vatAmount:
          type: number
          format: double
          nullable: true
        totalAmount:
          type: number
          format: double
      additionalProperties: false
    FeeNoticeStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/FeeNoticeStatement'
      additionalProperties: false
    FeeNoticeStatementRequest:
      required:
        - dateFrom
        - dateTo
        - referenceCurrency
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
      additionalProperties: false
    FeeNoticeStatementTotal:
      required:
        - grossAmount
        - totalAmount
        - vat
      type: object
      properties:
        grossAmount:
          type: number
          format: double
        vat:
          type: number
          format: double
        totalAmount:
          type: number
          format: double
      additionalProperties: false
    GetAccountStatement:
      type: object
      properties:
        accountNumber:
          type: string
          nullable: true
        dateFrom:
          type: string
          format: date-time
          nullable: true
        dateTo:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    GetAccountStatementsForClient:
      type: object
      properties:
        dateFrom:
          type: string
          format: date-time
          nullable: true
        dateTo:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    GuaranteeStatement:
      type: object
      properties:
        totalCryptoAssets:
          type: number
          format: double
        cryptoSeparatedAssets:
          type: number
          format: double
        cryptoSeparatedAssetsHasCollateral:
          type: boolean
        cryptoCollectiveAssets:
          type: number
          format: double
        totalFiatAssets:
          type: number
          format: double
        totalOngoingTrading:
          type: number
          format: double
        ongoingCryptoTrading:
          type: number
          format: double
        ongoingFiatTrading:
          type: number
          format: double
        totalGuaranteeClaim:
          type: number
          format: double
        snapshotDate:
          type: string
          format: date-time
        currency:
          type: string
          nullable: true
        externalBankName:
          type: string
          nullable: true
        externalBankAddress:
          type: string
          nullable: true
        externalBankZip:
          type: string
          nullable: true
        externalBankCity:
          type: string
          nullable: true
        externalBankCountry:
          type: string
          nullable: true
      additionalProperties: false
    GuaranteeStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/GuaranteeStatement'
      additionalProperties: false
    GuaranteeStatementRequest:
      type: object
      additionalProperties: false
    ReportState:
      enum:
        - Processing
        - Succeeded
        - Failed
      type: string
    StakingRewardsStatement:
      required:
        - accounts
        - dateFrom
        - dateTo
        - referenceCurrency
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/StakingRewardsStatementAccount'
      additionalProperties: false
    StakingRewardsStatementAccount:
      required:
        - account
        - accountCurrency
        - items
        - totalNetRewards
      type: object
      properties:
        account:
          minLength: 1
          type: string
        accountCurrency:
          minLength: 1
          type: string
        payoutCurrency:
          type: string
          nullable: true
        totalNetRewards:
          type: number
          format: double
        totalValueInReferenceCurrency:
          type: number
          format: double
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/StakingRewardsStatementItem'
      additionalProperties: false
    StakingRewardsStatementItem:
      required:
        - netReward
        - payoutDate
      type: object
      properties:
        payoutDate:
          type: string
          format: date
        rewardPeriodFrom:
          type: string
          format: date
          nullable: true
        rewardPeriodTo:
          type: string
          format: date
          nullable: true
        lockedUntil:
          type: string
          format: date
          nullable: true
        netReward:
          type: number
          format: double
        netRewardCl:
          type: number
          format: double
          nullable: true
        netRewardEl:
          type: number
          format: double
          nullable: true
        exchangeRate:
          type: number
          format: double
          nullable: true
        currency:
          type: string
          nullable: true
        valueInReferenceCurrency:
          type: number
          format: double
          nullable: true
        payoutAccount:
          type: string
          nullable: true
      additionalProperties: false
    StakingRewardsStatementReportResponse:
      required:
        - state
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ReportState'
        reportData:
          $ref: '#/components/schemas/StakingRewardsStatement'
      additionalProperties: false
    StakingRewardsStatementRequest:
      required:
        - dateFrom
        - dateTo
        - referenceCurrency
      type: object
      properties:
        dateFrom:
          type: string
          format: date
        dateTo:
          type: string
          format: date
        referenceCurrency:
          minLength: 1
          type: string
      additionalProperties: false
    Customer:
      required:
        - accessRight
        - customerNumber
        - eligibleForTrading
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: 'The client name, example: ''Satoshi Nakamoto'''
        customerNumber:
          minLength: 1
          type: string
          description: >-
            Used to select the customer an API endpoint is executed for, should
            be set as the `customer-number` HTTP header for most API requests
        eligibleForTrading:
          type: boolean
          description: Must be `true` to use this client for trading
        accessRight:
          minLength: 1
          type: string
          description: >-
            The permissions you have for this client, can be one of: `ReadOnly`,
            `Trading`, `DepositWithdrawal`, `FullAccess`
      additionalProperties: false
    BorrowLendReport:
      type: object
      properties:
        portfolioId:
          type: string
          nullable: true
        serviceFee:
          type: number
          format: decimal
        collateralization:
          type: number
          format: decimal
        currentLtv:
          type: number
          format: decimal
        smLtv:
          type: number
          format: decimal
        hmLtv:
          type: number
          format: decimal
        loans:
          type: array
          items:
            $ref: '#/components/schemas/LoanReport'
          nullable: true
        collaterals:
          type: array
          items:
            $ref: '#/components/schemas/CollateralReport'
          nullable: true
      additionalProperties: false
    CollateralReport:
      type: object
      properties:
        amount:
          type: number
          format: decimal
        currency:
          type: string
          nullable: true
        accountReference:
          type: string
          nullable: true
      additionalProperties: false
    LoanReport:
      type: object
      properties:
        loanReference:
          type: string
          nullable: true
        loanValue:
          type: number
          format: decimal
        accruals:
          type: number
          format: decimal
        netAccruals:
          type: number
          format: decimal
        currency:
          type: string
          nullable: true
        interest:
          type: number
          format: decimal
        interestInterval:
          type: string
          nullable: true
        loanValuation:
          type: number
          format: decimal
        startDate:
          type: string
          format: date-time
        maturityDate:
          type: string
          format: date-time
        defaultEvent:
          type: boolean
        paymentDates:
          type: array
          items:
            $ref: '#/components/schemas/PaymentDateReport'
          nullable: true
      additionalProperties: false
    PaymentDateReport:
      type: object
      properties:
        date:
          type: string
          format: date-time
        paymentStatus:
          type: boolean
        couponPercentage:
          type: number
          format: decimal
        couponAbsolute:
          type: number
          format: decimal
        currency:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    api-key:
      type: apiKey
      description: >-
        'BTCS' followed by your Bitcoin Suisse API key (with a space in
        between). Example: 'BTCS your-api-key-here'
      name: X-Auth
      in: header
    nonce:
      type: apiKey
      description: >-
        Random string with a length of exactly 20 chars. Only alphanumeric
        characters allowed. Must be unique for each request.
      name: X-Auth-Nonce
      in: header
    timestamp:
      type: apiKey
      description: >-
        Current timestamp in ISO8601 format. Example: '2021-03-26
        11:33:52.9100000 +00:00'
      name: X-Auth-Timestamp
      in: header
    version:
      type: apiKey
      description: The API key version. Currently 'v1' should be used.
      name: X-Auth-Version
      in: header
    signature:
      type: apiKey
      description: >-
        Signature to verify that the content of the request (including headers)
        has not been changed. Calculated using your API secret.
      name: X-Auth-Signature
      in: header
security:
  - api-key: []
    nonce: []
    timestamp: []
    version: []
    signature: []
x-tagGroups:
  - name: Customer Management
    tags:
      - Customers
  - name: Custody
    tags:
      - Accounts
      - HistoricalPortfolioValue
  - name: Trading
    tags:
      - Trading Accounts
      - Trading Configuration
      - Trading Instruments
      - Market Data
      - Trading Orders
  - name: Staking
    tags:
      - Public
      - Staking Orders
      - Staking Accounts
      - Staking Products
      - Staking Rewards
  - name: Reporting
    tags:
      - FileContent
      - TradingApi
      - Reports
  - name: Loans
    tags:
      - Loan Report
