NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server
Commodity Price API

Wheat Futures Price API

Wheat is one of the world's most important staple crops, used for flour, bread, pasta, and animal feed. Wheat futures are priced in US cents per bushel. Wheat prices are sensitive to weather events, global supply and demand, and geopolitical factors. The Wheat Price API provides wheat futures market data for agricultural and food industry applications.

(4.3)

From 9,027 users

4,300+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
224ms250ms293ms578ms1165ms

Didn't find what you were looking for? Suggest an improvement


/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 our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

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

Headers

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

Sample Response

JSON
{
    exchange:"CME",
    name:"Wheat Futures",
    price:552.75,
    updated:1741046400
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/commodityprice?name=wheat" \ -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 Wheat 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 wheat for Wheat 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 our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

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

Headers

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

Sample Response

JSON
[
    {
      open:551.6445,
      low:549.98625,
      high:553.8555,
      close:552.75,
      volume:12500,
      time:1741046400
    },
    {
      open:548.88075,
      low:547.77525,
      high:552.19725,
      close:551.6445,
      volume:9800,
      time:1741042800
    }
]

Code Examples

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

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Commodity Price API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • It provides real-time prices for dozens of commonly-traded commodities across categories like precious_metals, base_metals, energy, grains, softs, and livestock on exchanges including CME, NYMEX, COMEX, and ICE. Available endpoints include /v1/commodityprice for one or more commodities, /v1/commoditysnapshot for every commodity at once, /v1/commoditypricehistorical for OHLCV history, plus /v1/commoditycontract, /v1/commoditycontractlist, and /v1/commodityforwardcurve; see the full list of finance APIs on our APIs page.
  • Call /v1/commodityprice with the name parameter (e.g., gold or platinum), or pass a comma-separated names list of up to 30 commodities for a batch request. You can add the optional currency parameter (an ISO 4217 code like EUR or GBP) and the unit parameter (such as kg, barrel, or MMBtu) to convert the price; for a comparable single-commodity service see the Gold Price API.
  • Each result returns the exchange, name, price, and the quote convention via currency_unit (USD or USX cents) and unit, along with previous_close, change_24h, change_24h_percent, high_24h/low_24h, high_52w/low_52w (Developer tier and above), and an updated Unix timestamp. Free users receive 15-minute delayed data while premium members get live prices, which you can compare on the pricing page.
  • Use the /v1/commodityforwardcurve endpoint with the name parameter (e.g., crude_oil) to get every active futures contract sorted by month plus a structure classification of contango, backwardation, mixed, or flat, along with contango_slope_1m_pct and contango_slope_12m_pct slopes and a full curve array. This endpoint requires a Business, Professional, or annual subscription, which you can sign up for here.