X

X402stock · Energy

by X402stock

GETBase

$0.02

per call · USD Coin on Base

Every energy benchmark in one call: WTI and Brent crude oil spot, Henry Hub natural gas spot, and US regular retail gasoline — each with its latest price, prior reading, and change. The catalog's commodities feed (no equity/forex/crypto endpoint carries these). For one benchmark with history use /api/v1/energy/{product}. Source: U.S. Energy Information Administration (EIA). From x402stock

Endpoint

GET https://x402stock.xyz/api/v1/energy

3

Calls / 30d

2

Unique payers / 30d

Sep 2

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://x402stock.xyz/api/v1/energy", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://x402stock.xyz/api/v1/energy" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "as_of": "2026-06-01T00:00:00.000Z",
  "attribution": "Source: U.S. Energy Information Administration (EIA)",
  "products": [
    {
      "change": 4.8,
      "change_percent": 5.27,
      "eia_units": "$/BBL",
      "frequency": "daily",
      "latest": {
        "date": "2026-06-01",
        "value": 95.96
      },
      "name": "WTI Crude Oil — Cushing, OK Spot Price FOB",
      "prior": {
        "date": "2026-05-29",
        "value": 91.16
      },
      "product": "wti",
      "series_id": "RWTC",
      "unit": "usd_per_barrel"
    },
    {
      "change": -0.27,
      "change_percent": -8.08,
      "eia_units": "$/MMBTU",
      "frequency": "daily",
      "latest": {
        "date": "2026-06-01",
        "value": 3.07
      },
      "name": "Henry Hub Natural Gas Spot Price",
      "prior": {
        "date": "2026-05-29",
        "value": 3.34
      },
      "product": "natural-gas",
      "series_id": "RNGWHHD",
      "unit": "usd_per_mmbtu"
    }
  ],
  "series": "energy_prices",
  "source": "eia"
}

Payment details

Pay to0x3070fbb3803819fb5bdfe9286fdc6325a877fa85
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from X402stock & similar services