Historical forex OHLC bars (gzip required)
Requires Accept-Encoding: gzip. v is a per-bar tick count where the upstream reports one, else 0. When start predates upstream coverage the API returns 422 with code data_unavailable and an earliest field carrying the first date it can serve.
Request
- Base URLhttps://api.sifting.io
- Auth
- API key in header X-API-Key
- or API key in query parameter api_key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
DEX pair (TOKEN0-TOKEN1) or FX pair (e.g. EURUSD).
Query parameters
Inclusive lower bound (YYYY-MM-DD or RFC3339). Required.
Inclusive upper bound. Default now.
Bar interval. Default 1m. All /v1/hist/* routes accept the same set: intraday (1m–1h), plus 1d (UTC calendar day), 1w (Monday-aligned), and 1mo (calendar month). Coarser bars are aggregated from 1-minute history; a 1d/1w/1mo bar opens at midnight UTC of the period start.
Sort direction by time. asc (default) returns oldest→newest. desc returns newest→oldest and anchors the first page at the most recent bar, so fetching the latest N costs one request instead of paging the whole window. Supported on commodities and forex only; other historical routes are ascending-only.
Opaque pagination cursor from a previous response's meta.next_cursor.
Headers
Must include gzip; this endpoint returns 406 otherwise.
Response
OHLC bars.
Changes
No recorded changes to this operation across all 1 revision of this API.