# Recurrence Expander

> Recurrence Expander is a paid API for AI agents from oddments-x402.exe.xyz, paid per call via x402, $0.02/call, status down (last checked 2026-09-15).

Expands RFC 5545 RRULE and cron expressions into exact UTC timestamps with correct IANA timezone and DST handling, returning an Ed25519-signed reproducibility receipt.

## Facts

- Endpoint: POST https://oddments-x402.exe.xyz/v1/expand
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/recurrence-expander-9aa37ba5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4Njv8tPJ-E7CUmRvYKbhq

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 recurrence-expander-9aa37ba5 -d '<json body>'
```

Example prompt: Expand this cron expression '30 9 * * 1-5' in America/New_York for the next 5 occurrences starting 2026-03-06, and flag any DST anomalies like spring-forward gaps or fall-back duplicates.

## When to prefer this

Choose this endpoint when you need deterministic, auditable expansion of cron or RRULE recurrences with correct DST handling — especially when spring-forward nonexistent times or fall-back ambiguous times must be explicitly flagged rather than silently assumed. The signed receipt makes it suitable for compliance, audit trails, or reproducible scheduling pipelines. Prefer it over DIY expansion when you need a versioned record of exactly which tzdata produced the answer.

## Known failure modes

- Invalid RRULE or cron syntax returns a 400 error
- Unrecognized IANA timezone identifier causes a parse error
- Missing payment or insufficient USDC balance returns a 402 Payment Required
- Count exceeding API limits may be rejected or truncated
- Network timeout if expansion is very large
- Stale tzdata if a very recent DST rule change hasn't been reflected yet

## How this service works

Turn RFC 5545 RRULEs and cron expressions into exact UTC instants. IANA timezones and daylight saving are handled correctly. The two hard cases are flagged by name. A spring-forward time that never happens is flagged nonexistent. A fall-back time that happens twice is flagged ambiguous. Results are deterministic and reproducible. Every response reports the tzdata and library versions it used. Every response also carries an Ed25519-signed reproducibility receipt. The receipt binds the input hash, the output hash and the engine versions. WHAT YOU ARE NOT BUYING: secrecy. You can expand the rule yourself and check every instant we return. The fee buys current timezone data, the two daylight-saving edge cases handled rather than assumed, and a reproducible record of which versions produced the answer. WHAT THIS DOES NOT DO, stated up front. (1) It consults no calendar, holiday feed or exception list. It expands exactly the rule you send, so a cancellation you did not encode is invisible to it. (2) Timezone answers are only as current as the tzdata version reported in every response. A zone whose rules change after that release is computed on the old rules. (3) cron is the 5-field POSIX form only, as published in the request schema. No seconds field and no vendor extensions. (4) The signature proves origin and integrity, not correctness. (5) Rules are capped at 25 per call and 500 occurrences per rule. A request over either is refused with a 400 invalid_rule before any expansion happens. Free preview endpoint at /v1/preview.

Operated by Oddments. Paid per call in USDC on Base via x402.

## Output

A JSON object containing an array of occurrence objects (each with utc, local, utc_offset, is_dst, and flags arrays for 'nonexistent' or 'ambiguous' anomalies), a crosses_dst_transition boolean, anomaly summaries, and an Ed25519-signed reproducibility receipt binding the input hash, output hash, and engine versions (Python, tzdata, croniter).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "maximum": 500,
   "minimum": 1,
   "description": "default occurrence count applied to any rule that omits its own 'count'"
  },
  "rules": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "tz",
     "start"
    ],
    "properties": {
     "id": {
      "type": "string",
      "description": "echoed back to correlate results"
     },
     "tz": {
      "type": "string",
      "description": "IANA zone, e.g. Europe/London"
     },
     "cron": {
      "type": "string",
      "description": "5-field POSIX cron (exclusive with rrule)"
     },
     "count": {
      "type": "integer",
      "maximum": 500,
      "minimum": 1,
      "description": "occurrences to return for this rule; overrides the request's top-level 'limit' when set"
     },
     "rrule": {
      "type": "string",
      "description": "RFC 5545 RRULE (exclusive with cron)"
     },
     "start": {
      "type": "string",
      "description": "ISO-8601 local wall time, no offset"
     }
    }
   },
   "maxItems": 25,
   "minItems": 1,
   "description": "the batch of recurrence rules to expand in this call"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "receipt": {
   "price": "$0.02",
   "engine": {
    "python": "3.12.3",
    "tzdata": "2026.3",
    "croniter": "6.0.0"
   },
   "key_id": "21bd7c9628fe756b",
   "service": "Recurrence Expander",
   "endpoint": "/v1/expand",
   "algorithm": "Ed25519",
   "issued_at": "2026-08-06T09:32:04.259588Z",
   "input_sha256": "5db5c3766a334acfe412d182fee09843c9d1f8cfcf5cc707f206cb4d1f8deb79",
   "output_sha256": "43b7eb2d6aba21f1a7ac4a6c51bee6990c9d7b41645865330a67e5f328c3b239",
   "signature_b64": "MWfephbP/QDn0vHusntmDIBdK+Vm4r2Dfdgy7Sxh5yUE1C3JNwjrrqMrmygcrIjAJsAT0sDdTWducb6+lNJfBA==",
   "signed_fields": [
    "endpoint",
    "engine",
    "input_sha256",
    "issued_at",
    "key_id",
    "output_sha256",
    "price",
    "receipt_version",
    "service"
   ],
   "receipt_version": "oddments-receipt/1"
  },
  "results": [
   {
    "id": "standup",
    "tz": "America/New_York",
    "kind": "cron",
    "count": 5,
    "anomalies": [],
    "occurrences": [
     {
      "utc": "2026-03-06T14:30:00Z",
      "flags": [],
      "local": "2026-03-06T09:30:00",
      "is_dst": false,
      "utc_offset": "-05:00"
     }
    ],
    "crosses_dst_transition": true
   }
  ],
  "total_occurrences": 5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/recurrence-expander-9aa37ba5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from oddments-x402.exe.xyz](https://www.zero.xyz/host/oddments-x402.exe.xyz/llms.txt)
