x-generator: NSwag v14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))
openapi: 3.0.0
info:
  title: Instrument Market Data API
  description: >-
    An API that provides endpoints for retrieving market data for Structured
    Products issued by Vontobel.
  contact:
    name: Support @ SPP Markets
    email: marketssupport@vontobel.com
  version: 1.13.62
servers:
  - url: https://spp-product-market-data.api.vontobel.com
paths:
  /v1/products/bulk:
    post:
      tags:
        - Products (v1)
      summary: >-
        Processes a bulk request, handling multiple individual requests in a
        single operation.
      operationId: post_v1_products_bulk
      requestBody:
        x-name: request
        description: >-
          The bulk request containing multiple individual requests to be
          processed.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkProductMarketDataRequest'
        required: true
        x-position: 1
      responses:
        '200':
          description: A response containing the result of processing the bulk requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkProductMarketDataResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/products/{isin}/prices/intraday:
    get:
      tags:
        - Products (v1)
      summary: Get intraday prices for a product
      operationId: get_v1_products_isin_prices_intraday
      parameters:
        - name: isin
          in: path
          required: true
          description: >-
            The International Securities Identification Number (ISIN) for the
            product. This unique identifier is used to request intraday prices
            for the specified product.
          schema:
            type: string
          x-position: 1
        - name: interval
          in: query
          description: >-
            The time interval between consecutive data points. This could be,
            for example, 5 minutes, or any other supported interval. (Optional -
            Defaults to Minute_5 if not provided).
          schema:
            $ref: '#/components/schemas/WindowInterval'
          x-position: 2
        - name: dateFrom
          in: query
          description: >-
            The start date and time for the intraday price data query. Only data
            from this date and time onwards will be included. (Optional -
            Defaults to earliest available intraday price if not provided).
          schema:
            type: string
            format: date-time
            nullable: true
          x-position: 3
        - name: dateTo
          in: query
          description: >-
            The end date and time for the intraday price data query. Only data
            up to this date and time will be included. (Optional - Defaults to
            UTC now if not provided).
          schema:
            type: string
            format: date-time
            nullable: true
          x-position: 4
        - name: fields
          in: query
          description: >-
            The list of specific data fields to be retrieved (e.g., Open, High,
            Low, Close). If not provided, all default fields will be returned.
            (Optional - Defaults to Close if not provided).
          schema:
            $ref: '#/components/schemas/ProductIntradayPriceField'
          x-position: 5
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductIntradayPriceResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - 3ScaleExternal: []
  /v1/products/{isin}/prices/daily:
    get:
      tags:
        - Products (v1)
      summary: Get daily prices for a product
      operationId: get_v1_products_isin_prices_daily
      parameters:
        - name: isin
          in: path
          required: true
          description: >-
            The International Securities Identification Number (ISIN) for the
            product. This unique identifier is used to request daily prices for
            the specified product.
          schema:
            type: string
          x-position: 1
        - name: dateFrom
          in: query
          description: >-
            The start date for the daily price data query. Only data from this
            date onwards will be included. (Optional - Defaults to earliest
            available daily price if not provided).
          schema:
            type: string
            format: date
            nullable: true
          x-position: 2
        - name: dateTo
          in: query
          description: >-
            The end date for the daily price data query. Only data up to this
            date will be included. (Optional - Defaults to UTC today if not
            provided).
          schema:
            type: string
            format: date
            nullable: true
          x-position: 3
        - name: fields
          in: query
          description: >-
            The list of specific data fields to be retrieved (e.g., Open, High,
            Low, Close). If not provided, all default fields will be returned.
            (Optional - Defaults to Close if not provided).
          schema:
            $ref: '#/components/schemas/ProductDailyPriceField'
          x-position: 4
        - name: orderByAscending
          in: query
          description: >-
            Order prices by date in ascending order if true, descending if
            false. (Optional - Defaults to false if not provided).
          schema:
            type: boolean
            default: false
          x-position: 5
        - name: count
          in: query
          description: >-
            Limit the number of prices returned. (Optional - Defaults to null if
            not provided, all prices matching filters are returned).
          schema:
            type: integer
            format: int32
            nullable: true
          x-position: 6
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductDailyPriceResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - 3ScaleExternal: []
  /v1/products/{isin}/prices/overview:
    get:
      tags:
        - Products (v1)
      summary: Get the latest price overview for a product
      operationId: get_v1_products_isin_prices_overview
      parameters:
        - name: isin
          in: path
          required: true
          description: >-
            The International Securities Identification Number (ISIN) for the
            product. This unique identifier is used to request the price
            overview for the specified product.
          schema:
            type: string
          x-position: 1
        - name: fields
          in: query
          style: form
          explode: true
          description: >-
            The list of specific data fields to be retrieved (e.g., LastOpen,
            LastHigh, LastLow, LastClose). If not provided, all default fields
            will be returned.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ProductPriceOverviewField'
          x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPriceOverviewResponse'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - 3ScaleExternal: []
