/v1/hist/dex/:symbol/barsDEX bars
Paginated OHLCV bars for a USD-quoted DEX token, from 1-minute through monthly. Each bar carries t (Unix epoch milliseconds, UTC, marking the bucket's open time), o/h/l/c as realised swap prices within the bucket, and v as the base-asset volume (e.g. ETH swapped, not USD value). Buckets with zero trades are omitted entirely: the series is sparse during low-activity periods, and clients drawing charts should treat a missing minute as 'no data' rather than a zero-priced bar.
- Auth
X-API-Keyheader- Format
- JSON
- Rate limits
- Per-key, see limits
Example
curl -H "X-API-Key: $KEY" -H "Accept-Encoding: gzip" --compressed \
"https://api.sifting.io/v1/hist/dex/ETHUSD/bars?start=2026-05-01&end=2026-05-02&interval=1h&limit=24"{ "data": [ { "t": 1746057600000, "o": 3204.12, "h": 3210.55, "l": 3198.40, "c": 3207.80, "v": 1452.31 } ], "meta": { "symbol": "ETHUSD", "interval": "1h", "as_of": "2026-06-02T12:00:00Z", "next_cursor": "MTc0NjE0NDAwMA" }}Parameters
symbolrequiredstring · path- Base token plus the literal USD suffix, 5–11 characters (e.g. ETHUSD). Case-insensitive.
startrequiredstring · query- Inclusive lower bound on bar time. Required on the first page; cursor overrides on subsequent pages. Accepts YYYY-MM-DD (midnight UTC) or full RFC3339 (2026-05-01T00:00:00Z). Predating the earliest indexed bar returns 422 data_unavailable with the earliest date we can serve.
endstring · query- Inclusive upper bound on bar time. Same shape as start. Defaults to now. Must be strictly after start.
intervalstring · query- Bar size. One of: 1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mo. Default 1m. Same enum across every /hist/* bars endpoint, so a single client schema works across asset classes.
limitinteger · query- Bars per page. Default 1000, max 5000.
cursorstring · query- Pagination token. Opaque. Pass back the value of meta.next_cursor from the previous response verbatim. When present, overrides start. Subsequent pages need no other parameters; the cursor encodes the next start.
Response fields
data[]array- OHLCV bars, oldest first, one per interval bucket.
data[].tint64 (epoch ms)- Bar open time, Unix epoch milliseconds, UTC. The bar covers [t, t + interval).
data[].ofloat- Open price, surfaced as USD.
data[].hfloat- High price, surfaced as USD.
data[].lfloat- Low price, surfaced as USD.
data[].cfloat- Close price, surfaced as USD.
data[].vfloat- Base-asset volume swapped in the bucket (e.g. ETH for ETHUSD), not USD value.
meta.symbolstring- Echoed symbol.
meta.intervalstring- Echoed bar size.
meta.as_ofstring- When the response was produced. RFC 3339, UTC.
meta.next_cursorstring- Opaque pagination token. Present only when the page came back full and more data exists before end; absent at the tail.
Reference
- Known symbol, bars in range
- 200 OK with a populated data array.
- Known symbol, low-activity window
- 200 OK with data: []. Buckets with zero trades are omitted, no gap-fill.
- Window predates indexed history
- 422 data_unavailable, body carries `earliest` so clients can retry.
- Unknown symbol
- 404 not_found (unknown symbol).
- ETHUSD
- Earliest indexed bar: 2021-05-05.
- Roadmap
- New symbols ship via routine releases.
- Settled windows (end ≥ 7 days ago)
- Cached server-side for 30 days. Underlying blocks are immutable.
- Recent / in-progress windows
- Cached server-side for 5 minutes. The most recent bar may still settle.
- Edge
- Cache-Control: no-store on every response. Clients always fetch fresh server data.
- First call
- ?start=2026-05-01&interval=1m&limit=5000
- Next call
- If meta.next_cursor is present, call again with ?cursor=<token>. interval and limit are sticky by convention.
- Tail
- Repeat until meta.next_cursor is absent. A short page is the end-of-data signal.
Error responses
- 404
not_foundSymbol not found.
{ "error": "not_found", "message": "Symbol not found."} - 400
invalid_parameterMissing start (with no cursor), end ≤ start, non-numeric limit, or malformed cursor.
{ "error": "invalid_parameter", "message": "start must be YYYY-MM-DD or RFC3339."} - 400
interval_unsupported_for_marketInterval outside the canonical 1m | 5m | 15m | 30m | 1h | 1d | 1w | 1mo enum.
{ "error": "interval_unsupported_for_market", "message": "interval must be one of: 1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mo."} - 403
forbiddenKey is valid but the tier lacks dex_defi market access.
{ "error": "forbidden", "message": "Plan does not include the dex_defi market."} - 422
data_unavailableStart predates the earliest indexed bar for this symbol. Body carries `earliest`. Retry with start ≥ that date.
{ "error": "data_unavailable", "message": "no source in our aggregation pipeline has data for the requested window", "earliest": "2021-05-05", "symbol": "ETHUSD"} - 502
upstream_errorOur aggregation pipeline returned an error response.
{ "error": "upstream_error" } - 502
malformed_upstreamOur aggregation pipeline returned an unparseable payload.
{ "error": "malformed_upstream" } - 503
upstream_rate_limitedOur aggregation pipeline hit its rate limit. Try again shortly.
{ "error": "upstream_rate_limited" } - 503
historical_unavailableDEX historical data is not configured on this deployment.
{ "error": "historical_unavailable" }