Commodity Price API

Class III Milk Futures Price API

Class III Milk futures represent the price of milk used for cheese production, the most widely traded dairy commodity in the US. Class III Milk futures trade on CME and are priced in USD per hundredweight. The Class III Milk Price API provides real-time dairy futures market data for dairy farmers, cheese producers, and commodity traders.

Use Cases

  • Track milk prices for dairy farm revenue management
  • Build dairy commodity dashboards for agricultural businesses
  • Monitor Class III milk futures for cheese production cost analysis
  • Integrate milk pricing into dairy supply chain management tools

/v1/commodityprice GET

https://api.api-ninjas.com/v1/commodityprice


Parameters

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object with the following fields or an error if the request is unsuccessful.

  • exchange

    The symbol of the exchange where the commodity is traded (e.g., CME).

  • name

    The name of the commodity.

  • price

    The current price of the commodity in USD.

  • updated

    The Unix timestamp of the price update.

Sample Request Live Demo!

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/commodityprice?name=class_3_milk

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/commodityprice?name=class_3_milk" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed above, you can still make API calls by using any HTTP request library and following the documentation above.


/v1/commoditypricehistorical GET Premium Only

https://api.api-ninjas.com/v1/commoditypricehistorical

Returns historical Class III Milk Futures futures price data in OHLCV (Open, High, Low, Close, Volume) format. Data is returned in descending order (most recent first), and all prices are in USD.

Parameters

  • name  required

    Use class_3_milk for Class III Milk Futures.

  • period  optional

    Time interval between data points. Valid values: 1m, 5m, 15m, 30m, 1h, 4h, 1d. Default is 1h.

  • start  optional

    Start timestamp in Unix format. Defaults to 24 hours ago.

  • end  optional

    End timestamp in Unix format. Defaults to current time.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects or an error if the request is unsuccessful.

  • open

    Opening price in USD.

  • high

    Highest price in USD.

  • low

    Lowest price in USD.

  • close

    Closing price in USD.

  • volume

    Trading volume.

  • time

    Unix timestamp of the period.

Sample Request Live Demo!

period
start
end

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/commoditypricehistorical?name=class_3_milk&period=1h

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/commoditypricehistorical?name=class_3_milk&period=1h" \ -H "X-Api-Key: YOUR_API_KEY"