FX Namespace — /api/fx/*

A dedicated, zero-ambiguity surface for FX score and metric data. Use this in preference to the polymorphic veneer on /api/assets and /api/metrics when building FX-only views — it removes the asset-vs-rate fallback branching and exposes the FX-specific row shape directly.

Endpoints

MethodPathDescription
GET/api/fxList of tracked FX pairs with latest scores and trend regime
GET/api/fx/:symbolLatest computed metrics for a single FX pair
GET/api/fx/:symbol/seriesDaily metric time series for a single FX pair

Surface boundary

ConcernSurface
Raw FX rate OHLC and date data/api/rates, /api/rates/sparklines, /api/rates/:pair
FX scores, trend regimes, and computed metrics/api/fx/* (this namespace)
Polymorphic FX rows alongside other asset types/api/assets?type=fx, /api/assets/:fxsymbol, /api/metrics/:fxsymbol/latest, /api/metrics/:fxsymbol

The polymorphic surfaces fall back to FX data when a symbol doesn’t resolve as a registered Asset, so a single client path can iterate across stocks, crypto, FX, and others. /api/fx/* is the recommended surface when the consumer is FX-only.

Symbol form

FX-pair symbols use concatenated form on the wire (e.g. EURUSD); name fields render slash form (EUR/USD) for display. USDUSD resolves with synthetic close 1.0, matching the rate-data side.

Route specificity

Within /api/fx/:symbol/*, the more-specific paths register first — series and (where present) prices are matched before the bare /api/fx/:symbol. Reserved-word symbols don’t conflict because the registered FX-pair set is finite and well-known.

Notes