# Freshness & Updates

Returns are computed from **end-of-day** pricing and refreshed on a fixed weekly cadence, the same
pipeline that powers the [Snowflake Marketplace dataset](/api-vs-snowflake).

## Refresh schedule

| Day | Update |
|---|---|
| Sun, Mon, Tue, Thu, Fri | **Incremental** — recent price changes only; recomputes the affected recent window. |
| Wed, Sat | **Full rebuild** — every fund reloaded and all return tables rebuilt from scratch. |

In addition, any fund with a **new dividend or split** triggers an immediate full reload of that
fund's price history, so its adjusted-close returns stay correct.

## When today's numbers appear

Because pricing is end-of-day, a given trading day's returns become available after that day's
close is processed in the next refresh cycle — not intraday. There are no real-time or intraday
values.

## Knowing how current a fund is

Two fields tell you a fund's data currency without a separate call:

- **`max_return_date`** (on the `Fund` object) — the latest date that fund has return data for.
- **`as_of_date`** (on a trailing-returns row) — the exact trading day a row represents.

## Freshness health check

`GET /healthz` is a public, keyless endpoint that reports data freshness. It returns `200` when the
newest data is current and **`503`** if the freshest date is more than **48 hours** old — a guard
against silently serving stale data. Use it for uptime and staleness monitoring:

```bash
curl https://api.fruitstand.dev/healthz
# {"status":"ok","max_as_of_date":"2026-08-14","age_days":1}
```

(For a pure liveness probe with no data dependency, `GET /livez` always returns `200` while the
service is up.)
