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
| Name | Type | Required | Description |
|---|
pair | string | Yes | Currency pair code (e.g. GBPUSD, 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. |
format | string | No | Response format: json (default), csv, or toon |
Response
| Field | Type | Description |
|---|
pair | string | The normalised (uppercase) pair code |
count | number | Number of data points returned |
data | array | Array of daily OHLC objects |
Each data point:
| Field | Type | Description |
|---|
date | string | ISO 8601 date |
open | number | null | Opening price |
high | number | null | Day high |
low | number | null | Day low |
close | number | Closing 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
- The
pair parameter is case-insensitive (gbpusd and GBPUSD both work)
- Without
from/to, returns all available history for the pair
- Data is sorted chronologically (oldest first)
- Returns an empty
data array if the pair code is not found