Commodity Futures Data API - Quotes, History, Options, Barchart
Pricing
from $5.00 / 1,000 quote, price bar or futures option returneds
Commodity Futures Data API - Quotes, History, Options, Barchart
Commodity and futures market data from your own Barchart OnDemand key: real-time or delayed quotes, OHLC price history, futures options with greeks, contract specs, expirations, all futures on an exchange, local grain cash bids, USDA grain prices and commodity statistics. Read only.
Pricing
from $5.00 / 1,000 quote, price bar or futures option returneds
Rating
0.0
(0)
Developer
Nabeel Hassan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
19 days ago
Last modified
Categories
Share
Pull commodity and futures quotes, price history, options on futures, contract specifications, expirations, local grain cash bids, USDA grain prices and commodity statistics from Barchart OnDemand into a dataset, a spreadsheet or a warehouse. Uses your own Barchart OnDemand API key, reads only, and charges only for rows that carry data.
What it collects
- Quotes: last price, net and percent change, open, high, low, close, volume, previous close and volume, trade time, real-time, delayed or end-of-day mode, and on request open interest, settlement, previous settlement, expiration date, last trading day, 52 week high and low, exchange margin and implied volatility. Futures, stocks, indexes, ETFs, currencies and crypto, by symbol, with Barchart's futures notation:
ZC*1for the front corn contract,ZC^Ffor every corn contract. - Price history: ticks, minute bars, or daily, weekly, monthly, quarterly and yearly OHLC bars with volume and open interest, for one contract, a nearest futures series that rolls through the front months (with nearby offset, roll timing and back adjustment), or a continuation series.
- Futures by exchange: a quote for every futures contract listed on CBOT, CME, NYMEX, COMEX, ICE US, EUREX, LIFFE, MATIF, BMF, SAFEX and 50 more exchanges, optionally for one category such as Grains or Meats.
- Futures options: every option on a futures root or contract, with strike, expiration, last, change, premium, volume, open interest, implied volatility and delta, gamma, theta and vega.
- Futures specifications: contract name, size, months traded, tick value, point value, trading hours, exchange margin and daily limit, by root, exchange or category.
- Futures expirations: first notice date, expiration date and last trading day rule for each contract.
- Grain cash bids: cash price, basis, futures month, change and delivery period from local elevators, processors and terminals around a ZIP code, a point, a county or a list of locations, with each buyer's company, address, phone, coordinates and distance.
- USDA grain prices: USDA reported export, processor, river, terminal and barge loading bids for corn, soybeans, wheat classes, oats, soybean meal and soybean oil, with low and high price and basis.
- Commodity statistics: dated values of statistics series such as USDA crop production, yield and stocks, with the item, measurement, unit, area and sources.
- Read only, pay per result, bring your own key.
How to use it
- Get a Barchart OnDemand API key: Barchart issues one with an OnDemand subscription. The APIs and exchanges you can read are what your subscription includes.
- Paste the key into the API key field (stored as a secret), or set the
DATA_API_KEYenvironment secret on the actor. - Pick What to read, fill in the symbols, roots, exchange or place it needs, and start the run.
A run without a key ends cleanly with a message asking for one, before any request is sent.
Input
| Field | What it does |
|---|---|
| What to read | Quotes (default), price history, futures by exchange, futures options, futures specifications, futures expirations, grain cash bids, USDA grain prices or commodity statistics. |
| Symbols | Barchart symbols for quotes and history (ZC*1, CLZ26, GC^F, AAPL), option symbols for futures options, series symbols for statistics. |
| Futures roots, Futures contracts | ZC, CL, GC, or ZCN26, for options, specifications and expirations. |
| Exchange, Category | Futures by exchange (required), options and specifications. |
| Futures categories | Specifications: energies, financials, grains, indices, meats, metals, softs, currencies. |
| Extra output fields | Optional fields to add to quotes, futures by exchange, options and expirations, such as openInterest or settlement. |
| History type, Start date, End date, Sort order, Minutes per bar, Volume, Nearby contract, Back adjust, Roll days before expiration, Contract roll | Price history. |
| Option type, Option expiration month, Option expiration day | Futures options filters. |
| ZIP code, Latitude, Longitude, Maximum distance, County, County FIPS code, Location ids, Commodities, Number of locations, Bids per commodity, All bids, Delivery from, Delivery until | Grain cash bids. |
| USDA commodity types, USDA bid types | USDA grain prices filters. |
| Maximum results | Row cap for the whole run. |
| Requests per minute | Pacing. |
| API key | Your Barchart OnDemand API key, as a secret. |
Access and limits on the Barchart side
- Every API reads only what your OnDemand subscription includes. Real-time exchange data needs the matching exchange entitlements; otherwise quotes come back delayed or end-of-day, and the
provider_modecolumn says which. - Grain cash bids take one area per run. Location ids exclude the ZIP code, point, distance, county and location count, and a point excludes the ZIP code; the actor leaves the losing inputs off and says so in the log rather than sending a combination the provider would narrow silently.
- Some APIs check their required inputs before the key, so a refused request does not confirm the key is good. The run says so when that happens.
- Your Barchart agreement and the exchanges' rules decide what you may do with the data. Exchange market data is licensed per user and per use, and displaying or redistributing it to others usually needs a separate license and exchange fees. This actor does not change those terms.
FAQ
What is Barchart OnDemand?
Barchart OnDemand is Barchart's market data API at ondemand.websol.barchart.com. It serves quotes and history for futures, stocks, indexes, currencies and crypto, futures and options reference data, grain cash bids, USDA data, news and fundamentals, documented one API per page at barchart.com/ondemand/api. This actor wraps the commodity and futures APIs among them. The docs and the live host were checked on 2026-10-06.
Do I need a Barchart account?
Yes. This actor is bring-your-own-key and never ships one. A missing or refused key ends the run cleanly with a message saying which it was, and an API your subscription does not include is reported the same way.
How do I get the front month corn, crude oil and gold prices?
Pick quotes and set the symbols to ZC*1, CL*1 and GC*1. Add openInterest, settlement and expirationDate to the extra output fields for the futures specific columns.
How do I get a continuous daily history of a futures contract?
Pick price history, set the symbol to the root with a nearby offset such as ZC*1, or set the history type to Daily nearest with the root ZC and choose the nearby contract, the roll days and back adjustment. Set a start and end date.
Can I get local grain cash prices and basis?
Yes. Pick grain cash bids and set a ZIP code, for example a farm's ZIP code, plus the commodities you want. Each row is one cash bid at one elevator or processor, with the cash price, basis, futures month, delivery period and the buyer's address and distance.
Is my key safe?
The key is sent in the POST body the provider documents, never in a URL, is never logged, and is stripped from any error text.
How is it priced?
Pay per result: a low price per quote, price bar, futures option, contract specification, expiration or statistic, and a higher price per grain cash bid or USDA grain price. Requests that find nothing are free. Your Barchart subscription applies separately.
Example output
{"mode": "quote","modeLabel": "Quotes","recordType": "quote","query": "ZC*1,CL*1","found": true,"id": "ZCZ26","symbol": "ZCZ26","name": "Corn","date": "2026-10-05T13:20:00-05:00","price": 421.25,"exchange": "CBOT","retrievedAt": "2026-10-06T09:14:52.118Z","note": null,"dayCode": "5","serverTimestamp": "2026-10-05T19:52:00-05:00","provider_mode": "i","lastPrice": 421.25,"tradeTimestamp": "2026-10-05T13:20:00-05:00","netChange": -2.5,"percentChange": -0.59,"unitCode": "2","open": 423.75,"high": 425,"low": 420.5,"close": 421.25,"numTrades": 61234,"flag": "s","volume": 182340,"previousVolume": 176210,"openInterest": 712455,"settlement": 421.25,"expirationDate": "2026-12-14"}
Values are illustrative; every field is one the provider documents. Option rows carry strike, type, premium, impliedVolatility and the greeks; grain bid rows carry cashprice, basis, basismonth, delivery_start and the location columns company, locationName, city, state, zip and distance.
Keyword map
commodity futures API, futures market data API, commodity price API, futures quotes, futures price history, continuous futures data, futures options data, options greeks, futures contract specifications, futures expiration dates, first notice date, grain cash bids API, grain basis data, USDA grain prices, corn price data, soybean price data, crude oil futures data, gold futures price, CBOT CME NYMEX COMEX data, Barchart OnDemand API, getQuote, getHistory, getGrainBids.