Historical Commodity Prices, Delivered Simply.
The Commodity API gives you clean, accurate, and real-time pricing for over 130 commodities - from crude oil and gold to wheat, cocoa, and copper. Whether you're forecasting markets or feeding financial dashboards, this API brings you every price point.
Features
Instant Access to 130+ Commodities
Bullions, Metals, energy, agriculture, industrial goods, livestock, and more - all under one endpoint.
30+ Years of Historical Data
Go back to 1990. Understand trends, not just today’s numbers.
API Endpoint
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/commodity/rates/historical?symbols=WTIOIL-SPOT%2CXAU&date=2025-01-10&apiKey=API-KEY"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
How-To-Guides
Retrieve Historical Commodity Prices
It's as simple as: Pick a symbol, choose a date, get the price.- XAU is for Gold (USD per troy ounce)
- WTIOIL-SPOT is for SPOT Crude Oil (USD per barrel)
- CC is for Cocoa (USD per metric ton)
#Response { "success": true, "date": "2025-01-10", "rates": { "WTIOIL-SPOT": { "date": "2025-01-10", "open": 73.77, "high": 77.16, "low": 73.55, "close": 75.97 }, "XAU": { "date": "2025-01-10", "open": 2669.93, "high": 2697.85, "low": 2663.61, "close": 2689.44 } } }$ curl -X 'GET' 'https://api.apifreaks.com/v1.0/commodity/rates/historical?symbols=WTIOIL-SPOT%2CXAU&date=2025-01-10&apiKey=API-KEY'
Pricing
To use the Historical 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, 40 credits will be charged as a base fee, plus 1 additional credit per commodity symbol requested.
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.