Epic: Replace the single /security/{symbol} page with type-specific routes + templates + JS modules for crypto, ETF, index, forex. Stock keeps /security/{sym} unchanged.
Today every non-stock security (BTCUSD, ^DJI, USDGBP, SPY) renders a US-equity-shaped template: Market Cap / P/E / Key People / Financials / Estimates / SEC / stock-only peers. Almost none of which is meaningful.
URL scheme
GET /crypto/BTCUSD → crypto.html + crypto.js
GET /index/^DJI → index.html + index.js
GET /forex/USDGBP → forex.html + forex.js
GET /etf/SPY → etf.html + etf.js
GET /security/AAPL → security.html + info.js (unchanged)
GET /security/BTCUSD → 301 → /crypto/BTCUSD (legacy compat)
Child issues
Migrated from
docs/TODO-security-types.md — that file will be deleted on the foundation PR (its content is captured here and in the child issues).
Current state worth keeping
detectSecurityType() in internal/server/static/info.js:215 already reads profile.exchange (CRYPTO / CCC / FOREX), the ^ prefix (index), and profile.isEtf (ETF). Reuse.
applySecurityType() (info.js:225) hides Financials / Estimates / SEC for crypto/forex/index. ETFs still see the stock tabs (gap).
- News categories
crypto / forex are already wrapped in internal/news/news.go:546-560.
- Universal EOD chart (
GetHistoricalPriceLight, news.go:362) works for any symbol FMP indexes.
- Search results already carry
Exchange (news.go:18) — we can detect type from search response alone.
Critical gaps
- Single canonical URL, single template — no clean way to give crypto its own affordances without
if-soup in info.js.
- ETF tab-hiding never wired.
- News tab shows all 6 categories for every type.
- Sector tab calls
/stable/stock-peers, useless for non-stocks. No crypto-peer / index-components / ETF-holdings views.
- Trading pipeline runs the SEC analyst for crypto/forex/index/ETF, wasting Ollama calls.
Epic: Replace the single /security/{symbol} page with type-specific routes + templates + JS modules for crypto, ETF, index, forex. Stock keeps
/security/{sym}unchanged.Today every non-stock security (BTCUSD, ^DJI, USDGBP, SPY) renders a US-equity-shaped template: Market Cap / P/E / Key People / Financials / Estimates / SEC / stock-only peers. Almost none of which is meaningful.
URL scheme
Child issues
info-shared.jsextractionMigrated from
docs/TODO-security-types.md— that file will be deleted on the foundation PR (its content is captured here and in the child issues).Current state worth keeping
detectSecurityType()ininternal/server/static/info.js:215already readsprofile.exchange(CRYPTO / CCC / FOREX), the^prefix (index), andprofile.isEtf(ETF). Reuse.applySecurityType()(info.js:225) hides Financials / Estimates / SEC for crypto/forex/index. ETFs still see the stock tabs (gap).crypto/forexare already wrapped ininternal/news/news.go:546-560.GetHistoricalPriceLight, news.go:362) works for any symbol FMP indexes.Exchange(news.go:18) — we can detect type from search response alone.Critical gaps
if-soup in info.js./stable/stock-peers, useless for non-stocks. No crypto-peer / index-components / ETF-holdings views.