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

# Get Commodity Metric Values

> Get the values over time for the metrics you choose..

Requires the `get-commodity-prices` scope.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/commodities/metric-values
openapi: 3.1.0
info:
  title: Orbbit Data API
  version: '1.0'
  description: Commodity prices and packaged-food labels over one read-only REST API.
servers:
  - url: https://data-api.orbbit.co
    description: Production
security:
  - bearer: []
tags:
  - name: Commodities
  - name: Branded Food
paths:
  /v1/commodities/metric-values:
    get:
      tags:
        - Commodities
      summary: Get Commodity Metric Values
      description: |-
        Get the values over time for the metrics you choose..

        Requires the `get-commodity-prices` scope.
      operationId: get_commodity_metric_values
      parameters:
        - name: to
          required: false
          in: query
          description: >-
            YYYY-MM-DD, inclusive. Absent means up to each metric's newest
            value; without from, the default range is counted back from this
            date
          schema:
            type: string
        - name: from
          required: false
          in: query
          description: >-
            YYYY-MM-DD, inclusive. Absent means each metric starts 1 year
            (daily, weekly, biweekly), 5 years (monthly) or 10 years (annual)
            before to, or before its newest value; pass an early date such as
            1990-01-01 for full history
          schema:
            type: string
        - name: metrics
          required: true
          in: query
          description: Comma-separated metric names, at most 100
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPricesResponseDto'
              example:
                data:
                  - metric_name: >-
                      cheese_block_cheddar_40_lb_us_chicago_wholesale_daily_close_price_usd_per_lb
                    unit: usd_per_lb
                    from: '2026-08-19'
                    to: '2026-08-21'
                    points:
                      - date: '2026-08-19'
                        value: 1.575
                      - date: '2026-08-20'
                        value: 1.5325
                      - date: '2026-08-21'
                        value: 1.5275
        '400':
          description: >-
            Unknown metric (named), more than 100 metrics, an unknown parameter,
            bad date, or from after to
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
              example:
                error:
                  type: invalid_request
                  message: 'Unknown metrics: cheddar_close'
        '401':
          description: Missing, malformed, unknown, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
              example:
                error:
                  type: unauthorized
                  message: 'Missing or malformed Authorization: Bearer header'
        '402':
          description: >-
            The balance, or the key's monthly spend limit, cannot cover this
            call
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
              example:
                error:
                  type: insufficient_balance
                  message: Insufficient balance
        '403':
          description: The key is not scoped to this route
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorDto'
              example:
                error:
                  type: forbidden
                  message: This key is not scoped to get-commodity-prices
      security:
        - bearer: []
components:
  schemas:
    GetPricesResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              metric_name:
                type: string
              unit:
                type: string
              from:
                anyOf:
                  - type: string
                  - type: 'null'
              to:
                anyOf:
                  - type: string
                  - type: 'null'
              points:
                type: array
                items:
                  type: object
                  properties:
                    date:
                      type: string
                    value:
                      type: number
                  required:
                    - date
                    - value
            required:
              - metric_name
              - unit
              - from
              - to
              - points
          x-nestjs_zod-uses-3-point-1-syntax: true
      required:
        - data
    PublicApiErrorDto:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
          required:
            - type
            - message
          x-nestjs_zod-self-required: true
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your API key, which starts with `orbbit_data_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.