---
openapi: 3.0.1
info:
  title: Trading API v3
  description: APIs related to trading operations
  version: v3
paths:
  /frontoffice/api/v3/notification-subscriptions/marketPrice/markets:
    post:
      tags:
        - NotificationSubscriptionControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: accountId
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
  /frontoffice/api/v3/notification-subscriptions/marketPrice:
    post:
      tags:
        - NotificationSubscriptionControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: accountId
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiCreateMarketPriceSubscriptionContract.Request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiCreateMarketPriceSubscriptionContract.Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
    delete:
      tags:
        - NotificationSubscriptionControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: accountId
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiMarketPriceDeleteContract.Request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiMarketPriceDeleteContract.Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'
        '500':
          description: Internal Server Error
          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.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Request:
      type: object
      properties:
        marketIds:
          type: array
          items:
            type: string
          nullable: true
        limit:
          type: integer
          format: int32
          nullable: true
        offset:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Response:
      type: object
      properties:
        markets:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Response.MarketsListItem
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Response.MarketsListItem:
      type: object
      properties:
        marketId:
          type: string
        subscriptions:
          type: array
          items:
            $ref: >-
              #/components/schemas/BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Response.SubscriptionListItem
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiGetMarketPriceMarketsContract.Response.SubscriptionListItem:
      type: object
      properties:
        id:
          type: string
        price:
          type: string
        condition:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Enums.ApiTriggerCondition
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.Enums.ApiTriggerCondition:
      enum:
        - Gte
        - Lte
      type: string
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiCreateMarketPriceSubscriptionContract.Request:
      type: object
      properties:
        marketId:
          type: string
          nullable: true
        price:
          type: string
          nullable: true
        condition:
          $ref: >-
            #/components/schemas/BBP.TradingServer.TradingApi.Models.Enums.ApiTriggerCondition
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiCreateMarketPriceSubscriptionContract.Response:
      type: object
      properties:
        id:
          type: string
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiMarketPriceDeleteContract.Request:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.NotificationSubscription.ApiMarketPriceDeleteContract.Response:
      type: object
      additionalProperties: false
