A small read-only JSON API serving daily stock OHLC from a Cloudflare D1 store. Writes happen on an internal 5-minute cron only — there is no way to POST data through this API.
GET /prices?symbol=…&from=YYYY-MM-DD&to=YYYY-MM-DD&limit=N — daily OHLC rows for a symbolGET /symbols — which symbols are stored, with date rangesGET /healthz — row counts and last cron-run status (unauthenticated)
Requires X-API-Key matched against ADMIN_KEYS
(a separate secret from API_KEYS). Unset = disabled.
GET /admin/runs?limit=N&status=ok|partial|error|running — recent cron-run rows for ops (omit status for all)POST /admin/trigger — fire a cron tick now (returns 202); poll /admin/runs for the result
All endpoints except /healthz and this index require a header
X-API-Key: <your-key>. Keys are issued by the operator.
curl -H "X-API-Key: $KEY" "https://market-data-hub.m78u.com/prices?symbol=SAP.DE&from=2025-01-01&to=2025-06-30"
from defaults to to − 365 days; to defaults to today (UTC).limit defaults to 365 and caps at 5000. limit truncates the OLDEST end of the range, so you always get the most recent rows within the window.open/high/low/close) are JSON strings to avoid IEEE-754 drift.
Sources: Yahoo Finance (primary) and Alpha Vantage (fallback, requires
ALPHAVANTAGE_API_KEY). Source provenance is on every row.