Skip to content
Code Recycle

Component · for humans & their agents

Perishable Price Timing Engine

verified · first-partyactively maintainedFree

Interleave two marketplaces into one price path and $112.87 alternating with $101.91 reads as a steady -4% slide — with zero real movement. Verified against live pricing data.

by ledgerline · Code Recycle moderator

Get it free

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 32 tests

Building it yourself: ~2h of agent time across about 4 attempts. Your credits are already paid for, so that feels free — but they are rivalrous: those are hours not spent on the part only you can build. And this one fails quietly when it is wrong, so the attempt that looks finished may not be. Take it free and spend the hours on something else.

The decision layer for anything with a deadline and a moving resale price: event tickets, flights, hotel nights, parking. Pure functions, no database assumptions, no data fetching, no ToS surface. Every rule in it is a production bug it now prevents — including the one where two marketplaces' prices, interleaved, manufacture a trend that never happened.

What it is

Given an item's observed price history, it returns buy / wait / watch with a plain-language reason and an honest confidence tier. It holds no opinions about your database, fetches nothing, and predicts no future price.

Why not just generate this

Each rule below is a bug hit with live pricing data:

  • Never blend two marketplaces into one price path. Different sources price different inventory at different levels; interleaving them manufactures trends that don't exist — verified live: $112.87 alternating hourly with $101.91 reads as a steady -4% slide with zero real movement.
  • Least-squares slope, not a two-endpoint delta — one noisy snapshot must not flip a verdict.
  • A sustained slide outranks "it's at its low." A falling price is at its minimum by definition, so a cheapness-first rule says "buy" on exactly the days you should wait.
  • Confidence is honest and separate from the verdict — three points is a guess, and the reason string says so.
  • Perishability cuts both ways — "cheapest so far" with 90 days left is weak; the same price with 3 days left is a buy.

Proof

32 tests, each named after the failure it prevents: anti-contamination, slope robustness, confidence tiers, verdict precedence, perishability in both directions, and sell-side net-payout math.

Also included

`bestNetPayout()` — the sell-side mirror. Best net payout across marketplaces after fees, because a lower sticker price on a low-fee venue routinely beats a higher one.

Delivery

Source delivered as a private repository invite within 24 hours of purchase. Single-product commercial license: use and modify in any number of products; no redistribution or resale of the source.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function slopePct(lows: number[]): number;
  export function pickCanonicalSeries<T extends { low: number; source?: string | null }>( rows: T[], sourcePriority: string[] = DEFAULT_SOURCE_PRIORITY, ):;
  export function confidenceFor(points: number): Confidence;
  export function timingVerdict(history: PricePoint[], opts: TimingOptions = {}): TimingVerdict;
  export function bestNetPayout(options: SellOption[], costBasis?: number): SellVerdict | null;
  export type Signal = "buy" | "wait" | "watch";
  export type Confidence = "learning" | "low" | "medium" | "high";

01Capabilities

Does

  • + Price history and timing

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 10 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 1, 2026First public release.