sifting/io
GET/hist/dex/:symbol/bars

DEX bars

Paginated OHLCV bars for a USD-quoted DEX token, 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 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.

Parameters

Parameter
symbolrequiredstring · path
Base token plus the literal USD suffix, 5–11 characters (e.g. ETHUSD). Case-insensitive. Currently supported: ETHUSD. The supported set expands over time; symbols outside it return 404.
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. Default 1m. Same enum as /hist/crypto, /hist/forex, and /hist/stocks 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.

Example

request · shell
# First page, hourly ETH barscurl -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" # Subsequent page, drop start and pass cursorcurl -H "X-API-Key: $KEY" -H "Accept-Encoding: gzip" --compressed \  "https://api.sifting.io/v1/hist/dex/ETHUSD/bars?cursor=MTc0NjE0NDAwMA&interval=1m&limit=5000"
200OKapplication/json
{  "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"  }}
Loading runner…
First load only

Reference

Result shapes by symbol state
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 (symbol outside the supported set).
Per-bar fields
t
Bar open time, Unix epoch milliseconds, UTC. The bar covers [t, t + interval).
o, h, l, c
Realised execution prices within the bucket, surfaced as USD.
v
Base-asset volume swapped in the bucket (e.g. ETH for ETHUSD), not USD value. Same convention as /hist/crypto.
meta.next_cursor
Present only when the page came back full and more data exists before end; absent at the tail.
Supported symbols
ETHUSD
Earliest indexed bar: 2021-05-05.
Roadmap
New symbols ship via routine releases. Clients should treat the supported set as expanding over time and handle 404 not_found gracefully.
Caching
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.
Pagination pattern
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

  • 404not_found

    Symbol outside the supported set.

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

    Missing start (with no cursor), end ≤ start, non-numeric limit, or malformed cursor.

    {  "error": "invalid_parameter",  "message": "start must be YYYY-MM-DD or RFC3339."}
  • 400interval_unsupported_for_market

    Interval outside the canonical 1m | 5m | 15m | 30m | 1h enum.

    {  "error": "interval_unsupported_for_market",  "message": "interval must be one of: 1m, 5m, 15m, 30m, 1h."}
  • 403forbidden

    Key is valid but the tier lacks dex_defi market access.

    {  "error": "forbidden",  "message": "Plan does not include the dex_defi market."}
  • 422data_unavailable

    Start 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"}
  • 502upstream_error

    Our aggregation pipeline returned an error response.

    { "error": "upstream_error" }
  • 502malformed_upstream

    Our aggregation pipeline returned an unparseable payload.

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

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

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

    DEX historical data is not configured on this deployment.

    { "error": "historical_unavailable" }

More in Historical OHLCV

See all