FX Pair Price Series

Returns the close-only price series for a single FX pair. The canonical zero-ambiguity surface for raw FX price history within the /api/fx/* namespace — paired with /api/fx/:symbol/series for scores and metrics.

Request

curl https://api.bytetree.io/api/fx/EURUSD/prices

# With date range
curl "https://api.bytetree.io/api/fx/EURUSD/prices?from=2026-01-01&to=2026-01-31"

Path Parameters

NameTypeRequiredDescription
symbolstringYesConcatenated FX pair code (e.g. EURUSD). Case-insensitive

Query Parameters

NameTypeRequiredDescription
fromstringNoInclusive ISO YYYY-MM-DD start date
tostringNoInclusive ISO YYYY-MM-DD end date
formatstringNoResponse format: json (default), csv, or toon

Response

FieldTypeDescription
symbolstringThe normalised (uppercase) symbol
countnumberNumber of data points returned
dataarrayArray of daily price records, sorted ascending by date

Each record in data:

FieldTypeDescription
datestringISO 8601 date
closenumberDaily close rate
{
  "symbol": "EURUSD",
  "count": 2,
  "data": [
    { "date": "2026-05-04T00:00:00.000Z", "close": 1.16720 },
    { "date": "2026-05-05T00:00:00.000Z", "close": 1.16838 }
  ]
}

Errors

StatusDescription
404The symbol has no FX records. Note: an unknown but otherwise well-formed symbol (e.g. XYZUSD) is treated the same as a known symbol with no data

Why close-only

FX rates are conventionally rendered as line series, not candlesticks — intraday OHLC isn’t meaningful for daily-fix FX, and ByteTree’s own FX charts are line-only. The endpoint reflects that convention rather than padding the row with synthetic open/high/low/volume fields.

For raw OHLC rate data (where open, high, low, close and dates do exist on the underlying record) see /api/rates/:pair.

Polymorphic equivalent

GET /api/prices/:symbol also resolves FX symbols and returns the same { date, close } shape for FX (no synthetic OHLC). Use this endpoint when the consumer is FX-only; use the polymorphic surface when iterating across mixed asset types.

Notes