---
openapi: 3.0.1
info:
  title: Trading API v3
  description: APIs related to trading operations
  version: v3
paths:
  /frontoffice/api/v3/ui/settings:
    get:
      tags:
        - SettingsControllerV
      description: "Required operations: trading-ui"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiGetSettings.Response'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    patch:
      tags:
        - SettingsControllerV
      description: "Required operations: trading-ui"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiUpdateSettings.Request'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
  /frontoffice/api/v3/ui/system-settings:
    get:
      tags:
        - SettingsControllerV
      description: "Required operations: trading-ui"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiGetSystemSettings.Response'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
  /frontoffice/api/v3/guest/ui/system-settings:
    get:
      tags:
        - GuestSystemSettingsControllerV
      description: >-
        Anonymous counterpart of GET /frontoffice/api/v3/ui/system-settings. No
        authentication and no required operations. Returns the same tenant-wide
        settings and the same schema. There is no guest counterpart of
        /frontoffice/api/v3/ui/settings, which is per-user.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiGetSystemSettings.Response'
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.TradingApi.Models.Ui.Settings.ApiGetSettings.Response:
      required:
        - is24HTimeFormatUsed
        - isIntroductionTourCompleted
        - theme
      type: object
      properties:
        selectedLayoutId:
          type: string
          nullable: true
        isIntroductionTourCompleted:
          type: boolean
        is24HTimeFormatUsed:
          type: boolean
        theme:
          minLength: 1
          type: string
        oneClickTrading:
          $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingSettings'
        chart:
          type: object
          nullable: true
          required:
            - ordersAndTriggers
            - positions
            - executedOrders
            - quickMarket
            - dragAndDropTriggers
          properties:
            ordersAndTriggers:
              type: object
              required:
                - isEnabled
              properties:
                isEnabled:
                  type: boolean
            positions:
              type: object
              required:
                - isEnabled
              properties:
                isEnabled:
                  type: boolean
            executedOrders:
              type: object
              required:
                - isEnabled
                - excludedColumns
                - columnsOrder
              properties:
                isEnabled:
                  type: boolean
                excludedColumns:
                  type: array
                  items:
                    type: string
                  default: null
                  nullable: true
                columnsOrder:
                  type: array
                  items:
                    type: string
                  default: null
                  nullable: true
            quickMarket:
              $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiUpdateSettings.QuickMarket'
            dragAndDropTriggers:
              type: object
              required:
                - isEnabled
              properties:
                isEnabled:
                  type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiUpdateSettings.Request:
      type: object
      properties:
        selectedLayoutId:
          type: string
          nullable: true
        isIntroductionTourCompleted:
          type: boolean
          nullable: true
        is24HTimeFormatUsed:
          type: boolean
          nullable: true
        theme:
          type: string
          nullable: true
        oneClickTrading:
          $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingSettings'
        chart:
          type: object
          nullable: true
          properties:
            ordersAndTriggers:
              type: object
              properties:
                isEnabled:
                  type: boolean
                  nullable: true
            positions:
              type: object
              properties:
                isEnabled:
                  type: boolean
                  nullable: true
            executedOrders:
              type: object
              properties:
                isEnabled:
                  type: boolean
                  nullable: true
                excludedColumns:
                  type: array
                  items:
                    type: string
                  nullable: true
                columnsOrder:
                  type: array
                  items:
                    type: string
                  nullable: true
            quickMarket:
              $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiUpdateSettings.QuickMarket'
            dragAndDropTriggers:
              type: object
              properties:
                isEnabled:
                  type: boolean
                  nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiUpdateSettings.QuickMarket:
      type: object
      nullable: true
      required:
        - isEnabled
      properties:
        isEnabled:
          type: boolean
          nullable: false
        amountPresets:
          type: array
          nullable: true
          items:
            type: number
          example: [50, 100, 500, 1000]
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingSettings:
      type: object
      required:
        - positions
        - orders
      properties:
        positions:
          $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingItem'
        orders:
          $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingItem'
        limitPriceCrossTobWarning:
          $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingItem'
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Settings.OneClickTradingItem:
      type: object
      required:
        - isEnabled
      properties:
        isEnabled:
          type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Ui.Settings.ApiGetSystemSettings.Response:
      type: object
      required:
        - isCategoriesInHeaderEnabled
      properties:
        isCategoriesInHeaderEnabled:
          type: boolean
          description: This flag indicates the display status of categories in the header of the trading (web) application.
      additionalProperties: false
