GnistAI GnistAI
Log in

Commodity Prices

Real-time and historical commodity prices — oil, gas, gold, silver, copper, wheat, and 20+ more.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Economics

Data source: Federal Reserve Economic Data (FRED)

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/commodity-prices/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (5)

get_commodity_price

Get price data for a commodity.

Returns historical price observations from FRED for the specified commodity.
Covers energy (oil, gas), precious metals (gold, silver, platinum),
industrial metals (copper, aluminum, nickel), agricultural products
(wheat, corn, coffee, cocoa), livestock, and forestry.

Common commodities:
- crude-oil-wti — WTI Crude Oil (daily, USD/barrel)
- crude-oil-brent — Brent Crude Oil (daily, USD/barrel)
- natural-gas — Henry Hub Natural Gas (daily, USD/MMBtu)
- gold — Gold London PM Fix (daily, USD/troy oz)
- silver — Silver London Fix (daily, USD/troy oz)
- copper — Copper (monthly, USD/metric ton)
- wheat — Wheat (monthly, USD/metric ton)
- corn — Corn/Maize (monthly, USD/metric ton)
- coffee — Coffee Arabica (monthly, USD/kg)

ParameterTypeRequiredDescription
commoditystringrequiredCommodity slug. Examples: "gold", "crude-oil-wti", "crude-oil-brent", "natural-gas", "silver", "copper", "wheat", "corn", "coffee". Use list_commodities to see all available options.
observation_startanyoptionalStart date (YYYY-MM-DD). Omit to fetch from series start.
observation_endanyoptionalEnd date (YYYY-MM-DD). Omit to fetch to latest available.
frequencyanyoptionalAggregate to lower frequency: "d" (daily), "w" (weekly), "m" (monthly), "q" (quarterly), "a" (annual).
limitintegeroptionalMaximum observations to return (default 100, max 100000). (default: 100)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_commodity_price",
    "arguments": {
      "commodity": "example"
    }
  }
}
list_commodities

List all available commodities.

Returns the full catalog of commodities with their names, units,
categories, and underlying FRED series IDs. Use this to discover
valid commodity slugs for get_commodity_price.

ParameterTypeRequiredDescription
categoryanyoptionalFilter by category: "energy", "precious-metals", "industrial-metals", "agricultural", "livestock", "forestry". Omit for all.
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "list_commodities",
    "arguments": {}
  }
}
list_commodity_categories

List commodity categories with counts.

Returns the available categories (energy, precious-metals,
industrial-metals, agricultural, livestock, forestry) and how
many commodities each contains.

JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "list_commodity_categories",
    "arguments": {}
  }
}
compare_commodity_prices

Compare prices for multiple commodities aligned on a common time axis.

Fetches price data for all specified commodities and aligns observations
by date — only dates where all commodities have values are included.
Useful for correlation analysis and cross-commodity comparisons.

Example: compare_commodity_prices(["crude-oil-wti", "natural-gas"], frequency="m")

ParameterTypeRequiredDescription
commoditieslist[string]requiredList of 2-10 commodity slugs to compare (e.g. ["gold", "silver"]).
observation_startanyoptionalStart date (YYYY-MM-DD) applied to all commodities.
observation_endanyoptionalEnd date (YYYY-MM-DD) applied to all commodities.
frequencyanyoptionalAggregate to common frequency before aligning: "m" (monthly), "q" (quarterly), "a" (annual).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "compare_commodity_prices",
    "arguments": {
      "commodities": [
        "example"
      ]
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/commodity-prices/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_commodity_price", "arguments": {"commodity": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/commodity-prices/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_commodity_price",
    "arguments": {
      "commodity": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Economics)

Resources