---
openapi: 3.0.1
info:
  title: Trading API v3
  description: APIs related to trading operations
  version: v3
paths:
  /frontoffice/api/v3/ui/layouts:
    get:
      tags:
        - LayoutControllerV
      description: "Required operations: trading-ui"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
    post:
      tags:
        - LayoutControllerV
      description: "Required operations: trading-ui"
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiCreateLayout.Request
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
  /frontoffice/api/v3/guest/ui/layouts:
    get:
      tags:
        - GuestLayoutControllerV
      description: >-
        Anonymous read-only counterpart of GET /frontoffice/api/v3/ui/layouts.
        No authentication and no required operations. Returns the same schema
        holding exactly one layout — the tenant guest UI template materialized
        as a layout — with widgets the broker disabled excluded. Guests have no
        stored workspace, so there is no create, update, delete, or reorder
        counterpart.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Response
  /frontoffice/api/v3/ui/layouts/{id}:
    put:
      tags:
        - LayoutControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiUpdateLayout.Request.BodyModel
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
    delete:
      tags:
        - LayoutControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
  /frontoffice/api/v3/ui/layouts/{id}/name:
    put:
      tags:
        - LayoutControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiSetNameLayout.Request.BodyModel
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
  /frontoffice/api/v3/ui/layouts/order:
    put:
      tags:
        - LayoutControllerV
      description: "Required operations: trading-ui"
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiOrderLayouts.Request
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
components:
  schemas:
    BBP.Platform.Http.ErrorData:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          $ref: '#/components/schemas/BBP.Platform.Http.ErrorData.ErrorDetails'
      additionalProperties: false
    BBP.Platform.Http.ErrorData.ErrorDetails:
      type: object
      properties:
        source:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        stackTrace:
          type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.Core.Shared.Ui.ApiWidgetType:
      enum:
        - BbpFavorites
        - BbpOrderBook
        - BbpOrderHistory
        - BbpExchangeTime
        - BbpWatchList
        - BbpAssets
        - BbpStopOrders
        - BbpOpenOrders
        - BbpDepth
        - BbpTradingView
        - BbpMessages
        - BbpPriceControl
        - BbpMargin
        - BbpOpenPositions
        - BbpClosedPositions
        - BbpPlaceOrder
        - BbpMarketSummary
        - BbpAllMarkets
        - BbpAiAssistant
      type: string
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Response:
      type: object
      properties:
        layouts:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Layout
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Layout:
      required:
        - id
        - name
        - tabs
      type: object
      properties:
        id:
          minLength: 1
          type: string
        name:
          minLength: 1
          type: string
        templateId:
          type: string
          nullable: true
        tabs:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Tab
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Tab:
      required:
        - id
        - selectedWidgetId
        - sizes
        - widgets
      type: object
      properties:
        id:
          minLength: 1
          type: string
        selectedWidgetId:
          minLength: 1
          type: string
        sizes:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Sizes
        widgets:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Widget
        groupId:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Sizes:
      required:
        - cols
        - rows
        - x
        - 'y'
      type: object
      properties:
        x:
          type: integer
          format: int32
        'y':
          type: integer
          format: int32
        cols:
          type: integer
          format: int32
        rows:
          type: integer
          format: int32
        layerIndex:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.Widget:
      required:
        - id
        - settings
        - type
      type: object
      properties:
        id:
          minLength: 1
          type: string
        settings:
          oneOf:
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpFavorites
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMarket
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpLimit
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpStopMarket
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpStopLimit
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpQuickMarket
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpQuickLimit
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOrderBook
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOrderHistory
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpExchangeTime
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpWatchList
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpAssets
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpStopOrders
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOpenOrders
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpDepth
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpTradingView
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMessages
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpPriceControl
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMargin
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOpenPositions
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpClosedPositions
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpPlaceOrder
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMarketSummary
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpAllMarkets
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpAiAssistant
        type:
          minLength: 1
          type: string
          readOnly: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpFavorites:
      required:
        - pairs
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pairs:
          type: array
          items:
            type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings:
      type: object
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMarket:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpLimit:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpStopMarket:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpStopLimit:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpQuickMarket:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpQuickLimit:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOrderBook:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOrderHistory:
      required:
        - dateRange
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        dateRange:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRangeWithOption:
      required:
        - option
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRange
      properties:
        option:
          type: integer
          format: int32
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRange:
      type: object
      properties:
        range:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRange.Period
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRange.Period:
      required:
        - from
        - to
      type: object
      properties:
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpExchangeTime:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpWatchList:
      required:
        - pairs
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pairs:
          type: array
          items:
            type: string
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpAssets:
      required:
        - isZeroHidden
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        isZeroHidden:
          type: boolean
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpStopOrders:
      required:
        - dateRange
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        dateRange:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOpenOrders:
      required:
        - dateRange
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        dateRange:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpDepth:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpTradingView:
      required:
        - chartStateByTheme
        - currentInterval
        - isVolumeHidden
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
        currentInterval:
          minLength: 1
          type: string
        isVolumeHidden:
          type: boolean
        chartStateByTheme:
          minLength: 1
          type: string
        quickMarket:
          type: object
          nullable: true
          properties:
            location:
              $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Location'
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Location:
      type: object
      required:
        - x
        - y
      properties:
        x:
          type: integer
          format: int32
          nullable: false
        y:
          type: integer
          format: int32
          nullable: false
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMessages:
      required:
        - isUnreadOnly
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        isUnreadOnly:
          type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpPriceControl:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMargin:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpOpenPositions:
      required:
        - dateRange
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        dateRange:
          oneOf:
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRange
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpClosedPositions:
      required:
        - dateRange
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        dateRange:
          oneOf:
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRange
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.DateRangeWithOption
        orderType:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Enums.ApiOrderType
        timeInForce:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Enums.ApiOrderTimeInForce
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Enums.ApiOrderType:
      enum:
        - Market
        - Limit
      type: string
    BBP.TradingServer.TradingApi.Models.Enums.ApiOrderTimeInForce:
      enum:
        - Gtc
        - Ioc
        - Fok
        - Gtd
        - Day
        - Retry
      type: string
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpPlaceOrder:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
        hasAdvancedView:
          type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpMarketSummary:
      required:
        - pair
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          minLength: 1
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpAllMarkets:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetsSettings.BbpAiAssistant:
      required:
        - pair
        - isRecommendationExpanded
        - isForecastExpanded
        - isSignalDriversExpanded
        - isSuggestedActionsExpanded
        - isKeyMetricsExpanded
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiFindLayout.WidgetSettings
      properties:
        pair:
          type: string
        isRecommendationExpanded:
          type: boolean
        isForecastExpanded:
          type: boolean
        isSignalDriversExpanded:
          type: boolean
        isSuggestedActionsExpanded:
          type: boolean
        isKeyMetricsExpanded:
          type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiCreateLayout.Request:
      type: object
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        templateId:
          type: string
          nullable: true
        tabs:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Tab
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Tab:
      type: object
      properties:
        id:
          type: string
          nullable: true
        selectedWidgetId:
          type: string
          nullable: true
        sizes:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Sizes
        widgets:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Widget
          nullable: true
        groupId:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Sizes:
      type: object
      properties:
        x:
          type: integer
          format: int32
          nullable: true
        'y':
          type: integer
          format: int32
          nullable: true
        cols:
          type: integer
          format: int32
          nullable: true
        rows:
          type: integer
          format: int32
          nullable: true
        layerIndex:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiUpdateLayout.Request.BodyModel:
      type: object
      properties:
        tabs:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Tab
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiSetNameLayout.Request.BodyModel:
      type: object
      properties:
        name:
          type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiOrderLayouts.Request:
      type: object
      properties:
        layoutOrder:
          type: array
          items:
            type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Widget:
      type: object
      properties:
        id:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/BBP.TradingServer.Core.Shared.Ui.ApiWidgetType'
        settings:
          oneOf:
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpFavorites
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOrderBook
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOrderHistory
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpExchangeTime
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpWatchList
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpAssets
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpStopOrders
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOpenOrders
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpDepth
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpTradingView
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpMessages
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpPriceControl
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpMargin
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOpenPositions
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpClosedPositions
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpPlaceOrder
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpMarketSummary
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpAllMarkets
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpAiAssistant
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpFavorites:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pairs:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings:
      type: object
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOrderBook:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pair:
          type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOrderHistory:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        dateRange:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRangeWithOption:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRange
      properties:
        option:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRange:
      type: object
      properties:
        range:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRange.Period
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRange.Period:
      type: object
      properties:
        from:
          type: string
          format: date-time
          nullable: true
        to:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpExchangeTime:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpWatchList:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pairs:
          type: array
          items:
            type: string
          nullable: true
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpAssets:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        isZeroHidden:
          type: boolean
          nullable: true
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpStopOrders:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        dateRange:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOpenOrders:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        dateRange:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRangeWithOption
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpDepth:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pair:
          type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpTradingView:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pair:
          type: string
          nullable: true
        currentInterval:
          type: string
          nullable: true
        isVolumeHidden:
          type: boolean
          nullable: true
        chartStateByTheme:
          type: string
          nullable: true
        quickMarket:
          type: object
          nullable: true
          properties:
            location:
              $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.Location'
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpMessages:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        isUnreadOnly:
          type: boolean
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpPriceControl:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpMargin:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpOpenPositions:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        dateRange:
          oneOf:
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRange
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRangeWithOption
          nullable: true
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpMarketSummary:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pair:
          type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpAllMarkets:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpPlaceOrder:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pair:
          type: string
          nullable: true
        hasAdvancedView:
          type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpClosedPositions:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        dateRange:
          oneOf:
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRange
            - $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.DateRangeWithOption
          nullable: true
        orderType:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Enums.ApiOrderType
        timeInForce:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Enums.ApiOrderTimeInForce
        excludedColumns:
          type: array
          items:
            type: string
          nullable: true
        columnsOrder:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetsSettings.BbpAiAssistant:
      type: object
      allOf:
        - $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Layout.ApiTabModels.WidgetSettings
      properties:
        pair:
          type: string
          nullable: true
        isRecommendationExpanded:
          type: boolean
          nullable: true
        isForecastExpanded:
          type: boolean
          nullable: true
        isSignalDriversExpanded:
          type: boolean
          nullable: true
        isSuggestedActionsExpanded:
          type: boolean
          nullable: true
        isKeyMetricsExpanded:
          type: boolean
          nullable: true
      additionalProperties: false
