market-data-hub

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.

Endpoints

Admin endpoints

Requires X-API-Key matched against ADMIN_KEYS (a separate secret from API_KEYS). Unset = disabled.

Authentication

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"

Defaults

Sources: Yahoo Finance (primary) and Alpha Vantage (fallback, requires ALPHAVANTAGE_API_KEY). Source provenance is on every row.