Live Commodity Prices API - Real Time Market Insights
Our Live Commodity Prices API provides commodity market live rates, covering a wide spectrum of commodities-from common agricultural goods like sugar commodity price, coffee commodity prices, soybean commodity price and cotton commodity price to energy and metals. Whether you're building a trading dashboard, financial report, or consumer-facing app, we'll provide you with real time commodities prices for the markets that matter most to your users.
By delivering instant commodity prices reliably, our API enables businesses and developers to build applications that require real-time insights into commodity trends. With the support of custom quote currency, you can display the commodity prices in any supported currency like USD, EUR, or more, so your data is always presented in the context that matters most to your audience. You can also request individual futures delivery months of WTI crude and other futures (WTIOIL-FUT-MMMYY) alongside spot prices in the same call.
Features
Real-Time Commodity Updates
Stay ahead of market shifts with lightning-fast access to live commodity prices, refreshed every minute so you always have the most current information on commodities.
Multiple Symbols Data
Query dozens of commodities at once-track today silver and gold rate, agricultural commodity prices, key metal commodity prices and much more. One comma‑separated symbols parameter gives a comprehensive data in a single response.
User-Defined Quote Currency
Transform raw commodity values into a currency of your choice. By setting your own default quote currency, you gain more control over how prices are displayed, simplifying comparisons and helping streamline your analytical processes.
Individual Futures Delivery Months
Alongside continuous futures likeWTIOIL-FUT, which follow the front month, each delivery month has its own symbol, such as WTIOIL-FUT-DEC27 for December 2027 WTI crude. Months are available for major futures like WTI and Brent crude, natural gas, heating oil, gasoline, copper, wheat, and soybeans. Mix them with spot symbols in one request to price a specific contract or plot the futures curve.Unit and Currency With Every Price
Every price comes with its unit and currency inmetadata, so a barrel, a bushel, and a troy ounce never get mixed up on screen. If you already store units on your side, pass metadata=false to get only the prices and keep the payload small.API Endpoint
How-To-Guides
Live Commodity Prices
To get the latest commodity rates, call the endpoint by providing the symbols query parameter. Rates are refreshed every minute. The response will be commodity rates of all the provided symbols.
$ curl -X 'GET' 'https://api.apifreaks.com/v2.0/commodity/rates/latest?apiKey=API-KEY&symbols=WTIOIL-SPOT,XAU'
# Response
{
"success": true,
"timestamp": 1789386964,
"rates": {
"WTIOIL-SPOT": 100.02,
"XAU": 4291.77
},
"metadata": {
"WTIOIL-SPOT": {
"unit": "Bbl",
"quote": "USD"
},
"XAU": {
"unit": "T.oz",
"quote": "USD"
}
}
}
Live Commodity Rates of Desired Commodities
Pass the symbols query parameter that is comma separated list of commodity symbols whose rates are required. The response will be the rates of the desired commodities.
$ curl -X 'GET' 'https://api.apifreaks.com/v2.0/commodity/rates/latest?apiKey=API-KEY&symbols=XPT,ZW-SPOT'
# Response
{
"success": true,
"timestamp": 1793016450,
"rates": {
"XPT": 1550.94,
"ZW-SPOT": 631.75
},
"metadata": {
"XPT": {
"unit": "T.oz",
"quote": "USD"
},
"ZW-SPOT": {
"unit": "Bu",
"quote": "USD"
}
}
}
Change Quote Currency
Pass the quote query parameter to get the commodity quotations in the desired currency.
$ curl -X 'GET' 'https://api.apifreaks.com/v2.0/commodity/rates/latest?apiKey=API-KEY&symbols=XPT,ZW-SPOT"e=EUR'
# Response
{
"success": true,
"timestamp": 1793016550,
"rates": {
"XPT": 1384.004,
"ZW-SPOT": 564.765
},
"metadata": {
"XPT": {
"unit": "T.oz",
"quote": "EUR"
},
"ZW-SPOT": {
"unit": "Bu",
"quote": "EUR"
}
}
}
Handling Partial Results
If some of the requested symbols are valid and others are not, the API returns a 206 Partial Content response: rates and metadata contain the valid symbols, and an additional unresolved object lists each symbol that could not be resolved, along with a reason. No credits are charged for unresolved symbols. If none of the requested symbols are valid, the API returns a 404 SYMBOL_NOT_FOUND error instead, with the same unresolved object. Ambiguous codes come with a suggestions array, and a code with only one possible match is answered under the matching symbol, with resolvedTo in unresolved.
$ curl -X 'GET' 'https://api.apifreaks.com/v2.0/commodity/rates/latest?apiKey=API-KEY&symbols=xau,wtioil-fut,zw,pl'
# Response
{
"success": true,
"timestamp": 1793095296,
"rates": {
"XAU": 4002.52,
"WTIOIL-FUT": 103.25,
"XPT": 1504.05
},
"metadata": {
"XAU": {
"unit": "T.oz",
"quote": "USD"
},
"WTIOIL-FUT": {
"unit": "Bbl",
"quote": "USD"
},
"XPT": {
"unit": "T.oz",
"quote": "USD"
}
},
"unresolved": {
"ZW": {
"message": "Did you mean ZW-SPOT (Wheat Spot) or ZW-FUT (Wheat Futures)?",
"suggestions": [
"ZW-SPOT",
"ZW-FUT"
]
},
Price a Run of Futures Delivery Months
Request several delivery months of one futures contract together. In delivery order, the prices show the futures curve.
$ curl -X 'GET' 'https://api.apifreaks.com/v2.0/commodity/rates/latest?apiKey=API-KEY&symbols=WTIOIL-FUT-JAN27,WTIOIL-FUT-FEB27,WTIOIL-FUT-MAR27,WTIOIL-FUT-APR27,WTIOIL-FUT-MAY27'
# Response
{
"success": true,
"timestamp": 1793094346,
"rates": {
"WTIOIL-FUT-JAN27": 99.78,
"WTIOIL-FUT-FEB27": 97.47,
"WTIOIL-FUT-MAR27": 95.21,
"WTIOIL-FUT-APR27": 93.1,
"WTIOIL-FUT-MAY27": 91.35
},
"metadata": {
"WTIOIL-FUT-JAN27": {
"unit": "Bbl",
"quote": "USD"
},
"WTIOIL-FUT-FEB27": {
"unit": "Bbl",
"quote": "USD"
},
"WTIOIL-FUT-MAR27": {
"unit": "Bbl",
"quote": "USD"
},
"WTIOIL-FUT-APR27": {
"unit": "Bbl",
"quote": "USD"
},
"WTIOIL-FUT-MAY27": {
"unit": "Bbl",
"quote": "USD"
Prices fall further out here, which means the market is in backwardation. To find the months currently listed for a contract, call the Commodity Symbols endpoint with underlying=WTIOIL-FUT.
Frequently Asked Questions
updateInterval for any symbol with the Commodity Symbols endpoint.-SPOT symbols are continuous cash prices. -FUT symbols follow the front-month futures contract and roll to the next month at expiry. Neither is an official exchange settlement or benchmark price. For a specific delivery month, use a contract symbol like WTIOIL-FUT-DEC27.expiredOn date, or it's a distant month that trades so rarely it has only a daily settlement and no live price. Prices for both are available from the APIFreaks Historical Commodity Prices API.unresolved, with suggestions when there are close matches. You're not charged for it. If no symbol in the request can be answered, the API returns a 404.warning field. Check for it before you display prices with a currency label.Pricing
To use the Live Commodity Prices API, API credits are required. We only charge for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded.
For each successful request, 35 credits will be charged as a base fee, plus 1 additional credit per commodity symbol requested.
If invalid symbols are provided along with valid values, then API will return successful response with 2xx status code but only the valid symbols will be returned. No credits will be deducted for the invalid symbols and any credits charged will be refunded.
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, helping you stay informed about your remaining balance and optimize your resource allocation effectively.