Currencies & FX
FX Metric History
GET /api/fx/:symbol/series How one currency pair’s trend scores and metrics have changed, day by day. The rows have the same shape as Metric History — flat, with metric fields at the top level — so the two are interchangeable for currency pairs.
Example
FX metric history
curl "https://api.bytetree.io/api/fx/EURUSD/series?from=2026-05-04&to=2026-05-05&fields=byteTrendCapr200w%2CtrendRegimeCapr200w" \
-H "Authorization: Bearer YOUR_API_KEY" const res = await fetch("https://api.bytetree.io/api/fx/EURUSD/series?from=2026-05-04&to=2026-05-05&fields=byteTrendCapr200w%2CtrendRegimeCapr200w", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
const body = await res.json(); import requests
res = requests.get(
"https://api.bytetree.io/api/fx/EURUSD/series?from=2026-05-04&to=2026-05-05&fields=byteTrendCapr200w%2CtrendRegimeCapr200w",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
body = res.json()
Response
200 {
"symbol": "EURUSD",
"count": 2,
"data": [
{
"date": "2026-05-04T00:00:00.000Z",
"close": 1.16918,
"byteTrendCapr200w": 0,
"trendRegimeCapr200w": "Neutral"
},
{
"date": "2026-05-05T00:00:00.000Z",
"close": 1.1693,
"byteTrendCapr200w": 0,
"trendRegimeCapr200w": "Bear Trend"
}
]
} More requests
Full history
curl https://api.bytetree.io/api/fx/EURUSD/series \
-H "Authorization: Bearer YOUR_API_KEY" With date range
curl "https://api.bytetree.io/api/fx/EURUSD/series?from=2026-01-01&to=2026-01-31" \
-H "Authorization: Bearer YOUR_API_KEY" Cherry-pick fields
curl "https://api.bytetree.io/api/fx/EURUSD/series?fields=byteTrendCapr200w%2CtrendRegimeCapr200w" \
-H "Authorization: Bearer YOUR_API_KEY" Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol |
string |
Yes | Concatenated FX pair code (e.g. EURUSD). Case-insensitive. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from |
string |
No | Start date in YYYY-MM-DD format. Inclusive. |
to |
string |
No | End date in YYYY-MM-DD format. Inclusive. |
fields |
string |
No | Comma-separated list of metric keys to include. date and close are always returned. A well-formed field the record doesn’t have is left out of the response. |
Dates must be real calendar dates in YYYY-MM-DD form, and a malformed field name (e.g. a.b) is a 400 — see Value validation.
Response
| Field | Type | Description |
|---|---|---|
symbol |
string |
The normalised (uppercase) symbol |
count |
number |
Number of data points returned |
data |
array |
Array of daily metric records, sorted ascending by date |
Each record in data:
| Field | Type | Description |
|---|---|---|
date |
string |
ISO 8601 date |
close |
number |
Close rate for the date |
| metric fields | various | Computed metric fields merged at the top level — see Latest Metrics for the full set and definitions |
Notes
- Without
from/to, returns all available history for the pair. - The series has a row for every calendar day. Saturday and Sunday rows repeat Friday’s metrics, because FX metrics are computed over trading days — see Trading-day windows.
- An unknown pair is not an error here: it returns
200withcount: 0and an emptydataarray. FX Price History answers the same symbol with a404. - For the polymorphic call that returns metrics for stocks, crypto, FX, and other types through a single path, see
/api/metrics/:symbol. - For raw OHLC FX rate history (no scores or metrics), see
/api/rates/:pair.