# SML Perpetual Roadmap API

> AMC and GME 25-session price roadmaps for AI agents, computed from real market data by exact subsequence dynamic time warping (DTW) against a real regular-trading-hours 1-hour archive. Paid per call with x402 v2: $0.05 USDC on Base mainnet. Publisher: SCRIPTMASTERLABS (Script Master Labs LLC).

## Paid endpoints (x402 v2, exact scheme)

| Endpoint | Price | Returns |
|---|---|---|
| GET https://perpetual-roadmap-api.onrender.com/v1/roadmap/AMC | $0.05 USDC | AMC 25-session roadmap run |
| GET https://perpetual-roadmap-api.onrender.com/v1/roadmap/GME | $0.05 USDC | GME 25-session roadmap run |

- Network: Base mainnet (eip155:8453). Asset: USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Pay to: 0xc29185fa176357612f3194735753e520e91adc46.
- Call without payment to receive HTTP 402 with a base64 PAYMENT-REQUIRED header. Retry with a base64 PAYMENT-SIGNATURE header. A successful response carries a PAYMENT-RESPONSE settlement receipt.
- Paid content is released only after settlement succeeds. If no current run exists the endpoint answers 503 before asking for payment, so no charge occurs.

## What a run contains

- Last completed session, close, freshness (CURRENT or STALE) and the expected last session.
- Daily data provider plus an independent second-provider close cross-check (0.5% tolerance).
- Best historical match and the top 5 non-overlapping historical analogs: dates (ET), DTW distance, correlation r, amplitude scale.
- 25 projected daily candles (open, high, low, close) with the exact historical source bars, plus ensemble median, min and max per day.
- SML Coherent Gate: coherence = |Σ w·d| / Σ w over the analogs' day-25 direction votes, weighted by correlation; PASS when not flat and coherence ≥ 0.6.
- SHA-256 hash of the exact inputs and of the engine source, for audit.

## Method

- Query: last 60 completed daily closes, log space, z-normalized. In-progress sessions are excluded.
- Search: every window length from 1× (AMC) or 0.75× (GME) to 3× the query, Sakoe-Chiba band ±10%, symmetric-2 step pattern, two-sided LB_Keogh pruning that is provably identical to brute force.
- No look-ahead: a matched window and its 25-session continuation end before the query begins.
- Reference archives: AMC 2021-05-18 to 2021-08-31; GME 2020-01-01 to 2025-12-31; regular-hours 1-hour bars anchored at 09:30 ET.
- Runs rebuild automatically 20 minutes after each NYSE close.

## Free endpoints

- [Status](https://perpetual-roadmap-api.onrender.com/v1/status): availability, freshness and data status per symbol.
- [AMC preview](https://perpetual-roadmap-api.onrender.com/v1/preview/AMC) and [GME preview](https://perpetual-roadmap-api.onrender.com/v1/preview/GME): provenance without the projection.
- [x402 manifest](https://perpetual-roadmap-api.onrender.com/.well-known/x402)
- [OpenAPI](https://perpetual-roadmap-api.onrender.com/openapi.json)
- [MCP endpoint](https://perpetual-roadmap-api.onrender.com/mcp): tools perpetual_status, perpetual_preview, perpetual_x402_contract.
- [Human app](https://perpetual-cycle-roadmap.onrender.com)

## Limits

- Historical-analog scenario, not investment advice. Past price patterns do not guarantee future prices.
- Real data only: when providers fail the API reports the failure; it never fills gaps with synthetic data.
