> ## 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.

# Get commodities



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/MarketData/GetCommodities
openapi: 3.0.1
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - description: Derivitec Server
    url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
paths:
  /api/MarketData/GetCommodities:
    post:
      tags:
        - MarketData
      summary: Get commodities
      operationId: GetCommodities
      requestBody:
        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':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetCommoditiesResponse'
          description: Success
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetCommoditiesRequest:
      example:
        descriptors:
          - value:
              spot_fixing_end_date: '2000-01-23T04:56:07.000+00:00'
              spot_fixing_start_date: '2000-01-23T04:56:07.000+00:00'
              futures_fixing_start_end_dates:
                key:
                  item2: '2000-01-23T04:56:07.000+00:00'
                  item1: '2000-01-23T04:56:07.000+00:00'
            key:
              name: name
              exchange: exchange
          - value:
              spot_fixing_end_date: '2000-01-23T04:56:07.000+00:00'
              spot_fixing_start_date: '2000-01-23T04:56:07.000+00:00'
              futures_fixing_start_end_dates:
                key:
                  item2: '2000-01-23T04:56:07.000+00:00'
                  item1: '2000-01-23T04:56:07.000+00:00'
            key:
              name: name
              exchange: exchange
        commodity_ids:
          - name: name
            exchange: exchange
          - name: name
            exchange: exchange
        market_dates:
          - '2000-01-23T04:56:07.000+00:00'
          - '2000-01-23T04:56:07.000+00:00'
      properties:
        market_data_environment_name:
          nullable: true
          type: string
        provider_id:
          nullable: true
          type: string
        commodity_ids:
          items:
            $ref: '#/components/schemas/CommodityId'
          nullable: true
          type: array
        market_dates:
          items:
            format: date-time
            type: string
          nullable: true
          type: array
        descriptors:
          items:
            $ref: '#/components/schemas/CommodityIdCommodityDescriptorKeyValuePair'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest,
              Derivitec.Web.Core
      required:
        - $type
      type: object
    ApiGetCommoditiesResponse:
      example:
        commodities:
          - futures_date: '2000-01-23T04:56:07.000+00:00'
            fixings:
              values:
                - 2.3021358869347655
                - 2.3021358869347655
              dates:
                - dates
                - dates
              asset_id: asset_id
            commodity_id:
              name: name
              exchange: exchange
            fixings_by_futures_code:
              - value:
                  values:
                    - 2.3021358869347655
                    - 2.3021358869347655
                  dates:
                    - dates
                    - dates
                  asset_id: asset_id
                key: key
              - value:
                  values:
                    - 2.3021358869347655
                    - 2.3021358869347655
                  dates:
                    - dates
                    - dates
                  asset_id: asset_id
                key: key
            roll_fixing: 9.018348186070783
            settlement_lag: 6
            futures_price: 8.762042012749001
            convenience_yield_curve:
              commodity_id:
                name: name
                exchange: exchange
              maturities:
                - 6
                - 6
              discount_factors:
                - 9.369310271410669
                - 9.369310271410669
              extrapolate: true
              value_date: '2000-01-23T04:56:07.000+00:00'
            discount_curve:
              curve_name: curve_name
              maturities:
                - 3
                - 3
              discount_factors:
                - 9.301444243932576
                - 9.301444243932576
              currency: currency
              extrapolate: true
              value_date: '2000-01-23T04:56:07.000+00:00'
            settlement_calendar:
              holidays:
                - '2000-01-23T04:56:07.000+00:00'
                - '2000-01-23T04:56:07.000+00:00'
              name: name
              include_weekends: true
          - futures_date: '2000-01-23T04:56:07.000+00:00'
            fixings:
              values:
                - 2.3021358869347655
                - 2.3021358869347655
              dates:
                - dates
                - dates
              asset_id: asset_id
            commodity_id:
              name: name
              exchange: exchange
            fixings_by_futures_code:
              - value:
                  values:
                    - 2.3021358869347655
                    - 2.3021358869347655
                  dates:
                    - dates
                    - dates
                  asset_id: asset_id
                key: key
              - value:
                  values:
                    - 2.3021358869347655
                    - 2.3021358869347655
                  dates:
                    - dates
                    - dates
                  asset_id: asset_id
                key: key
            roll_fixing: 9.018348186070783
            settlement_lag: 6
            futures_price: 8.762042012749001
            convenience_yield_curve:
              commodity_id:
                name: name
                exchange: exchange
              maturities:
                - 6
                - 6
              discount_factors:
                - 9.369310271410669
                - 9.369310271410669
              extrapolate: true
              value_date: '2000-01-23T04:56:07.000+00:00'
            discount_curve:
              curve_name: curve_name
              maturities:
                - 3
                - 3
              discount_factors:
                - 9.301444243932576
                - 9.301444243932576
              currency: currency
              extrapolate: true
              value_date: '2000-01-23T04:56:07.000+00:00'
            settlement_calendar:
              holidays:
                - '2000-01-23T04:56:07.000+00:00'
                - '2000-01-23T04:56:07.000+00:00'
              name: name
              include_weekends: true
      properties:
        is_success:
          type: boolean
        error_messages:
          items:
            type: string
          nullable: true
          type: array
        commodities:
          items:
            $ref: '#/components/schemas/Commodity'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCommoditiesResponse,
              Derivitec.Web.Core
      required:
        - $type
      type: object
    CommodityId:
      example:
        name: name
        exchange: exchange
      properties:
        name:
          nullable: true
          type: string
        exchange:
          nullable: true
          type: string
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core
      required:
        - $type
      type: object
    CommodityIdCommodityDescriptorKeyValuePair:
      example:
        value:
          spot_fixing_end_date: '2000-01-23T04:56:07.000+00:00'
          spot_fixing_start_date: '2000-01-23T04:56:07.000+00:00'
          futures_fixing_start_end_dates:
            key:
              item2: '2000-01-23T04:56:07.000+00:00'
              item1: '2000-01-23T04:56:07.000+00:00'
        key:
          name: name
          exchange: exchange
      properties:
        key:
          $ref: '#/components/schemas/CommodityId'
        value:
          $ref: '#/components/schemas/CommodityDescriptor'
      type: object
    Commodity:
      example:
        futures_date: '2000-01-23T04:56:07.000+00:00'
        fixings:
          values:
            - 2.3021358869347655
            - 2.3021358869347655
          dates:
            - dates
            - dates
          asset_id: asset_id
        commodity_id:
          name: name
          exchange: exchange
        fixings_by_futures_code:
          - value:
              values:
                - 2.3021358869347655
                - 2.3021358869347655
              dates:
                - dates
                - dates
              asset_id: asset_id
            key: key
          - value:
              values:
                - 2.3021358869347655
                - 2.3021358869347655
              dates:
                - dates
                - dates
              asset_id: asset_id
            key: key
        roll_fixing: 9.018348186070783
        settlement_lag: 6
        futures_price: 8.762042012749001
        convenience_yield_curve:
          commodity_id:
            name: name
            exchange: exchange
          maturities:
            - 6
            - 6
          discount_factors:
            - 9.369310271410669
            - 9.369310271410669
          extrapolate: true
          value_date: '2000-01-23T04:56:07.000+00:00'
        discount_curve:
          curve_name: curve_name
          maturities:
            - 3
            - 3
          discount_factors:
            - 9.301444243932576
            - 9.301444243932576
          currency: currency
          extrapolate: true
          value_date: '2000-01-23T04:56:07.000+00:00'
        settlement_calendar:
          holidays:
            - '2000-01-23T04:56:07.000+00:00'
            - '2000-01-23T04:56:07.000+00:00'
          name: name
          include_weekends: true
      properties:
        provider_id:
          nullable: true
          type: string
        reference_date:
          format: date-time
          type: string
        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:
          format: date-time
          type: string
        futures_price:
          format: double
          type: number
        roll_fixing:
          format: double
          type: number
        settlement_calendar:
          $ref: '#/components/schemas/Calendar'
        settlement_lag:
          format: int32
          type: integer
        fixings_by_futures_code:
          items:
            $ref: '#/components/schemas/StringFixingsKeyValuePair'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.Commodity, Derivitec.Web.Core
      required:
        - $type
      type: object
    CommodityDescriptor:
      example:
        spot_fixing_end_date: '2000-01-23T04:56:07.000+00:00'
        spot_fixing_start_date: '2000-01-23T04:56:07.000+00:00'
        futures_fixing_start_end_dates:
          key:
            item2: '2000-01-23T04:56:07.000+00:00'
            item1: '2000-01-23T04:56:07.000+00:00'
      properties:
        spot_fixing_end_date:
          format: date-time
          type: string
        spot_fixing_start_date:
          format: date-time
          type: string
        futures_fixing_start_end_dates:
          additionalProperties:
            $ref: '#/components/schemas/DateTimeDateTimeTuple'
          nullable: true
          type: object
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.CommodityDescriptor,
              Derivitec.Web.Core
      required:
        - $type
      type: object
    ConvenienceYieldCurve:
      example:
        commodity_id:
          name: name
          exchange: exchange
        maturities:
          - 6
          - 6
        discount_factors:
          - 9.369310271410669
          - 9.369310271410669
        extrapolate: true
        value_date: '2000-01-23T04:56:07.000+00:00'
      properties:
        provider_id:
          nullable: true
          type: string
        commodity_id:
          $ref: '#/components/schemas/CommodityId'
        discount_factors:
          items:
            format: double
            type: number
          nullable: true
          type: array
        extrapolate:
          type: boolean
        maturities:
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        value_date:
          format: date-time
          type: string
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ConvenienceYieldCurve,
              Derivitec.Web.Core
      required:
        - $type
      type: object
    DiscountCurve:
      example:
        curve_name: curve_name
        maturities:
          - 3
          - 3
        discount_factors:
          - 9.301444243932576
          - 9.301444243932576
        currency: currency
        extrapolate: true
        value_date: '2000-01-23T04:56:07.000+00:00'
      properties:
        provider_id:
          nullable: true
          type: string
        currency:
          nullable: true
          type: string
        curve_name:
          nullable: true
          type: string
        discount_factors:
          items:
            format: double
            type: number
          nullable: true
          type: array
        extrapolate:
          type: boolean
        maturities:
          items:
            format: int32
            type: integer
          nullable: true
          type: array
        value_date:
          format: date-time
          type: string
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.DiscountCurve, Derivitec.Web.Core
      required:
        - $type
      type: object
    Fixings:
      example:
        values:
          - 2.3021358869347655
          - 2.3021358869347655
        dates:
          - dates
          - dates
        asset_id: asset_id
      properties:
        asset_id:
          nullable: true
          type: string
        dates:
          items:
            type: string
          nullable: true
          type: array
        values:
          items:
            format: double
            type: number
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.Fixings, Derivitec.Web.Core
      required:
        - $type
      type: object
    Calendar:
      discriminator:
        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'
        propertyName: $type
      oneOf:
        - $ref: '#/components/schemas/CalendarMintlifyShape'
        - $ref: '#/components/schemas/CalendarIntersection'
        - $ref: '#/components/schemas/CalendarUnion'
    StringFixingsKeyValuePair:
      example:
        value:
          values:
            - 2.3021358869347655
            - 2.3021358869347655
          dates:
            - dates
            - dates
          asset_id: asset_id
        key: key
      properties:
        key:
          nullable: true
          type: string
        value:
          $ref: '#/components/schemas/Fixings'
      type: object
    DateTimeDateTimeTuple:
      example:
        item2: '2000-01-23T04:56:07.000+00:00'
        item1: '2000-01-23T04:56:07.000+00:00'
      properties:
        item1:
          format: date-time
          type: string
        item2:
          format: date-time
          type: string
      type: object
    CalendarMintlifyShape:
      example:
        holidays:
          - '2000-01-23T04:56:07.000+00:00'
          - '2000-01-23T04:56:07.000+00:00'
        name: name
        include_weekends: true
      properties:
        holidays:
          items:
            format: date-time
            type: string
          nullable: true
          type: array
        include_weekends:
          type: boolean
        name:
          nullable: true
          type: string
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core
      required:
        - $type
      type: object
    CalendarIntersection:
      properties:
        holidays:
          items:
            format: date-time
            type: string
          nullable: true
          type: array
        include_weekends:
          type: boolean
        name:
          nullable: true
          type: string
        calendars:
          items:
            $ref: '#/components/schemas/Calendar'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.StaticData.CalendarIntersection,
              Derivitec.Web.Core
      required:
        - $type
      type: object
    CalendarUnion:
      properties:
        holidays:
          items:
            format: date-time
            type: string
          nullable: true
          type: array
        include_weekends:
          type: boolean
        name:
          nullable: true
          type: string
        calendars:
          items:
            $ref: '#/components/schemas/Calendar'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.StaticData.CalendarUnion, Derivitec.Web.Core
      required:
        - $type
      type: object
  securitySchemes:
    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: {}
      type: oauth2
    apikey:
      description: API-Key requested via the site and provided as a header
      in: header
      name: x-api-key
      type: apiKey

````