cron

Cron Price History Snapshot

Daily keep-fresh job for the price_history table — upserts the latest daily OHLCV bars for the full active universe (screener_cache.ticker) via yfinance.

Schedule: daily ~22:30 UTC (after the US market close). Fetches a short trailing window (default 5 calendar days) and upserts ON CONFLICT (symbol, date), so a missed run / weekend / holiday self-heals on the next run with no duplicate rows.

Isolated infrastructure: yfinance ONLY (does NOT touch AlphaVantage / AV quota) and does NOT trigger the screener batch.

Query params: lookback_days: optional override of the trailing fetch window (default 5). NOTE (PF-01 swap guard): a long manual window overlaps far more stored history. A symbol is withheld (logged ERROR "WITHHELD", nothing written for it) when EVERY overlapping stored close differs from the fetched series by >25% and not by one uniform split ratio -- e.g. a window that spans two splits while the stored bars reflect only one of them, so every overlapping date is off by 1/2 or 1/4. Repair such names with a targeted backfill (scripts/backfill_price_history_deep.py), not this override.

post/cron/price-history-snapshot

Request

  • Base URL: https://api.equity-rank.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.equity-rank.com/cron/price-history-snapshot
  • Auth: none declared

Query parameters

lookback_daysinteger nullable

Headers

x-cron-secretstring nullable

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 2 revisions of this API.