sifting/io
GET/hist/forex/:pair/barsgzip required

Forex bars

Paginated OHLC bars for a forex pair, from 1-minute through 1-hour. Each bar carries t (Unix epoch milliseconds, UTC, marking the bucket's open time), o/h/l/c as mid prices, and v always 0. Forex trades nearly 24/7 across a rolling global calendar, so all time inputs are read as UTC, with no exchange-local quirk like /hist/stocks.

Parameters

Parameter
pairrequiredstring · path
Six-character concatenated FX symbol, uppercase. Must match ^[A-Z]{6}$. Examples: EURUSD, USDJPY, GBPUSD, XAUUSD.
startstring · query
Inclusive lower bound on bar time. Required unless cursor is provided. Accepts YYYY-MM-DD (midnight UTC) or full RFC3339 (2026-05-01T00:00:00Z).
endstring · query
Inclusive upper bound on bar time. Same shape as start. Defaults to now.
intervalstring · query
Bar size. One of: 1m, 5m, 15m, 30m, 1h. Advisory. Our pipeline auto-buckets resolution based on the requested window, so meta.interval reports the actual cadence observed in the returned bars.
limitinteger · query
Bars per page. Default 1000, max 2000.
cursorstring · query
Pagination token. Opaque. Pass back the value of meta.next_cursor from the previous response verbatim. When present, overrides start.
Accept-Encodingrequiredstring · header
Must include gzip; otherwise the endpoint returns 406 gzip_required.

Example

request · shell
curl -H "X-API-Key: $KEY" -H "Accept-Encoding: gzip" --compressed \
  "https://api.sifting.io/v1/hist/forex/EURUSD/bars?start=2026-05-01&end=2026-05-06&interval=1h"
200OKapplication/json (gzip)
{  "data": [    {      "t": 1745971200000,      "o": 1.0837,      "h": 1.0844,      "l": 1.0831,      "c": 1.0840,      "v": 0    },    {      "t": 1745974800000,      "o": 1.0840,      "h": 1.0851,      "l": 1.0838,      "c": 1.0848,      "v": 0    }  ],  "meta": {    "symbol": "EURUSD",    "interval": "1h",    "as_of": "2026-05-19T15:21:32Z",    "next_cursor": "eyJzIjoxNzQ2MTQ0MDAwMDAwfQ"  }}
Loading runner…
First load only

Reference

Result shapes by pair state
Known pair, bars in range
200 OK with a populated data array.
Known pair, empty window
200 OK with data: [].
Unknown pair
404 not_found (pair outside our coverage).
Per-bar fields
t
Bar open time, Unix epoch milliseconds, UTC.
o, h, l, c
Open, high, low, close.
v
Always 0 (spot FX is OTC, no canonical volume).
Coverage today
Reliable
Major pairs (EURUSD, USDJPY, GBPUSD, USDCHF, AUDUSD, USDCAD, NZDUSD) are correct out of the box.
Caching
Settled windows (end ≥ 7 days ago)
Cached server-side for 30 days.
Recent / in-progress windows
Cached server-side for 5 minutes.
Edge
Cache-Control: no-store on every response. Clients always fetch fresh server data.

Error responses

  • 404not_found

    Pair is outside our coverage.

    {  "error": "not_found",  "message": "Pair not found."}
  • 400invalid_parameter

    Malformed pair, interval, start, end, or cursor.

    {  "error": "invalid_parameter",  "message": "pair must match ^[A-Z]{6}$."}
  • 406gzip_required

    Heavy endpoint called without Accept-Encoding: gzip.

    { "error": "gzip_required" }
  • 503historical_unavailable

    Forex historical data is not configured on this deployment.

    { "error": "historical_unavailable" }
  • 503upstream_rate_limited

    Our aggregation pipeline hit its rate limit. Try again shortly.

    { "error": "upstream_rate_limited" }

More in Historical OHLCV

See all