> ## 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 commodity market data.

> Use this operation to retrieve fully described commodity data for requested name/exchange identifiers and
market dates. Each commodity requires a matching descriptor that can request spot and per-contract futures
fixing windows; the descriptor defaults span all dates when its bounds are omitted. Results use the selected
provider and caller organisation scopes, and the operation is read-only.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/MarketData/GetCommodities
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/MarketData/GetCommodities:
    post:
      tags:
        - MarketData
      summary: Retrieve commodity market data.
      description: >-
        Use this operation to retrieve fully described commodity data for
        requested name/exchange identifiers and

        market dates. Each commodity requires a matching descriptor that can
        request spot and per-contract futures

        fixing windows; the descriptor defaults span all dates when its bounds
        are omitted. Results use the selected

        provider and caller organisation scopes, and the operation is read-only.
      operationId: GetCommodities
      requestBody:
        description: >-
          The query payload. `CommodityIds`, date-only `MarketDates`, and
          identifier-to-`Descriptor` pairs must be non-empty, with one
          descriptor for every requested commodity. Provider or environment
          fields optionally select an authorised source.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiGetCommoditiesRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiGetCommoditiesRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiGetCommoditiesRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiGetCommoditiesRequest'
      responses:
        '200':
          description: >-
            Returns available commodity assets with requested spot and futures
            history, or validation and unavailable-data errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetCommoditiesResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetCommoditiesRequest:
      required:
        - $type
      type: object
      properties:
        market_data_environment_name:
          type: string
          description: >-
            Name of the market-data environment to use. Supply either this name
            or `provider_id`, not both.
          nullable: true
          example: Example market data
        provider_id:
          type: string
          description: >-
            Opaque identifier of the market-data provider to use. Supply either
            this identifier or `market_data_environment_name`, not both.
          nullable: true
        commodity_ids:
          type: array
          items:
            $ref: '#/components/schemas/CommodityId'
          description: Commodity IDs selecting the requested commodities.
          nullable: true
        market_dates:
          type: array
          items:
            type: string
            format: date-time
          description: Market dates on which commodities are requested.
          nullable: true
        descriptors:
          type: array
          items:
            $ref: '#/components/schemas/CommodityIdCommodityDescriptorKeyValuePair'
          description: Structured selectors for the requested commodities.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Queries commodity market data by identifier or descriptor across market
        dates.
    ApiGetCommoditiesResponse:
      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
        commodities:
          type: array
          items:
            $ref: '#/components/schemas/Commodity'
          description: Commodity market-data records returned by the query.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCommoditiesResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: Returns commodity market-data records and query errors.
    CommodityId:
      required:
        - $type
      type: object
      properties:
        name:
          type: string
          description: Display name.
          nullable: true
        exchange:
          type: string
          description: Exchange component of the commodity key.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core
      additionalProperties: false
      description: Commodity business key formed from name and exchange.
    CommodityIdCommodityDescriptorKeyValuePair:
      type: object
      properties:
        key:
          $ref: '#/components/schemas/CommodityId'
        value:
          $ref: '#/components/schemas/CommodityDescriptor'
      additionalProperties: false
    Commodity:
      required:
        - $type
      type: object
      properties:
        provider_id:
          type: string
          description: >-
            Market-data provider code recorded as the source of the
            contribution. Defaults to Derivitec.
          nullable: true
        derivitec_created:
          type: string
          description: Timestamp at which the market-data record was created.
        derivitec_modified:
          type: string
          description: Optional timestamp of the record's latest modification.
          nullable: true
        uploaded_date_time:
          type: string
          description: >-
            Optional timestamp at which the contribution was uploaded.
            UploadRateAssets ignores the supplied value on each rate asset and
            stores the current UTC time.
          nullable: true
        derivitec_modified_by:
          type: string
          description: >-
            Principal recorded as the latest modifier. UploadRateAssets ignores
            the supplied value on each rate asset and stores the authenticated
            user identifier.
          nullable: true
        uploaded_by:
          type: string
          description: >-
            Principal recorded as the uploader. UploadRateAssets ignores the
            supplied value on each rate asset and stores the authenticated user
            identifier.
          nullable: true
        rolled:
          type: boolean
          description: Whether the contribution has been rolled.
          example: false
        reference_date:
          type: string
          description: Date to which the data applies.
          format: date-time
        commodity_id:
          $ref: '#/components/schemas/CommodityId'
        convenience_yield_curve:
          $ref: '#/components/schemas/ConvenienceYieldCurve'
        discount_curve:
          $ref: '#/components/schemas/DiscountCurve'
        fixings:
          $ref: '#/components/schemas/Fixings'
        futures_date:
          type: string
          description: Futures date for this observation.
          format: date-time
        futures_price:
          type: number
          description: Futures price carried with FuturesDate.
          format: double
        roll_fixing:
          type: number
          description: Fixing used at the commodity roll.
          format: double
        settlement_calendar:
          $ref: '#/components/schemas/Calendar'
        settlement_lag:
          type: integer
          description: Settlement lag encoded by the model.
          format: int32
        fixings_by_futures_code:
          type: array
          items:
            $ref: '#/components/schemas/StringFixingsKeyValuePair'
          description: Commodity fixings grouped by futures code.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.Commodity, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Commodity market state containing futures inputs, curves, fixings, and
        settlement terms.
    CommodityDescriptor:
      required:
        - $type
      type: object
      properties:
        spot_fixing_end_date:
          type: string
          description: Spot fixing end date for this observation.
          format: date-time
        spot_fixing_start_date:
          type: string
          description: Spot fixing start date for this observation.
          format: date-time
        futures_fixing_start_end_dates:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DateTimeDateTimeTuple'
          description: Futures-fixing date windows keyed by futures code.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.CommodityDescriptor,
              Derivitec.Web.Core
      additionalProperties: false
      description: Date-window selectors used to retrieve commodity fixings.
    ConvenienceYieldCurve:
      required:
        - $type
      type: object
      properties:
        provider_id:
          type: string
          description: >-
            Market-data provider code recorded as the source of the
            contribution. Defaults to Derivitec.
          nullable: true
        derivitec_created:
          type: string
          description: Timestamp at which the market-data record was created.
        derivitec_modified:
          type: string
          description: Optional timestamp of the record's latest modification.
          nullable: true
        uploaded_date_time:
          type: string
          description: >-
            Optional timestamp at which the contribution was uploaded.
            UploadRateAssets ignores the supplied value on each rate asset and
            stores the current UTC time.
          nullable: true
        derivitec_modified_by:
          type: string
          description: >-
            Principal recorded as the latest modifier. UploadRateAssets ignores
            the supplied value on each rate asset and stores the authenticated
            user identifier.
          nullable: true
        uploaded_by:
          type: string
          description: >-
            Principal recorded as the uploader. UploadRateAssets ignores the
            supplied value on each rate asset and stores the authenticated user
            identifier.
          nullable: true
        rolled:
          type: boolean
          description: Whether the contribution has been rolled.
          example: false
        commodity_id:
          $ref: '#/components/schemas/CommodityId'
        discount_factors:
          type: array
          items:
            type: number
            format: double
          description: Dimensionless convenience factors paired by index with Maturities.
          nullable: true
        extrapolate:
          type: boolean
          description: >-
            Whether the curve may be evaluated beyond its supplied maturities;
            initialized to true.
        maturities:
          type: array
          items:
            type: integer
            format: int32
          description: >-
            Maturities expressed as day offsets and paired by index with
            DiscountFactors.
          nullable: true
        value_date:
          type: string
          description: Curve value date.
          format: date-time
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ConvenienceYieldCurve,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Commodity convenience-yield curve represented by day-offset maturities
        and dimensionless factors.
    DiscountCurve:
      required:
        - $type
      type: object
      properties:
        provider_id:
          type: string
          description: >-
            Market-data provider code recorded as the source of the
            contribution. Defaults to Derivitec.
          nullable: true
        derivitec_created:
          type: string
          description: Timestamp at which the market-data record was created.
        derivitec_modified:
          type: string
          description: Optional timestamp of the record's latest modification.
          nullable: true
        uploaded_date_time:
          type: string
          description: >-
            Optional timestamp at which the contribution was uploaded.
            UploadRateAssets ignores the supplied value on each rate asset and
            stores the current UTC time.
          nullable: true
        derivitec_modified_by:
          type: string
          description: >-
            Principal recorded as the latest modifier. UploadRateAssets ignores
            the supplied value on each rate asset and stores the authenticated
            user identifier.
          nullable: true
        uploaded_by:
          type: string
          description: >-
            Principal recorded as the uploader. UploadRateAssets ignores the
            supplied value on each rate asset and stores the authenticated user
            identifier.
          nullable: true
        rolled:
          type: boolean
          description: Whether the contribution has been rolled.
          example: false
        currency:
          type: string
          description: Currency represented by the discount curve.
          nullable: true
        curve_name:
          type: string
          description: Name distinguishing the curve within its currency.
          nullable: true
        discount_factors:
          type: array
          items:
            type: number
            format: double
          description: Dimensionless discount factors paired by index with Maturities.
          nullable: true
        extrapolate:
          type: boolean
          description: >-
            Whether the curve may be evaluated beyond its supplied maturities;
            initialized to true.
        maturities:
          type: array
          items:
            type: integer
            format: int32
          description: >-
            Maturities expressed as day offsets and paired by index with
            DiscountFactors.
          nullable: true
        value_date:
          type: string
          description: Curve value date.
          format: date-time
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.DiscountCurve, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Named currency discount curve represented by day-offset maturities and
        dimensionless discount factors.
    Fixings:
      required:
        - $type
      type: object
      properties:
        asset_id:
          type: string
          description: Series code to which the fixing observations belong.
          nullable: true
        dates:
          type: array
          items:
            type: string
          description: Observation dates in the fixing series.
          nullable: true
        values:
          type: array
          items:
            type: number
            format: double
          description: Observed values in the fixing series.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.Fixings, Derivitec.Web.Core
      additionalProperties: false
      description: Dated observations for one market-data series.
    Calendar:
      description: Named business-day calendar with holiday dates and weekend treatment.
      discriminator:
        propertyName: $type
        mapping:
          Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core: '#/components/schemas/CalendarMintlifyShape'
          Derivitec.Web.Core.StaticData.CalendarIntersection, Derivitec.Web.Core: '#/components/schemas/CalendarIntersection'
          Derivitec.Web.Core.StaticData.CalendarUnion, Derivitec.Web.Core: '#/components/schemas/CalendarUnion'
      oneOf:
        - $ref: '#/components/schemas/CalendarMintlifyShape'
        - $ref: '#/components/schemas/CalendarIntersection'
        - $ref: '#/components/schemas/CalendarUnion'
    StringFixingsKeyValuePair:
      type: object
      properties:
        key:
          type: string
          nullable: true
        value:
          $ref: '#/components/schemas/Fixings'
      additionalProperties: false
    DateTimeDateTimeTuple:
      type: object
      properties:
        item1:
          type: string
          format: date-time
        item2:
          type: string
          format: date-time
      additionalProperties: false
    CalendarMintlifyShape:
      required:
        - $type
      type: object
      properties:
        holidays:
          type: array
          items:
            type: string
            format: date-time
          description: Dates treated as holidays by the calendar.
          nullable: true
        include_weekends:
          type: boolean
          description: >-
            Whether weekend dates are included in the calendar's
            non-business-day set.
        name:
          type: string
          description: Name of the business-day calendar.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core
      additionalProperties: false
      description: Named business-day calendar with holiday dates and weekend treatment.
    CalendarIntersection:
      required:
        - $type
      type: object
      properties:
        holidays:
          type: array
          items:
            type: string
            format: date-time
          description: Dates treated as holidays by the calendar.
          nullable: true
        include_weekends:
          type: boolean
          description: >-
            Whether weekend dates are included in the calendar's
            non-business-day set.
        name:
          type: string
          description: Name of the business-day calendar.
          nullable: true
        calendars:
          type: array
          items:
            $ref: '#/components/schemas/Calendar'
          description: Gets or sets the list of underlying calendars in the intersection.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.StaticData.CalendarIntersection,
              Derivitec.Web.Core
      additionalProperties: false
      description: The calendar intersection.
    CalendarUnion:
      required:
        - $type
      type: object
      properties:
        holidays:
          type: array
          items:
            type: string
            format: date-time
          description: Dates treated as holidays by the calendar.
          nullable: true
        include_weekends:
          type: boolean
          description: >-
            Whether weekend dates are included in the calendar's
            non-business-day set.
        name:
          type: string
          description: Name of the business-day calendar.
          nullable: true
        calendars:
          type: array
          items:
            $ref: '#/components/schemas/Calendar'
          description: Gets or sets the list of underlying calendars in the union.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.StaticData.CalendarUnion, Derivitec.Web.Core
      additionalProperties: false
      description: The calendar union.
  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

````