---
openapi: 3.0.1
info:
  title: Trading API v3
  description: APIs related to trading operations
  version: v3
paths:
  /frontoffice/api/v3/assets:
    get:
      tags:
        - AssetControllerV
      description: "Required operations: trading-ui"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Asset.ApiGetAssets.ResponseAsset'
  /frontoffice/api/v3/guest/assets:
    get:
      tags:
        - GuestAssetControllerV
      description: >-
        Anonymous counterpart of /frontoffice/api/v3/assets. No authentication
        and no required operations. Returns the same schema, restricted to
        CRM-source assets — liquidity-provider-only assets remain hidden.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.Asset.ApiGetAssets.ResponseAsset'
  /frontoffice/api/v3/assets/root-asset:
    get:
      tags:
        - AssetControllerV
      description: "Required operations: trading-ui"
      parameters:
        - name: accountId
          in: header
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.TradingServer.TradingApi.Models.RootAssetResponse'
components:
  schemas:
    BBP.TradingServer.TradingApi.Models.Asset.ApiGetAssets.ResponseAsset:
      type: object
      properties:
        assetId:
          type: string
        assetName:
          type: string
        isRootAsset:
          type: boolean
      additionalProperties: false
    BBP.TradingServer.TradingApi.Models.RootAssetResponse:
      type: object
      properties:
        rootAssetId:
          type: string
        scale:
          type: integer
          format: int32
      additionalProperties: false
