# x402stock Energy Commodities Price API

> x402stock Energy Commodities Price API is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-08).

Returns current and historical spot price data for an energy commodity product (e.g. WTI crude oil, natural gas, heating oil) sourced from the EIA, paid per-call via USDC on Base.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/energy/%7Bproduct%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-energy-commodities-price-api-e400df2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8Ac4E5M68ZCqTY03INSGS

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 x402stock-energy-commodities-price-api-e400df2d
```

Example prompt: What's the current WTI crude oil spot price and how has it moved over the last 30 days? Pull the data from x402stock using the 'wti' product.

## When to prefer this

Use this endpoint when you need real-time or recent historical energy commodity spot prices (WTI, Brent, natural gas, heating oil, etc.) sourced authoritatively from the EIA, without needing an API key or account — just pay $0.01 USDC per call. Prefer this over generic financial data APIs when EIA provenance and no-registration access are priorities, or when building AI agents that need pay-per-use commodity data on Base.

## Known failure modes

- Invalid or unsupported product slug returns a 404 or error response
- limit parameter out of range (<=0 or >365) causes a validation error
- Payment failure or insufficient USDC balance blocks the request via x402 protocol
- EIA data unavailable for the requested date range returns empty history array
- Network timeout or upstream EIA outage causes 5xx response

## How this service works

Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.

## Output

Returns a JSON object with the energy product identifier, EIA series ID, human-readable name, unit (e.g. usd_per_barrel), latest price with date, prior price with date, absolute and percentage change, update frequency, data source, as_of timestamp, an array of historical date-value pairs up to the requested limit, and an EIA attribution string.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "limit"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "default": 30,
       "maximum": 365,
       "exclusiveMinimum": 0
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "product",
      "series_id",
      "name",
      "unit",
      "eia_units",
      "frequency",
      "latest",
      "prior",
      "change",
      "change_percent",
      "source",
      "as_of",
      "history",
      "attribution"
     ],
     "properties": {
      "name": {
       "type": "string"
      },
      "unit": {
       "type": "string"
      },
      "as_of": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "prior": {
       "anyOf": [
        {
         "type": "object",
         "required": [
          "date",
          "value"
         ],
         "properties": {
          "date": {
           "type": "string"
          },
          "value": {
           "type": "number"
          }
         },
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "change": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      },
      "latest": {
       "anyOf": [
        {
         "type": "object",
         "required": [
          "date",
          "value"
         ],
         "properties": {
          "date": {
           "type": "string"
          },
          "value": {
           "type": "number"
          }
         },
         "additionalProperties": false
        },
        {
         "type": "nul
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "WTI Crude Oil — Cushing, OK Spot Price FOB",
  "unit": "usd_per_barrel",
  "as_of": "2026-06-01T00:00:00.000Z",
  "prior": {
   "date": "2026-05-29",
   "value": 91.16
  },
  "change": 4.8,
  "latest": {
   "date": "2026-06-01",
   "value": 95.96
  },
  "source": "eia",
  "history": [
   {
    "date": "2026-06-01",
    "value": 95.96
   },
   {
    "date": "2026-05-29",
    "value": 91.16
   }
  ],
  "product": "wti",
  "eia_units": "$/BBL",
  "frequency": "daily",
  "series_id": "RWTC",
  "attribution": "Source: U.S. Energy Information Administration (EIA)",
  "change_percent": 5.27
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-energy-commodities-price-api-e400df2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
