# PJM Nowcast Extended History

> PJM Nowcast Extended History is a paid API for AI agents from pjm-nowcast-production.up.railway.app, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-15).

Returns trailing descriptive statistics (mean, spread, distribution) over a configurable time window for PJM RTO LMP prices, zonal LMP spreads, and RTO load — with optional prior-period comparison.

## Facts

- Endpoint: POST https://pjm-nowcast-production.up.railway.app/v1/nowcast/history/extended
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pjm-nowcast-extended-history-445a5db1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9BWFrx5Vdex_X1wGRakoN

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 pjm-nowcast-extended-history-445a5db1 -d '<json body>'
```

Example prompt: Pull the last 24 hours of PJM RTO LMP and zonal spread descriptive stats at hourly resolution, and include a comparison to the prior 24-hour window so I can see how prices have shifted.

## When to prefer this

Choose this endpoint when you need a configurable trailing window of PJM electricity market descriptive statistics — including LMP price levels, zonal spreads, and load — with optional prior-period comparison, and you want aggregated near-real-time data without building your own polling infrastructure. Prefer this over raw PJM data products when you need pre-aggregated stats quickly and accept the caveat that freshness depends on a background poll cycle rather than a live feed.

## Known failure modes

- Data staleness: if the background poll has not refreshed recently, 'stale: true' is returned — figures may be outdated
- windowHours exceeds MAX_HISTORY_DAYS cap: request is truncated or rejected
- Invalid 'families' string values return validation errors
- Invalid 'resolution' value (not 'native' or 'hourly') causes rejection
- Service unavailability on Railway.app infrastructure returns 5xx
- Payment failure (x402 protocol) prevents access entirely

## How this service works

Trailing and semi-live descriptive statistics on PJM RTO LMP, selected zonal LMP price spreads, and RTO load. Not a forecast, signal, trading recommendation, or advice. Not a substitute for official PJM data products. Buyer beware: figures are aggregated from public market sources; freshness equals the last successful background poll. Descriptive statistics only. Not a forecast, signal, or trading recommendation. Aggregated from public market sources. Freshness depends on the last successful background poll.

## Output

A descriptive statistics envelope containing: timestamp metadata (asOf, polledAt, ageSeconds, maxAgeSeconds, stale), RTO LMP summary stats, zonal spread stats, RTO load stats, resolution used, window hours, observation count, optional prior-period comparison block, and a disclaimer string. The 'stale' boolean indicates whether data freshness exceeds the acceptable threshold.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "compare": {
   "enum": [
    "none",
    "prior_period"
   ],
   "type": "string",
   "description": "If prior_period, include the equal-length window immediately before."
  },
  "families": {
   "type": "string",
   "description": "Subset of rto_lmp, zonal_spread, rto_load. Default: all."
  },
  "resolution": {
   "enum": [
    "native",
    "hourly"
   ],
   "type": "string",
   "description": "native = one point per poll; hourly = mean per clock hour."
  },
  "windowHours": {
   "type": "integer",
   "description": "Trailing window in hours, capped by MAX_HISTORY_DAYS."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "example": {
  "stale": false,
  "mix_n_obs": 40,
  "price_vol": 2.5,
  "ageSeconds": 120,
  "mix_std_price": 8.1,
  "price_vol_missing": false
 },
 "properties": {
  "asOf": {
   "type": "string",
   "format": "date-time"
  },
  "kStar": {
   "type": [
    "integer",
    "null"
   ],
   "description": "Regime route. Dominant state index."
  },
  "stale": {
   "type": "boolean"
  },
  "rtoLmp": {
   "type": "object"
  },
  "entropy": {
   "type": [
    "number",
    "null"
   ],
   "description": "Regime route. HMM entropy; not a forecast."
  },
  "product": {
   "type": "string"
  },
  "rtoLoad": {
   "type": "object"
  },
  "polledAt": {
   "type": "string",
   "format": "date-time"
  },
  "timezone": {
   "type": "string"
  },
  "mix_n_obs": {
   "type": [
    "integer",
    "null"
   ],
   "description": "Latest only. Observation count paired with mix_std_price."
  },
  "price_vol": {
   "type": [
    "number",
    "null"
   ],
   "description": "Latest only. Rolling realized LMP std in $/MWh from the last 8 SQLite RTO LMP prints (RMS of successive diffs; not annualized Black vol, not rtoLmp.std). Null when price_vol_missing is true."
  },
  "ageSeconds": {
   "type": "integer"
  },
  "disclaimer": {
   "type": "string"
  },
  "posteriors": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "Regime route. State posteriors."
  },
  "resolution": {
   "type": "string"
  },
  "priorPeriod": {
   "type": "object"
  },
  "windowHours": {
   "type": "integer"
  },
  "zonalSpread": {
   "type": "object"
  },
  "maxAgeSeconds": {
   "type": "integer"
  },
  "mix_std_price": {
   "type": [
    "number",
    "null"
   ],
   "description": "Latest only. Mixture std of RTO LMP in $/MWh from the poller mix.json sidecar. Not price_vol and not rtoLmp.std."
  },
  "observationCount": {
   "type": "integer"
  },
  "price_vol_missing": {
   "type": "boolean"
  }
 },
 "description": "Descriptive statistics envelope. Fields asOf, polledAt, ageSeconds, maxAgeSeconds, stale are always present."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pjm-nowcast-extended-history-445a5db1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pjm-nowcast-production.up.railway.app](https://www.zero.xyz/host/pjm-nowcast-production.up.railway.app/llms.txt)
