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
| Parameter | Required | Type | Description |
|---|---|---|---|
symbol | Yes | string | Market symbol to query. |
begin | No | string | Start time for range mode, formatted as YYYY-MM-DD HH:MM:SS. |
sort | No | string | Sort order for range mode: ASC (default) or DESC. |
latest | No | integer | Set to 1 to return only the latest snapshot. |
include_candles | No | integer | Set to 1 to include candle payload in range mode. |
includeCandles | No | integer | camelCase alias for include_candles. |
attach | No | integer | Set to 1 to request the upstream attach flag for additional context data. |
How to Use It
A typical client flow is:
- Decide whether you need the latest snapshot or a historical range.
- Pass
latest=1for current-state overlays, or usebeginfor range retrieval. - Read the
snapshotobject in latest mode, or thesupresmap in range mode. - 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
| Field | Type | Description |
|---|---|---|
status | string | success when the request succeeds. |
symbol | string | Requested symbol. |
latest | boolean | Present in latest mode responses. |
opentime | string | null | Snapshot timestamp in broker chart time (BROKER_NY_CLOSE) in latest mode. |
snapshot | object | null | Latest mode snapshot object. |
snapshot.cur | array | Current-timeframe levels. |
snapshot.cur[].idx | number | Index in snapshot. |
snapshot.cur[].type | string | S or R. |
snapshot.cur[].price | number | Level price. |
snapshot.cur[].touches | number | Touch count in window. |
snapshot.cur[].age_bars | number | Optional age in bars within the source timeframe. |
snapshot.cur[].score | number | Optional upstream quality/ranking score (higher = stronger/more relevant). |
snapshot.mtf | array | Multi-timeframe levels (if present). |
snapshot.mtf[].idx | number | Index in MTF list. |
snapshot.mtf[].type | string | S or R. |
snapshot.mtf[].price | number | Level price. |
snapshot.mtf[].touches | number | Touch count in window. |
snapshot.mtf[].age_bars | number | Optional age in bars within the listed MTF (snapshot.mtf[].tf). |
snapshot.mtf[].score | number | Optional upstream quality/ranking score (higher = stronger/more relevant). |
snapshot.mtf[].tf | string | Timeframe label (e.g. H1). |
snapshot.meta | object | null | Optional snapshot metadata (freshness/source info). |
snapshot.meta.bar_open | string | Source bar open time in broker chart time (BROKER_NY_CLOSE). |
snapshot.meta.source_bar_shift | number | Source bar offset used upstream (0 = live/open bar, 1 = last closed bar). |
snapshot.meta.is_live_bar | boolean | Whether the snapshot was generated from the current/open bar. |
snapshot.meta.snapshot_age_sec | number | Approximate age of this snapshot at response generation time, in seconds. |
snapshot.reg | object | null | Optional regression channel lines (mid/up/dn). |
snapshot.swing | object | null | Optional swing lines (top/bot). |
begin | string | Present in range mode responses. |
sort | string | Present in range mode responses (ASC/DESC). |
count | number | Number of range snapshots. |
supres | object | Range mode map keyed by opentime. |
supres.<opentime> | object | null | Snapshot at that broker-time timestamp (BROKER_NY_CLOSE). |
candles | array | Optional candles in range mode (include_candles=1). |
meta | object | null | Optional metadata block from upstream. |
timeSemantics | object | null | Optional timestamp semantics metadata for interpreting timestamp fields. |
timeSemantics.version | number | Metadata version (currently 1). |
timeSemantics.fieldBases | object | Map of field paths to time basis identifiers. |
timeSemantics.notes | array | null | Optional human-readable notes about timestamp semantics. |
Key Snapshot Notes
type:Smeans support andRmeans 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=falsemeans the snapshot was generated from the last closed bar.truemeans it was generated from the current open bar.snapshot.meta.snapshot_age_secmeasures response-side freshness and is different fromage_bars.- Friendly symbol aliases are normalized before the upstream request, for example
DAX -> GDAXIandSPX500 -> SP500.
Timestamp Semantics
BROKER_NY_CLOSEmeans Darwinex/MT4 chart time aligned to New York close, typicallyUTC+2in winter andUTC+3in summer.- If
timeSemanticsis present, prefer it over hard-coded assumptions in client code.
Errors
| Status | Meaning |
|---|---|
400 | Missing or invalid symbol. |
401 | Missing bearer token. |
403 | Invalid token or no subscription access for the symbol. |
429 | Per-token rate limit exceeded. |
500 | Upstream or internal server error. |
Repository
Public example code is available here:
https://github.com/darwintIQ/API