Loading
Loading
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.
Bullions, Metals, energy, agriculture, industrial goods, livestock, and more — all under one endpoint.
Go back to 1990. Understand trends, not just today’s numbers.
$ 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)
#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'
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.