Founding pricing available nowPricing review on May 1Early customers keep their price for life

SupRes (Support/Resistance) API

This endpoint returns support and resistance snapshots for a symbol.

It can be used in two main ways:

  • latest mode, to fetch the most recent snapshot
  • range mode, to retrieve a historical set of snapshots

Endpoint

GET https://api.darwintiq.com/v1/supres

Query Parameters

ParameterRequiredTypeDescription
symbolYesstringMarket symbol to query.
beginNostringStart time for range mode, formatted as YYYY-MM-DD HH:MM:SS.
sortNostringSort order for range mode: ASC (default) or DESC.
latestNointegerSet to 1 to return only the latest snapshot.
include_candlesNointegerSet to 1 to include candle payload in range mode.
includeCandlesNointegercamelCase alias for include_candles.
attachNointegerSet to 1 to request the upstream attach flag for additional context data.

How to Use It

A typical client flow is:

  1. Decide whether you need the latest snapshot or a historical range.
  2. Pass latest=1 for current-state overlays, or use begin for range retrieval.
  3. Read the snapshot object in latest mode, or the supres map in range mode.
  4. Use the level, regression, and swing fields in charting or analysis logic.

Example Request

curl -H "Authorization: Bearer [YOUR_TOKEN]" \
  "https://api.darwintiq.com/v1/supres?symbol=EURUSD&latest=1"

Response Example

{
  "status": "success",
  "symbol": "EURUSD",
  "latest": true,
  "opentime": "2026-02-23 14:35:00",
  "snapshot": {
    "cur": [
      {
        "idx": 0,
        "type": "S",
        "price": 1.0829,
        "touches": 3,
        "age_bars": 2,
        "score": 4.6
      },
      {
        "idx": 1,
        "type": "R",
        "price": 1.0864,
        "touches": 2,
        "age_bars": 5,
        "score": 2.9
      }
    ],
    "mtf": [
      {
        "idx": 0,
        "type": "R",
        "price": 1.0882,
        "touches": 1,
        "age_bars": 3,
        "score": 1.8,
        "tf": "H1"
      }
    ],
    "meta": {
      "bar_open": "2026-02-23 14:35:00",
      "source_bar_shift": 1,
      "is_live_bar": false,
      "snapshot_age_sec": 42
    },
    "reg": {
      "mid": { "t1": "2026-02-23 12:00:00", "y1": 1.0831, "t2": "2026-02-23 14:35:00", "y2": 1.0846 },
      "up": { "t1": "2026-02-23 12:00:00", "y1": 1.0862, "t2": "2026-02-23 14:35:00", "y2": 1.0877 },
      "dn": { "t1": "2026-02-23 12:00:00", "y1": 1.0800, "t2": "2026-02-23 14:35:00", "y2": 1.0815 }
    },
    "swing": {
      "top": { "t1": "2026-02-23 13:10:00", "y1": 1.0868, "t2": "2026-02-23 14:35:00", "y2": 1.0872 },
      "bot": { "t1": "2026-02-23 13:10:00", "y1": 1.0819, "t2": "2026-02-23 14:35:00", "y2": 1.0823 }
    }
  },
  "timeSemantics": {
    "version": 1,
    "fieldBases": {
      "opentime": "BROKER_NY_CLOSE"
    }
  }
}

Response Field Reference

FieldTypeDescription
statusstringsuccess when the request succeeds.
symbolstringRequested symbol.
latestbooleanPresent in latest mode responses.
opentimestring | nullSnapshot timestamp in broker chart time (BROKER_NY_CLOSE) in latest mode.
snapshotobject | nullLatest mode snapshot object.
snapshot.curarrayCurrent-timeframe levels.
snapshot.cur[].idxnumberIndex in snapshot.
snapshot.cur[].typestringS or R.
snapshot.cur[].pricenumberLevel price.
snapshot.cur[].touchesnumberTouch count in window.
snapshot.cur[].age_barsnumberOptional age in bars within the source timeframe.
snapshot.cur[].scorenumberOptional upstream quality/ranking score (higher = stronger/more relevant).
snapshot.mtfarrayMulti-timeframe levels (if present).
snapshot.mtf[].idxnumberIndex in MTF list.
snapshot.mtf[].typestringS or R.
snapshot.mtf[].pricenumberLevel price.
snapshot.mtf[].touchesnumberTouch count in window.
snapshot.mtf[].age_barsnumberOptional age in bars within the listed MTF (snapshot.mtf[].tf).
snapshot.mtf[].scorenumberOptional upstream quality/ranking score (higher = stronger/more relevant).
snapshot.mtf[].tfstringTimeframe label (e.g. H1).
snapshot.metaobject | nullOptional snapshot metadata (freshness/source info).
snapshot.meta.bar_openstringSource bar open time in broker chart time (BROKER_NY_CLOSE).
snapshot.meta.source_bar_shiftnumberSource bar offset used upstream (0 = live/open bar, 1 = last closed bar).
snapshot.meta.is_live_barbooleanWhether the snapshot was generated from the current/open bar.
snapshot.meta.snapshot_age_secnumberApproximate age of this snapshot at response generation time, in seconds.
snapshot.regobject | nullOptional regression channel lines (mid/up/dn).
snapshot.swingobject | nullOptional swing lines (top/bot).
beginstringPresent in range mode responses.
sortstringPresent in range mode responses (ASC/DESC).
countnumberNumber of range snapshots.
supresobjectRange mode map keyed by opentime.
supres.<opentime>object | nullSnapshot at that broker-time timestamp (BROKER_NY_CLOSE).
candlesarrayOptional candles in range mode (include_candles=1).
metaobject | nullOptional metadata block from upstream.
timeSemanticsobject | nullOptional timestamp semantics metadata for interpreting timestamp fields.
timeSemantics.versionnumberMetadata version (currently 1).
timeSemantics.fieldBasesobjectMap of field paths to time basis identifiers.
timeSemantics.notesarray | nullOptional human-readable notes about timestamp semantics.

Key Snapshot Notes

  • type: S means support and R means resistance.
  • touches: number of times price respected the level in the snapshot window.
  • age_bars: bars since the level's last relevant pivot or cluster event in that timeframe.
  • score: upstream ranking score used to prioritize stronger or more recent levels.
  • snapshot.meta.is_live_bar=false means the snapshot was generated from the last closed bar. true means it was generated from the current open bar.
  • snapshot.meta.snapshot_age_sec measures response-side freshness and is different from age_bars.
  • Friendly symbol aliases are normalized before the upstream request, for example DAX -> GDAXI and SPX500 -> SP500.

Timestamp Semantics

  • BROKER_NY_CLOSE means Darwinex/MT4 chart time aligned to New York close, typically UTC+2 in winter and UTC+3 in summer.
  • If timeSemantics is present, prefer it over hard-coded assumptions in client code.

Errors

StatusMeaning
400Missing or invalid symbol.
401Missing bearer token.
403Invalid token or no subscription access for the symbol.
429Per-token rate limit exceeded.
500Upstream or internal server error.

Repository

Public example code is available here:

https://github.com/darwintIQ/API