GnistAI GnistAI
Log in

Commodity Prices

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

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Economics

Data source: Federal Reserve Economic Data (FRED)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/commodity-prices/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-commodity-prices": {
      "url": "https://context.gnist.ai/mcp/commodity-prices/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
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"}}}'

API REST API

API Root https://context.gnist.ai/rest/commodity-prices/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/commodity-prices/get_commodity_price?commodity=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/commodity-prices/get_commodity_price",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "commodity": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc commodity-prices

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

get_commodity_price
Get price data for a commodity.
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)
list_commodities
List all available commodities.
ParameterTypeRequiredDescription
categoryanyoptionalFilter by category: "energy", "precious-metals", "industrial-metals", "agricultural", "livestock", "forestry". Omit for all.
list_commodity_categories
List commodity categories with counts.
compare_commodity_prices
Compare prices for multiple commodities aligned on a common time axis.
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).
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related