> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a portfolio-level VaR summary.

> Returns the portfolio summary and price-history count available for the identified VaR report. Caller
access and effective report restrictions are server-managed.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/VarReportQuery/PortfolioVarSummary
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/VarReportQuery/PortfolioVarSummary:
    post:
      tags:
        - VarReportQuery
      summary: Retrieve a portfolio-level VaR summary.
      description: >-
        Returns the portfolio summary and price-history count available for the
        identified VaR report. Caller

        access and effective report restrictions are server-managed.
      operationId: PortfolioVarSummary
      requestBody:
        description: >-
          The body containing the opaque `ReportId` and optional
          `PortfolioType`, `ConfidenceLevel`, `RowQuery`, and
          `WeightingVarDefinition`.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiVarReportQueryPortfolioVarSummaryRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiVarReportQueryPortfolioVarSummaryRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiVarReportQueryPortfolioVarSummaryRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiVarReportQueryPortfolioVarSummaryRequest'
      responses:
        '200':
          description: >-
            Returns the portfolio-level VaR summary and available price-history
            count.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiVarReportQueryPortfolioVarSummaryResponse
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiVarReportQueryPortfolioVarSummaryRequest:
      required:
        - $type
      type: object
      additionalProperties: false
      description: Requests portfolio-level VaR statistics for a report.
      properties:
        confidence_level:
          type: number
          description: >-
            Optional VaR confidence-level override expressed as a decimal
            fraction; null retains the report's configured level.
          format: double
          nullable: true
          example: 0.99
        row_query:
          $ref: '#/components/schemas/FilterBase'
        weighting_var_definition:
          $ref: '#/components/schemas/WeightingVarDefinition'
        row_restriction_filter:
          $ref: '#/components/schemas/FilterBase'
        full_report_filter:
          $ref: '#/components/schemas/MultiFilter'
        report_configuration:
          $ref: '#/components/schemas/VarReportConfiguration'
        report_id:
          type: string
          description: >-
            Opaque identifier of the report run to retrieve or query. The value
            must not be null or empty.
          nullable: true
        portfolio_type:
          enum:
            - derivitec
            - enfusion
            - orchestrade
            - liquidity_book
            - maia
            - fund_studio
            - not_set
          type: string
          description: >-
            Portfolio category used to resolve the requested portfolio. It may
            be omitted when the portfolio name resolves unambiguously.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryPortfolioVarSummaryRequest,
              Derivitec.Web.Core
    ApiVarReportQueryPortfolioVarSummaryResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        price_histories_count:
          type: integer
          description: Number of position price histories used to produce the query result.
          format: int32
        portfolio_var_statistics:
          $ref: '#/components/schemas/VarStatistics'
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryPortfolioVarSummaryResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: Returns portfolio-level VaR statistics for a report.
    FilterBase:
      description: Base selection criterion for a named report-data field.
      discriminator:
        propertyName: $type
        mapping:
          Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core: '#/components/schemas/FilterMintlifyShape'
          Derivitec.Web.Core.Filters.FilterBase, Derivitec.Web.Core: '#/components/schemas/FilterBaseMintlifyShape'
          Derivitec.Web.Core.Filters.MultiFilter, Derivitec.Web.Core: '#/components/schemas/MultiFilter'
          Derivitec.Web.Core.Filters.StringFilter, Derivitec.Web.Core: '#/components/schemas/StringFilter'
      oneOf:
        - $ref: '#/components/schemas/FilterMintlifyShape'
        - $ref: '#/components/schemas/FilterBaseMintlifyShape'
        - $ref: '#/components/schemas/MultiFilter'
        - $ref: '#/components/schemas/StringFilter'
    WeightingVarDefinition:
      required:
        - $type
      type: object
      properties:
        active:
          type: boolean
          description: Whether the VaR weighting configuration is enabled.
        window_length:
          type: integer
          description: Window-length value; no unit is established here.
          format: int32
        decay_period:
          type: integer
          description: Decay-period value; no unit is established here.
          format: int32
        scheme:
          enum:
            - exponentially_weighted
            - filtered_historical
          type: string
          description: Weighting scheme selected for the historical VaR configuration.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Reports.WeightingVarDefinition,
              Derivitec.Web.Core
      additionalProperties: false
      description: Configuration used to select VaR weighting behaviour.
    MultiFilter:
      required:
        - $type
      type: object
      properties:
        field:
          type: string
          description: Name of the report-data field evaluated by this criterion.
          nullable: true
        operator:
          enum:
            - not_set
            - and
            - or
          type: string
          description: Logical rule used to combine the child criteria.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FilterBase'
          description: >-
            Child criteria evaluated by the selected logical operator; nested
            groups are permitted.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.Filters.MultiFilter, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Nested filter group that combines child criteria with a logical
        operator.
    VarReportConfiguration:
      required:
        - $type
      type: object
      properties:
        name:
          type: string
          description: Display name for this report-query or export configuration.
          nullable: true
          example: Default
        row_query:
          $ref: '#/components/schemas/FilterBase'
        confidence_level:
          type: number
          description: >-
            Optional VaR confidence-level override expressed as a decimal
            fraction; null retains the report's configured level.
          format: double
          nullable: true
          example: 0.99
        weighting_var_definition:
          $ref: '#/components/schemas/WeightingVarDefinition'
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.VarReportConfiguration, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Optional named overrides used when querying or exporting a historical
        VaR report.
    VarStatistics:
      required:
        - $type
      type: object
      properties:
        component_var:
          type: number
          description: >-
            Component contribution to portfolio value at risk, in the enclosing
            report's value units.
          format: double
        component_var_pct:
          type: number
          description: >-
            Component value at risk as a percentage of the calculation value
            base; grouped rows use the enclosing portfolio's initial value.
          format: double
        expected_shortfall:
          type: number
          description: Expected shortfall in the enclosing report's value units.
          format: double
        expected_shortfall_pct:
          type: number
          description: >-
            Expected shortfall as a percentage of the calculation value base;
            grouped rows use the enclosing portfolio's initial value.
          format: double
        id:
          type: string
          description: >-
            Identifier of the portfolio, tradable, scenario, or group
            represented by these statistics.
          nullable: true
        marginal_var:
          type: number
          description: Marginal value at risk in the enclosing report's value units.
          format: double
        marginal_var_pct:
          type: number
          description: >-
            Marginal value at risk as a percentage of the calculation value
            base; grouped rows use the enclosing portfolio's initial value.
          format: double
        mean:
          type: number
          description: >-
            Mean of the P&L observations used for these statistics, in the
            enclosing report's value units.
          format: double
        message:
          type: string
          description: >-
            Diagnostic message when the statistics are invalid or incomplete;
            otherwise empty.
          nullable: true
        name:
          type: string
          description: >-
            Human-readable name of the portfolio, tradable, scenario, or group
            represented by these statistics.
          nullable: true
        std_dev:
          type: number
          description: >-
            Standard deviation of the P&L observations, in the enclosing
            report's value units.
          format: double
        std_dev_pct:
          type: number
          description: >-
            P&L standard deviation as a percentage of the calculation value
            base; grouped rows use the enclosing portfolio's initial value.
          format: double
        valid:
          type: boolean
          description: Whether the returned statistics were calculated successfully.
        var:
          type: number
          description: >-
            Value at risk at the enclosing report's confidence level, in the
            report's value units.
          format: double
        var_pct:
          type: number
          description: >-
            Value at risk as a percentage of the calculation value base; grouped
            rows use the enclosing portfolio's initial value.
          format: double
        worst_day:
          type: string
          description: >-
            Observation date associated with the minimum P&L observation in the
            returned history.
          format: date-time
        worst_day_index:
          type: integer
          description: >-
            Zero-based index of the minimum P&L observation in the returned
            history.
          format: int32
          example: 0
        worst_loss:
          type: number
          description: >-
            Minimum P&L observation capped at zero, in the enclosing report's
            value units; zero when every observation is positive.
          format: double
        aum:
          type: number
          description: >-
            Value base associated with this statistics row; grouped percentage
            fields use the enclosing portfolio's initial value instead.
          format: double
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.RiskEngine.VarStatistics, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Reports value-at-risk statistics for a portfolio, tradable, scenario, or
        aggregation group.
    FilterMintlifyShape:
      required:
        - $type
      type: object
      properties:
        field:
          type: string
          description: Name of the report-data field evaluated by this criterion.
          nullable: true
        type:
          type: string
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core
      additionalProperties: false
    FilterBaseMintlifyShape:
      required:
        - $type
      type: object
      properties:
        field:
          type: string
          description: Name of the report-data field evaluated by this criterion.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.Filters.FilterBase, Derivitec.Web.Core
      additionalProperties: false
      description: Base selection criterion for a named report-data field.
    StringFilter:
      required:
        - $type
      type: object
      properties:
        field:
          type: string
          description: Name of the report-data field evaluated by this criterion.
          nullable: true
        type:
          type: string
          nullable: true
        filter:
          type: string
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.Filters.StringFilter, Derivitec.Web.Core
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````