---
title: "C3: prune derived_prices rows older than the hot window (dry-run by default)"
method: POST
path: "/internal/cron/prune-derived"
tags: ["internal"]
---

# C3: prune derived_prices rows older than the hot window (dry-run by default)

`POST /internal/cron/prune-derived`

Daily retention prune: removes derived_prices rows older than
derived_prices_hot_window_days (default 90d) across all known symbols.

DRY-RUN BY DEFAULT (execute=False) until the founder explicitly enables
automated pruning by flipping the lambda to execute=True. Flipping to
execute=True is a FOUNDER DECISION and is gated by C3 cutover preconditions
(core_ohlc_serving_enabled=True + R2 export verified) enforced inside
prune_derived.run — so even a mistaken flip raises before deleting if the
cutover isn't complete. Deleted rows are irreversible.

pg_cron schedule: daily at 03:50 UTC (0004_schedule_prune_derived.sql).
Dead-man 2x = 48h.

## Headers

- `x-internal-secret` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/goldprice/apis/gold-api.md) · [All operations](https://skmtc.net/goldprice/apis/gold-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/goldprice/gold-api/revisions/7885a141754c/schema)
