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
| Method | Path | Description |
|---|---|---|
GET | /api/fx | List of tracked FX pairs with latest scores and trend regime |
GET | /api/fx/:symbol | Latest computed metrics for a single FX pair |
GET | /api/fx/:symbol/series | Daily metric time series for a single FX pair |
Surface boundary
| Concern | Surface |
|---|---|
| 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
- Per-row metric fields use the same keys as
/api/metrics— see the Latest Metrics reference for descriptions ofbyteTrendCapr200w,trendRegimeCapr200w, MAs, deviations, etc. - The
?fields=projection is honoured on/api/fxand/api/fx/:symbol/serieswith the same semantics as the metrics endpoints —dateandcloseare always returned regardless.