Weather market brackets (ensemble)
POST /api/weather-market-bracketsForecast probability for every bracket of a weather market. Send POST /api/weather-market-brackets with the required field brackets and pay $0.02 per call over x402 or MPP (there is no free tier). It returns a JSON object with lat, lon, place, date, timezone and 10 more.
Send the place, the date and your brackets (label, min, max and the market price you hold for each): each bracket comes back with the share of up to 82 members (ECMWF IFS and NOAA GEFS) that land in it, your price beside it as sent. You supply brackets and prices; this tool reads no market feed and gives facts only, no rating or recommendation. Raw model output, not station-calibrated. Weather data by Open-Meteo.com (CC BY 4.0).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | number | no | Latitude, -90 to 90 (with lon; wins over place) |
lon | number | no | Longitude, -180 to 180 (with lat) |
place | string | no | A city, town or region name instead of lat/lon, for example "Paris" or "Austin, TX" (not a street address); the answer echoes the place it resolved to |
date | string | no | Local date at the place, YYYY-MM-DD, up to 15 days ahead (default tomorrow, UTC); all 82 members reach about 13 days, the 31 NOAA members the rest |
variable | string | no | Daily value: temperature_max, temperature_min, temperature_mean, precipitation_sum, wind_speed_max (default temperature_max) |
units | string | no | celsius (default; wind in km/h) or fahrenheit (wind in mph); precipitation is always mm |
rounding | string | no | none (default) or integer: round each member's value to a whole unit before counting, for brackets stated in whole degrees |
brackets | array of object | yes | Up to 30 brackets, both ends included; leave min or max out for an open end. price is the market price you hold for the bracket, 0 to 1 (optional) |
Example request
curl -i -X POST https://agent402.tools/api/weather-market-brackets \
-H "Content-Type: application/json" \
-d '{"place":"New York","units":"fahrenheit","variable":"temperature_max","rounding":"integer","brackets":[{"label":"39 or below","max":39,"price":0.1},{"label":"40 to 49","min":40,"max":49,"price":0.35},{"label":"50 to 59","min":50,"max":59,"price":0.4},{"label":"60 or above","min":60,"price":0.15}]}'Without payment this returns HTTP 402 Payment Required with the exact price for weather-market-brackets; any x402 v2 or MPP client pays it and retries.
Example response
{
"lat": 40.71427,
"lon": -74.00597,
"place": {
"query": "New York",
"name": "New York",
"country": "United States",
"countryCode": "US",
"region": "New York",
"timezone": "America/New_York",
"lat": 40.71427,
"lon": -74.00597,
"source": "geocoding-api.open-meteo.com (GeoNames, CC BY 4.0)",
"credit": "Place data from GeoNames (CC BY 4.0)."
},
"date": "2026-11-18",
"timezone": "America/New_York",
"variable": "temperature_max",
"unit": "°F",
"rounding": "integer",
"brackets": [
{
"label": "39 or below",
"min": null,
"max": 39,
"forecastProbability": 0.0244,
"membersIn": 2,
"marketPrice": 0.1
},
{
"label": "40 to 49",
"min": 40,
"max": 49,
"forecastProbability": 0.8415,
"membersIn": 69,
"marketPrice": 0.35
},
{
"label": "50 to 59",
"min": 50,
"max": 59,
"forecastProbability": 0.1341,
"membersIn": 11,
"marketPrice": 0.4
},
{
"label": "60 or above",
"min": 60,
"max": null,
"forecastProbability": 0,
"membersIn": 0,
"marketPrice": 0.15
}
],
"membersOutsideBrackets": 0,
"members": {
"total": 82,
"byModel": [
{
"model": "ECMWF IFS ensemble",
"members": 51
},
{
"model": "NOAA GEFS ensemble",
"members": 31
}
]
},
"distribution": {
"min": 38.6,
"p10": 41.9,
"p25": 43.6,
"median": 45.8,
"p75": 47.9,
"p90": 50.3,
"max": 53.1,
"mean": 45.9,
"stdDev": 3.02
},
"marketPriceNote": "marketPrice is the number the caller sent for that bracket, shown beside forecastProbability. This tool reads no market feed and makes no comparison or recommendation.",
"method": "Each probability is the share of ensemble members whose value for the date meets the condition. Raw model output at the model grid point, not calibrated to a weather station.",
"source": "computed from Open-Meteo ensemble data, ensemble-api.open-meteo.com (CC BY 4.0)"
}| Field | Type | Always present | In the example |
|---|---|---|---|
lat | number | yes | 40.71427 |
lon | number | yes | -74.00597 |
place | object | yes | 10 fields: query, name, country, countryCode, region, timezone and 4 more |
date | string | yes | 2026-11-18 |
timezone | string | yes | America/New_York |
variable | string | yes | temperature_max |
unit | string | yes | °F |
rounding | string | yes | integer |
brackets | array of objects | yes | 4 items in the example |
membersOutsideBrackets | number | yes | 0 |
members | object | yes | 2 fields: total, byModel |
distribution | object | yes | 9 fields: min, p10, p25, median, p75, p90 and 3 more |
marketPriceNote | string | yes | marketPrice is the number the caller sent for that bracket, shown beside fore... |
method | string | yes | Each probability is the share of ensemble members whose value for the date me... |
source | string | yes | computed from Open-Meteo ensemble data, ensemble-api.open-meteo.com (CC BY 4.0) |
From an MCP client
catalog.call {
"slug": "weather-market-brackets",
"params": {
"place": "New York",
"units": "fahrenheit",
"variable": "temperature_max",
"rounding": "integer",
"brackets": [
{
"label": "39 or below",
"max": 39,
"price": 0.1
},
{
"label": "40 to 49",
"min": 40,
"max": 49,
"price": 0.35
},
{
"label": "50 to 59",
"min": 50,
"max": 59,
"price": 0.4
},
{
"label": "60 or above",
"min": 60,
"price": 0.15
}
]
}
}The hosted connector at https://agent402.tools/mcp needs a payment for weather-market-brackets; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.13.32.
Errors and behavior
bracketsis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/weather-market-brackets returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.02" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/weather-market-brackets", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"place": "New York",
"units": "fahrenheit",
"variable": "temperature_max",
"rounding": "integer",
"brackets": [
{
"label": "39 or below",
"max": 39,
"price": 0.1
},
{
"label": "40 to 49",
"min": 40,
"max": 49,
"price": 0.35
},
{
"label": "50 to 59",
"min": 50,
"max": 59,
"price": 0.4
},
{
"label": "60 or above",
"min": 60,
"price": 0.15
}
]
}),
});Related tools
Weather market board (all cities)
One date, many cities: per city, the ensemble spread of a daily weather value (up to 82 members, ECMWF IFS and NOAA.
Weather probability (ensemble)
Probability that a day's weather meets a condition, from up to 82 ensemble members (ECMWF IFS and NOAA GEFS): a high.
Current weather (global)
Current weather conditions for any location on Earth: temperature, feels-like, humidity, wind speed/direction/gusts.
Kalshi city temperature index
Kalshi's own minute-resolution city temperature index (Fahrenheit), the series its hourly temperature markets settle.
Heat index and wind chill calculator
Heat index, wind chill, humidex, dew point and wet-bulb temperature from the temperature, humidity and wind you supply.
Air quality (global)
Air quality index and current pollutant concentrations for any location: US AQI, PM2.5, PM10, ozone, NO2, SO2, CO.