| Endpoint | Method | Params | Response | Handler |
details | GET / POST | ticker (query or JSON body) | StockDetailsResponse: company, price, metrics, earnings, watcher_count, quarters[]. 404 unknown ticker. | stockDetails.ts |
leaderboard | GET / POST | page, pageSize, sortBy, sortDir (browse only), search | {stocks: LeaderboardStock[], pagination}; each stock has price_history (1d bars) and sparkline (closes). | stockLeaderboard.ts |
price-history | GET | ticker + either timeframe (1d 5d 1m 3m 6m 1y 2y ytd) or from[/to] | {ticker, timeframe, interval_type, bars[], count}. Timestamps in Eastern Time with offset. 400 when both modes are given. | priceHistory.ts |
logos | GET / POST | page (≥1), pageSize (1-100) | {logos: [{ticker, icon, logo}], pagination}; urls into the company-logos bucket. | stockLogos.ts |
news | GET | ticker, limit (1-50, default 10) | StockNewsResponse from Stock_News_* with per-ticker sentiment. | stockNews.ts |
| Endpoint | Body | Writes | Cron |
refresh | {tiers?: string[]} | Stock_Current_Quotes | mega 5s, large+mid 30s, small 60s (trading hours) |
ingest-minute-bars | none | Stock_Price_Minute | every 30s in session |
refresh-historical | {interval_type, tiers, check_existing} | Stock_Price_History (intraday/hourly) | via SQL wrappers, 5-10 min |
backfill-daily | {from_date, to_date} ≤31 days | Stock_Price_Daily | 01:00 UTC Tue-Sat |
refresh-market-cap | none | shares_outstanding on quotes | 07:00 UTC |
refresh-company-profiles | none | Companies, logos bucket | every 6h / weekly |
refresh-earnings | none | Earnings_Metrics | 00,06,12,18 UTC |
refresh-news | none | Stock_News_* | every 6h |
retry-blocked · hydrate · prune-stale | none | Companies.blocked, quotes, history | daily / every 5 min / daily |
repair-splits | {days_back?, max_tickers?} | daily bars after a split | 15:00 & 21:00 UTC; weekly backlog |
poll-edgar-filings · refresh-cik-map · refresh-filings · backfill-filings | see lesson 9 | Stock_SEC_Filings, SEC_CIK_Tickers | 1 min / daily / nightly |
backfill-insider-transactions · refresh-insider-transactions · backfill-financials · refresh-financials · refresh-wsb-sentiment | see lesson 9 | insider, financials, sentiment tables | various |