GET /v1/energy/{region}

$0.05hourlytier: deepcache 3600sEngine B — Weather Intelligence

Daily heating/cooling degree-days (°F-days), a normalized peak-load signal, and solar/wind generation indexes computed from load-weighted city forecasts for CAISO, ERCOT, PJM, MISO, SPP, NYISO, or ISONE, with extreme-risk flags.

Parameters

NameInTypeRequiredNotes
regionpathstringyes — one of "CAISO", "ERCOT", "PJM", "MISO", "SPP", "NYISO", "ISONE"
daysqueryintegerno (default: 3)

Example

curl "https://x402-factory.com/v1/energy/ERCOT?days=3"

Example response

{
  "data": {
    "daily": [
      {
        "date": "2026-07-18",
        "hdd": 0,
        "cdd": 15,
        "expected_peak_load_signal": 0.68,
        "solar_gen_index": 0.67,
        "wind_gen_index": 0.3,
        "extreme_risk_flags": []
      },
      {
        "date": "2026-07-19",
        "hdd": 0,
        "cdd": 14.9,
        "expected_peak_load_signal": 0.68,
        "solar_gen_index": 0.75,
        "wind_gen_index": 0.32,
        "extreme_risk_flags": []
      },
      {
        "date": "2026-07-20",
        "hdd": 0,
        "cdd": 16.1,
        "expected_peak_load_signal": 0.73,
        "solar_gen_index": 0.72,
        "wind_gen_index": 0.3,
        "extreme_risk_flags": []
      }
    ]
  },
  "meta": {
    "endpoint": "/v1/energy/{region}",
    "version": "1.0.0",
    "generated_at": "2026-08-18T22:54:16.974Z",
    "freshness": "hourly",
    "sources": [
      "stub-model"
    ],
    "request_id": "req_00000000",
    "docs": "https://x402-factory.com/docs/weather.energy-region",
    "data_mode": "live"
  }
}

Response schema (data payload)

{
  "type": "object",
  "properties": {
    "daily": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "hdd": {
            "type": "number"
          },
          "cdd": {
            "type": "number"
          },
          "expected_peak_load_signal": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "solar_gen_index": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "wind_gen_index": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "extreme_risk_flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "date",
          "hdd",
          "cdd",
          "expected_peak_load_signal",
          "solar_gen_index",
          "wind_gen_index",
          "extreme_risk_flags"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "daily"
  ],
  "additionalProperties": false
}

The platform wraps every payload in an envelope: { "data": …, "meta": { endpoint, version, generated_at, freshness, sources, request_id, docs, data_mode } }.

Payment (x402)

Unpaid requests receive 402 with payment requirements (accepts). Pay $0.05 in USDC on Base per call via an X-PAYMENT header — see docs.x402.org. With PAYMENT_MODE=disabled (local dev) the endpoint is open.

Errors

StatusCodeMeaning
400INVALID_PARAMSInput failed validation; message lists the offending fields.
404NOT_FOUNDNo matching resource; suggestion may point to a sibling endpoint.
410RESOLVEDMarket/event settled; body includes a resolution summary.
503STALE_DATAUpstream feed down; stale data is never silently served beyond 2× cache TTL.
500INTERNALOur bug. The request_id helps us find it.