GET /v1/climate-events/probability

$0.05realtimetier: deepcache 900sEngine C — Weather × Markets Edge

Our model's probability that a condition (temp above/below a threshold, precip amount, wind, any precip, named-storm landfall) occurs in a window up to 31 days out, with the method labeled. When a listed prediction market covers the same event, it is cross-referenced.

Parameters

NameInTypeRequiredNotes
latquerynumberno
lonquerynumberno
cityquerystringnoMajor US city name as an alternative to lat/lon
conditionquerystringyes — one of "temp_above", "temp_below", "precip_above", "wind_above", "any_precip", "named_storm_landfall"
thresholdquerynumbernoMetric units: °C for temp, mm for precip, kph for wind
window_startquerystringyes
window_endquerystringyes

Example

curl "https://x402-factory.com/v1/climate-events/probability?city=nyc&condition=temp_above&threshold=35&window_start=2026-07-24T00%3A00%3A00Z&window_end=2026-07-24T23%3A59%3A59Z"

Matches a listed market — comparable_market cross-references it.

Example response

{
  "data": {
    "probability": 0.0276,
    "method": "stub",
    "comparable_market": {
      "slug": "nyc-high-temp-above-95f-2026-07-24",
      "market_p": 0.329
    }
  },
  "meta": {
    "endpoint": "/v1/climate-events/probability",
    "version": "1.0.0",
    "generated_at": "2026-08-18T22:54:16.064Z",
    "freshness": "realtime",
    "sources": [
      "stub-model"
    ],
    "request_id": "req_00000000",
    "docs": "https://x402-factory.com/docs/edge.climate-events-probability",
    "data_mode": "live"
  }
}

Response schema (data payload)

{
  "type": "object",
  "properties": {
    "probability": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "method": {
      "type": "string",
      "description": "What produced the number: \"runway-oracle-v4\" (calibrated model), \"nws-blend (…)\", \"nws-gridpoint (…)\" with any derivation disclosed, \"climatology (…)\", or \"stub\""
    },
    "comparable_market": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "market_p": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "slug",
        "market_p"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "probability",
    "method"
  ],
  "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.