Skip to content

Indices · Indicators

Indices indicators MACD

MACD of an index.
GET/v1/indices/indicators/macdindicesIndicatorsMacd
On this page

Moving average convergence/divergence: the difference of a short and a long exponential average (value), its signal line and the histogram between them. Computed on the index's value series (indices carry no volume). Values are newest first by default (order=desc); give start_time and end_time to read a range. One request returns at most limit values; meta.coverage.truncated is true when more exist in the range.

Example request

curl -sS --get "https://api.ordermap.si/v1/indices/indicators/macd" \
  -H "Authorization: Bearer $ORDERMAP_API_KEY" \
  --data-urlencode symbol=SPX

Set ORDERMAP_API_KEY to your key. Replace the dates with a recent trading date.

Parameters

10 parameters, 1 required.

ParameterType and limitsDescription
symbolqueryrequiredstringat most 10 characterspattern ^[A-Za-z][A-Za-z0-9]{0,9}$Index symbol, for example SPX.
intervalqueryoptionalstring1m1h1d1w1modefault 1dBar size the indicator is computed on (the feed computes it per time span: minute, hour, day, week or month).
short_windowqueryoptionalintegerdefault 12min 1max 200Short exponential average length.
long_windowqueryoptionalintegerdefault 26min 2max 400Long exponential average length; must exceed short_window.
signal_windowqueryoptionalintegerdefault 9min 1max 200Signal line length.
series_typequeryoptionalstringopenhighlowclosedefault closeWhich bar value the indicator uses.
start_timequeryoptionalintegerunix-msmin 946684800000max 4102444800000Earliest value to return (inclusive). Default: the start of your plan's history.
end_timequeryoptionalintegerunix-msmin 946684800000max 4102444800000End of the range (exclusive).
orderqueryoptionalstringascdescdefault descTime order of the values.
limitqueryoptionalintegerdefault 100min 1max 1000Values to return.

Response

StatusMeaningBody
200Successful response.Schema below
400Invalid, unknown or repeated parameters, or an invalid cursor.Error object
401Missing or invalid API key.Error object
403The plan, dataset release or account state does not allow this request.Error object
422The request is valid but no data exists for it.Error object
429Rate limit, burst limit or cooldown; wait Retry-After seconds.Retry-AfterError object
500Internal error.Error object
503Data temporarily unavailable; retry after Retry-After seconds.Retry-AfterError object
504The request timed out.Error object

Authenticated responses carry the X-RateLimit-* headers (see rate limits); 429 and 503 add Retry-After.

200 response body

  • dataarray<object>required4 fields inside
    • histogramnumberrequiredMACD minus signal.
    • signalnumberrequiredSignal line.
    • timestampintegerunix-msrequiredTime the value applies to (the start of its bar). Unix epoch milliseconds (UTC).
    • valuenumberrequiredMACD line: short minus long exponential average.
  • metaobjectrequiredMeta object

Example response

{
  "data": [
    {
      "histogram": 1.55,
      "signal": 10.86,
      "timestamp": 1792036800000,
      "value": 12.41
    }
  ],
  "meta": {
    "as_of": 1760659200123,
    "coverage": {
      "complete": true
    },
    "delay_ms": 0,
    "delayed": false,
    "request_id": "0199f0c2-5a1e-7c3b-9d4e-2b6f8a1c3d5e",
    "source": "index_feed"
  }
}

Values are illustrative. Missing values are null, never 0.