81trust / 100

Forecast Ses

by Forecast (simple exponential in Weather & location

x402 APIPassing, checked 2 h ago

Simple exponential smoothing (SES) - level-only forecast for series without trend or seasonality. Higher alpha (closer to 1) tracks recent values aggressively; lower alpha (closer to 0) smooths through noise. Default alpha=0.3 is a common conservative pick; pass an explicit alpha or use forecast-eval to pick the one that minimizes backtest error. Forecast is flat (= last fitted level) for all horizons.

POST https://agent402.tools/api/forecast-ses

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
190 ms typical, 190 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/forecast-ses" \
  -H "content-type: application/json" \
  -d '{"alpha":0.3,"horizon":3,"values":[42,44,41,43,45,44,46,45,47,46]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fforecast-ses
const res = await pay("https://agent402.tools/api/forecast-ses", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"alpha":0.3,"horizon":3,"values":[42,44,41,43,45,44,46,45,47,46]}),
});
console.log(await res.json());

Example input

{
  "alpha": 0.3,
  "horizon": 3,
  "values": [
    42,
    44,
    41,
    43,
    45,
    44,
    46,
    45,
    47,
    46
  ]
}

Example output

{
  "alpha": 0.3,
  "forecast": [
    {
      "lower95": 42.7805,
      "point": 45.4431,
      "step": 1,
      "upper95": 48.1057
    },
    {
      "lower95": 42.6633,
      "point": 45.4431,
      "step": 2,
      "upper95": 48.2229
    },
    {
      "lower95": 42.5508,
      "point": 45.4431,
      "step": 3,
      "upper95": 48.3354
    }
  ],
  "horizon": 3,
  "method": "ses",
  "n": 10
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402190 ms$0.001
7 h agoPassed402205 ms$0.001