Introductory PricingSingle Symbol $10 (was $19) · PRO $49 (was $99) · 14-day PRO trial

TrendMatrix API

TrendMatrix API

This endpoint returns a multi-timeframe snapshot of trend direction and strength for a symbol.

Use it when you want a compact directional view across multiple timeframes for chart overlays, dashboards, or automation logic.

Endpoint

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

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 most recent snapshot.
include_candlesNointegerSet to 1 to include candle payload when available.
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 only the latest snapshot or a historical range.
  2. Request the endpoint with latest=1 for current state, or use begin for history.
  3. Read the data.trend map in latest mode, or the trendmatrix map in range mode.
  4. Use dir and strength as compact directional context in your application.

Example Request

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

Response Example

{
  "status": "success",
  "latest": true,
  "opentime": "2026-02-10 15:00:00",
  "data": {
    "time": "2026-02-10 15:00:00",
    "trend": {
      "M5":  { "dir": "Bullish", "strength": 2 },
      "M30": { "dir": "Ranging", "strength": 0 },
      "H1":  { "dir": "Bearish", "strength": 2 },
      "H4":  { "dir": "Bearish", "strength": 3 },
      "D1":  { "dir": "Ranging", "strength": 0 },
      "W1":  { "dir": "Bullish", "strength": 1 }
    }
  },
  "timeSemantics": {
    "version": 1,
    "fieldBases": {
      "opentime": "BROKER_NY_CLOSE",
      "data.time": "BROKER_NY_CLOSE"
    }
  }
}

Response Field Reference

FieldTypeDescription
statusstringsuccess when the request succeeds.
latestbooleanWhether the response is the latest snapshot only.
opentimestringSnapshot time in broker chart time (BROKER_NY_CLOSE).
dataobjectTrendMatrix snapshot payload.
data.timestringSnapshot time in broker chart time (BROKER_NY_CLOSE).
data.trendobjectMap of timeframe to trend status.
data.trend.M5objectExample timeframe block.
data.trend.M5.dirstringBullish, Bearish, or Ranging.
data.trend.M5.strengthnumberStrength scale (0 = none).
beginstringPresent in range mode responses.
sortstringPresent in range mode responses (ASC/DESC).
countnumberNumber of range snapshots.
trendmatrixobjectRange mode map keyed by opentime (if provided by upstream).
trendmatrix.<opentime>object | nullTrendMatrix snapshot at that broker-time timestamp (BROKER_NY_CLOSE).
candlesarrayOptional candles payload (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 Field Notes

  • dir is one of Bullish, Bearish, or Ranging.
  • strength is a relative integer scale where 0 means no clear trend.
  • Timeframe keys in data.trend can vary by market or source, for example M1, M5, M15, M30, H1, H4, D1, and W1.
  • 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