Pair Time Series

Returns daily OHLC data for a specific currency pair. Supports optional date range filtering.

Request

curl https://api.bytetree.io/api/rates/GBPUSD

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

Path Parameters

NameTypeRequiredDescription
pairstringYesCurrency pair code (e.g. GBPUSD, EURUSD). Case-insensitive.

Query Parameters

NameTypeRequiredDescription
fromstringNoStart date in YYYY-MM-DD format. Inclusive.
tostringNoEnd date in YYYY-MM-DD format. Inclusive.
formatstringNoResponse format: json (default), csv, or toon

Response

FieldTypeDescription
pairstringThe normalised (uppercase) pair code
countnumberNumber of data points returned
dataarrayArray of daily OHLC objects

Each data point:

FieldTypeDescription
datestringISO 8601 date
opennumber | nullOpening price
highnumber | nullDay high
lownumber | nullDay low
closenumberClosing price
{
  "pair": "GBPUSD",
  "count": 31,
  "data": [
    {
      "date": "2026-01-02T00:00:00.000Z",
      "open": 1.2520,
      "high": 1.2560,
      "low": 1.2510,
      "close": 1.2545
    },
    {
      "date": "2026-01-03T00:00:00.000Z",
      "open": 1.2545,
      "high": 1.2590,
      "low": 1.2535,
      "close": 1.2567
    }
  ]
}

Notes