# 2s Commodity Prices API

> 2s Commodity Prices API is a paid API for AI agents from 2s.io, paid per call via x402, $0.00144/call, status unknown (last checked 2026-09-15).

Returns current and previous prices for energy and agricultural commodities (WTI, Brent, natural gas, grains, metals, etc.) sourced from FRED

## Facts

- Endpoint: GET https://2s.io/api/econ/commodity
- Price: $0.00144/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-commodity-prices-api-294ba46a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_75M2VTS5xTrkhfOvyCYEJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-commodity-prices-api-294ba46a
```

Example prompt: What's the current price of WTI crude oil — and how much has it moved since yesterday?

## When to prefer this

Use this endpoint when you need authoritative, FRED-sourced commodity price data for energy (WTI, Brent, natural gas, gasoline, diesel, heating oil, propane), metals (copper, aluminum), or agricultural commodities (corn, wheat, sugar) — especially when you need no API key, pay-per-call via USDC, and ground-truth government-sourced data rather than real-time exchange feeds.

## Known failure modes

- Invalid commodity symbol returns an error or empty result
- FRED data may lag by one trading day — intraday prices are not available
- Network or payment failure returns HTTP 402 or 5xx
- Omitting the commodity parameter returns all commodities, which may be larger than expected

## How this service works

Latest benchmark commodity price with the prior value + % change. Pass commodity for one, or omit for all. Commodities: wti, brent, natural-gas, gasoline, diesel, heating-oil, propane, copper, aluminum, corn, wheat, sugar — i.e. crude oil (WTI + Brent), natural gas, gasoline, diesel, heating oil, propane, gold, copper, aluminum, corn, wheat, sugar. Each result names the FRED series ID + unit ($/barrel, $/gallon, $/troy oz, $/metric ton...). Daily benchmarks report a daily date; global-price series are monthly. Source: EIA / LBMA / IMF via FRED (St. Louis Fed).

## Output

Returns a JSON array of commodity price objects, each with the commodity name, current price, previous price, percent change, unit (e.g. $/barrel), as-of date, FRED series ID, and source attribution from the Federal Reserve Bank of St. Louis.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "commodity": "wti"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "properties": {
      "commodity": {
       "type": "string",
       "description": "One commodity, or omit for all. One of: wti, brent, natural-gas, gasoline, diesel, heating-oil, propane, copper, aluminum, corn, wheat, sugar."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-commodity-prices-api-294ba46a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