components:
  schemas:
    ValidationProblemDetails:
      allOf:
        - $ref: '#/components/schemas/HttpValidationProblemDetails'
        - type: object
          additionalProperties:
            nullable: true
          properties:
            errors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
    HttpValidationProblemDetails:
      allOf:
        - $ref: '#/components/schemas/ProblemDetails'
        - type: object
          additionalProperties:
            nullable: true
          properties:
            errors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
    ProblemDetails:
      type: object
      additionalProperties:
        nullable: true
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
    BulkProductMarketDataResponse:
      type: object
      description: The response to a bulk request.
      additionalProperties: false
      properties:
        errors:
          type: boolean
          description: >-
            If `true`, one or more of the operations in the bulk request did not
            complete successfully.
        items:
          type: array
          description: >-
            The result of each operation in the bulk request, in the order they
            were submitted.
          items:
            $ref: '#/components/schemas/BulkProductMarketDataResponseItem'
    BulkProductMarketDataResponseItem:
      type: object
      description: The result of a single operation in a bulk request.
      additionalProperties: false
      properties:
        responseIdentifier:
          description: >-
            The identifier for the response, uniquely identifying the operation
            within the bulk request.
          oneOf:
            - $ref: '#/components/schemas/ProductMarketDataResponseIdentifier'
        response:
          description: >-
            The successful response for the request, or null if there was an
            error.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ProductMarketDataResponse'
        errorResponse:
          description: >-
            Details about an error if the request failed, or null if the request
            was successful.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ProblemDetails'
    ProductMarketDataResponseIdentifier:
      type: object
      additionalProperties: false
      properties:
        isin:
          type: string
    ProductMarketDataResponse:
      type: object
      discriminator:
        propertyName: $type
        mapping:
          ProductIntradayPriceResponse: '#/components/schemas/ProductIntradayPriceResponse'
          ProductDailyPriceResponse: '#/components/schemas/ProductDailyPriceResponse'
          ProductPriceOverviewResponse: '#/components/schemas/ProductPriceOverviewResponse'
      x-abstract: true
      additionalProperties: false
      required:
        - $type
      properties:
        $type:
          type: string
    ProductIntradayPriceResponse:
      allOf:
        - $ref: '#/components/schemas/ProductMarketDataResponse'
        - type: object
          additionalProperties: false
          properties:
            prices:
              type: array
              items:
                $ref: '#/components/schemas/ProductIntradayPrice'
    ProductIntradayPrice:
      type: object
      additionalProperties: false
      properties:
        windowOpenTimestamp:
          type: string
          format: date-time
        windowCloseTimestamp:
          type: string
          format: date-time
        open:
          type: number
          format: decimal
          nullable: true
        high:
          type: number
          format: decimal
          nullable: true
        low:
          type: number
          format: decimal
          nullable: true
        close:
          type: number
          format: decimal
          nullable: true
        bid:
          type: number
          format: decimal
          nullable: true
        bidSize:
          type: number
          format: decimal
          nullable: true
        ask:
          type: number
          format: decimal
          nullable: true
        askSize:
          type: number
          format: decimal
          nullable: true
    ProductDailyPriceResponse:
      allOf:
        - $ref: '#/components/schemas/ProductMarketDataResponse'
        - type: object
          additionalProperties: false
          properties:
            prices:
              type: array
              items:
                $ref: '#/components/schemas/ProductDailyPrice'
    ProductDailyPrice:
      type: object
      additionalProperties: false
      properties:
        date:
          type: string
          format: date
        windowOpenTimestamp:
          type: string
          format: date-time
          nullable: true
        windowCloseTimestamp:
          type: string
          format: date-time
          nullable: true
        open:
          type: number
          format: decimal
          nullable: true
        high:
          type: number
          format: decimal
          nullable: true
        low:
          type: number
          format: decimal
          nullable: true
        close:
          type: number
          format: decimal
          nullable: true
        closeMethod:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ProductPriceCloseMethod'
        bid:
          type: number
          format: decimal
          nullable: true
        bidSize:
          type: number
          format: decimal
          nullable: true
        ask:
          type: number
          format: decimal
          nullable: true
        askSize:
          type: number
          format: decimal
          nullable: true
        accruedInterest:
          type: number
          format: decimal
          nullable: true
    ProductPriceCloseMethod:
      type: string
      description: ''
      x-enumNames:
        - Last
        - Close
        - Valuation
      enum:
        - Last
        - Close
        - Valuation
    ProductPriceOverviewResponse:
      allOf:
        - $ref: '#/components/schemas/ProductMarketDataResponse'
        - type: object
          additionalProperties: false
          properties:
            lastPrice:
              description: The last quoted price of the product.
              nullable: true
              oneOf:
                - $ref: '#/components/schemas/ProductPrice'
            lastOpen:
              type: number
              description: The last opening price of the product.
              format: decimal
              nullable: true
            lastOpenObservedAtTimestamp:
              type: string
              description: The timestamp when the last opening price was observed.
              format: date-time
              nullable: true
            lastDayHigh:
              type: number
              description: The highest price of the product for the most recent day.
              format: decimal
              nullable: true
            lastDayHighObservedAtTimestamp:
              type: string
              description: The timestamp when the last highest price was observed.
              format: date-time
              nullable: true
            lastDayLow:
              type: number
              description: The lowest price of the product for the most recent day.
              format: decimal
              nullable: true
            lastDayLowObservedAtTimestamp:
              type: string
              description: The timestamp when the last lowest price was observed.
              format: date-time
              nullable: true
            lastClose:
              type: number
              description: The last closing price of the product
              format: decimal
              nullable: true
            lastCloseObservedAtTimestamp:
              type: string
              description: The timestamp when the last closing price was observed.
              format: date-time
              nullable: true
            lastCloseMethod:
              description: >-
                The method used to determine the last closing price of the
                product.
              nullable: true
              oneOf:
                - $ref: '#/components/schemas/ProductPriceCloseMethod'
            dailyPerformanceBasePrice:
              type: number
              description: >-
                The base price used for calculating daily performance of the
                product.
              format: decimal
              nullable: true
            dailyPerformanceBasePriceObservedAtTimestamp:
              type: string
              description: >-
                The timestamp when the daily performance base price was
                observed.
              format: date-time
              nullable: true
            ytdPerformanceBasePrice:
              type: number
              description: >-
                The base price used for calculating year-to-date (YTD)
                performance of the product.
              format: decimal
              nullable: true
            ytdPerformanceBasePriceObservedAtTimestamp:
              type: string
              description: >-
                The timestamp when the year-to-date (YTD) performance base price
                was observed.
              format: date-time
              nullable: true
            lastAccruedInterest:
              type: number
              description: The last accrued interest value for the product.
              format: decimal
              nullable: true
            lastAccruedInterestObservedAtTimestamp:
              type: string
              description: The timestamp when the last accrued interest was observed.
              format: date-time
              nullable: true
    ProductPrice:
      type: object
      description: |-
        Represents the quoted price of a product at a specific point in time,
        including bid/ask prices and their respective sizes.
      additionalProperties: false
      properties:
        bid:
          type: number
          description: >-
            The bid price, representing the highest price a buyer is willing to
            pay.
          format: decimal
          nullable: true
        bidSize:
          type: number
          description: The size or quantity available at the bid price.
          format: decimal
          nullable: true
        ask:
          type: number
          description: >-
            The ask price, representing the lowest price a seller is willing to
            accept.
          format: decimal
          nullable: true
        askSize:
          type: number
          description: The size or quantity available at the ask price.
          format: decimal
          nullable: true
        isQuotingPulled:
          type: boolean
          description: Indicates whether quoting is inactive (pulled)
          nullable: true
        observedAtTimestamp:
          type: string
          description: The timestamp when this price information was observed.
          format: date-time
          nullable: true
    BulkProductMarketDataRequest:
      type: object
      description: A bulk request containing multiple individual requests.
      additionalProperties: false
      properties:
        items:
          type: array
          description: >-
            A list of individual product market data requests to be processed as
            part of the bulk operation.
          items:
            $ref: '#/components/schemas/ProductMarketDataRequest'
    ProductMarketDataRequest:
      type: object
      discriminator:
        propertyName: $type
        mapping:
          ProductIntradayPriceRequest: '#/components/schemas/ProductIntradayPriceRequest'
          ProductDailyPriceRequest: '#/components/schemas/ProductDailyPriceRequest'
          ProductPriceOverviewRequest: '#/components/schemas/ProductPriceOverviewRequest'
      x-abstract: true
      additionalProperties: false
      required:
        - $type
      properties:
        isin:
          type: string
        $type:
          type: string
    ProductIntradayPriceRequest:
      allOf:
        - $ref: '#/components/schemas/ProductMarketDataRequest'
        - type: object
          description: Get intraday prices for a product
          additionalProperties: false
          properties:
            interval:
              description: >-
                The time interval between consecutive data points. This could
                be, for example, 5 minutes, or any other supported interval.
                (Optional - Defaults to Minute_5 if not provided).
              oneOf:
                - $ref: '#/components/schemas/WindowInterval'
            dateFrom:
              type: string
              description: >-
                The start date and time for the intraday price data query. Only
                data from this date and time onwards will be included. (Optional
                - Defaults to earliest available intraday price if not
                provided).
              format: date-time
              nullable: true
            dateTo:
              type: string
              description: >-
                The end date and time for the intraday price data query. Only
                data up to this date and time will be included. (Optional -
                Defaults to UTC now if not provided).
              format: date-time
              nullable: true
            fields:
              description: >-
                The list of specific data fields to be retrieved (e.g., Open,
                High, Low, Close). If not provided, all default fields will be
                returned. (Optional - Defaults to Close if not provided).
              oneOf:
                - $ref: '#/components/schemas/ProductIntradayPriceField'
    WindowInterval:
      type: string
      description: Represents different time intervals for windowed operations.
      x-enumNames:
        - Minute_5
        - Hour_1
      enum:
        - Minute_5
        - Hour_1
    ProductIntradayPriceField:
      type: string
      description: ''
      x-enumNames:
        - Close
        - OHLC
        - BidAsk
      enum:
        - Close
        - OHLC
        - BidAsk
    ProductDailyPriceRequest:
      allOf:
        - $ref: '#/components/schemas/ProductMarketDataRequest'
        - type: object
          description: Get daily prices for a product
          additionalProperties: false
          properties:
            dateFrom:
              type: string
              description: >-
                The start date for the daily price data query. Only data from
                this date onwards will be included. (Optional - Defaults to
                earliest available daily price if not provided).
              format: date
              nullable: true
            dateTo:
              type: string
              description: >-
                The end date for the daily price data query. Only data up to
                this date will be included. (Optional - Defaults to UTC today if
                not provided).
              format: date
              nullable: true
            fields:
              description: >-
                The list of specific data fields to be retrieved (e.g., Open,
                High, Low, Close). If not provided, all default fields will be
                returned. (Optional - Defaults to Close if not provided).
              oneOf:
                - $ref: '#/components/schemas/ProductDailyPriceField'
            orderByAscending:
              type: boolean
              description: >-
                Order prices by date in ascending order if true, descending if
                false. (Optional - Defaults to false if not provided).
            count:
              type: integer
              description: >-
                Limit the number of prices returned. (Optional - Defaults to
                null if not provided, all prices matching filters are returned).
              format: int32
              nullable: true
    ProductDailyPriceField:
      type: string
      description: ''
      x-enumNames:
        - Close
        - CloseAccruedInterest
        - OHLC
        - LastBidAsk
        - LastBidAskAccruedInterest
      enum:
        - Close
        - CloseAccruedInterest
        - OHLC
        - LastBidAsk
        - LastBidAskAccruedInterest
    ProductPriceOverviewRequest:
      allOf:
        - $ref: '#/components/schemas/ProductMarketDataRequest'
        - type: object
          description: Get the latest price overview for a product
          additionalProperties: false
          properties:
            fields:
              type: array
              description: >-
                The list of specific data fields to be retrieved (e.g.,
                LastOpen, LastHigh, LastLow, LastClose). If not provided, all
                default fields will be returned.
              items:
                $ref: '#/components/schemas/ProductPriceOverviewField'
    ProductPriceOverviewField:
      type: string
      description: Specifies the different price overview fields available for a product.
      x-enumNames:
        - LastPrice
        - LastOpen
        - LastHigh
        - LastLow
        - LastClose
        - DailyPerformanceBasePrice
        - YTDPerformanceBasePrice
        - LastAccruedInterest
      enum:
        - LastPrice
        - LastOpen
        - LastHigh
        - LastLow
        - LastClose
        - DailyPerformanceBasePrice
        - YTDPerformanceBasePrice
        - LastAccruedInterest
  securitySchemes:
    3ScaleExternal:
      type: oauth2
      description: Authentication using 3Scale API IDP
      flows:
        clientCredentials:
          tokenUrl: >-
            https://api-sso.vontobel.com/auth/realms/ext-api/protocol/openid-connect/token
          scopes:
            openid: OpenId
security:
  - 3ScaleExternal: []
