Commodities
Browse the catalog of available commodities and their metadata.
List Commodities
GET
/v1/commodities
Returns a paginated list of all available commodities with their metadata, including available data series and exchanges.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | Optional | Filter by category: "energy", "metals", "agriculture", "softs" |
| search | string | Optional | Search commodities by name or symbol |
| page | integer | Optional | Page number (default: 1) |
| per_page | integer | Optional | Results per page, max 100 (default: 25) |
Example Request
curl -X GET "https://commodityfundamentals.com/api/v1/commodities?category=energy" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://commodityfundamentals.com/api/v1/commodities",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"category": "energy"}
)
commodities = response.json()["data"]
require "net/http"
require "json"
uri = URI("https://commodityfundamentals.com/api/v1/commodities?category=energy")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http|
http.request(req)
}
commodities = JSON.parse(res.body)["data"]
Example Response
{
"data": [
{
"id": "WTI_CRUDE_OIL",
"name": "WTI Crude Oil",
"symbol": "CL",
"category": "energy",
"exchange": "NYMEX",
"unit": "USD/barrel"
},
{
"id": "NATURAL_GAS",
"name": "Natural Gas",
"symbol": "NG",
"category": "energy",
"exchange": "NYMEX",
"unit": "USD/MMBtu"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 13,
"total_pages": 1
}
}
Get Commodity
GET
/v1/commodities/:slug
Returns detailed information for a single commodity, including all available data series and date ranges.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | string | Required | Commodity identifier (e.g., "WTI_CRUDE_OIL") |
Example Request
curl -X GET "https://commodityfundamentals.com/api/v1/commodities/WTI_CRUDE_OIL" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://commodityfundamentals.com/api/v1/commodities/WTI_CRUDE_OIL",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
commodity = response.json()
require "net/http"
require "json"
uri = URI("https://commodityfundamentals.com/api/v1/commodities/WTI_CRUDE_OIL")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http|
http.request(req)
}
commodity = JSON.parse(res.body)
Example Response
{
"data": {
"id": "WTI_CRUDE_OIL",
"name": "WTI Crude Oil",
"symbol": "CL",
"category": "energy",
"exchange": "NYMEX",
"unit": "USD/barrel",
"description": "West Texas Intermediate light sweet crude oil futures contract.",
"contract_size": "1,000 barrels",
"tick_size": 0.01,
"available_series": [
{
"type": "price",
"frequency": "daily",
"first_date": "1983-03-30",
"last_date": "2024-06-21"
},
{
"type": "cot_legacy",
"frequency": "weekly",
"first_date": "1986-01-15",
"last_date": "2024-06-18"
},
{
"type": "cot_disaggregated",
"frequency": "weekly",
"first_date": "2006-06-13",
"last_date": "2024-06-18"
}
]
}
}
Categories
Commodities are organized into the following categories:
Energy
Crude oil, natural gas, heating oil, gasoline, and other energy products
category=energy
Metals
Gold, silver, copper, platinum, and other precious and industrial metals
category=metals
Agriculture
Corn, soybeans, wheat, and other grain and oilseed commodities
category=agriculture
Softs
Coffee, sugar, cotton, cocoa, and other soft commodities
category=softs