Four indicators are calculated server-side on Massive: the simple moving average, the exponential moving average, the relative strength index and MACD. Three of them share a parameter shape, so you can switch between them without changing your code, and MACD does not, which is the one thing that catches people out. Anything beyond those four you build yourself from the aggregate bars.
Applies to
- Plans: every plan, including the free Basic tier.
- Endpoints: /v1/indicators/sma, /ema, /rsi and /macd, each followed by the ticker.
- Asset classes: stocks, options, indices, forex and crypto, using that asset class's ticker format.
How to call one
curl -X GET "https://api.massive.com/v1/indicators/sma/AAPL?timespan=day&window=14&limit=1&apiKey=YOUR_API_KEY"
Response
{
"results": {
"values": [
{ "timestamp": 1789012800000, "value": 317.89785714285716 }
]
},
"status": "OK"
}
MACD returns three numbers per point rather than one, because the indicator is a line, its signal and the difference between them:
{ "timestamp": 1789012800000, "value": 2.3605662226668187, "signal": 1.5719231323333052, "histogram": 0.7886430903335135 }
The four, and what they answer
The four cover the two things most strategies start from, a trend measure and a momentum measure:
| Indicator | Endpoint | What it is |
|---|---|---|
| Simple moving average | /v1/indicators/sma/{ticker} | The plain average of the last N closes |
| Exponential moving average | /v1/indicators/ema/{ticker} | A weighted average that reacts faster to recent prices |
| Relative strength index | /v1/indicators/rsi/{ticker} | A 0 to 100 measure of how one-sided recent moves have been |
| MACD | /v1/indicators/macd/{ticker} | The gap between two exponential averages, with its own signal line |
SMA, EMA and RSI each take timespan and window, so a 14-day RSI and a 14-minute RSI are the same call with one parameter changed. MACD is the exception: it is built from two averages and a signal line, so it takes short_window, long_window and signal_window instead. Passing window to MACD is silently ignored and you get the defaults.
For anything else, use the bars
There are only four, so a Bollinger band, an ATR or a stochastic is yours to compute. Pull the aggregate bars you need and calculate from them. Two things make that reliable: request enough history to cover your longest lookback plus the period you want to display, and remember that bars are split-adjusted by default, so an indicator computed across a split will jump unless you use adjusted=false consistently.
Why these four rather than a library
These four are here because they are the ones almost every integration asks for first, and calculating them server-side saves pulling a long bar history just to reduce it to one number. Beyond that, indicator definitions vary between platforms, sometimes in ways that change the output, so a large built-in library would produce numbers that disagree with whatever your users are comparing against. Bars plus your own definition is the honest version.
If you see an error
A response with no values in results means the endpoint could not compute a point for the time you asked for, not that your date range was too short. Common causes are a timestamp that matches no bar (a weekend, a market holiday, or a millisecond value that is not the start of a bar), a lowercase ticker, and a ticker whose whole history has fewer bars than the window, such as a recent listing. An indicator needs at least window bars (long_window for MACD) before it can produce its first point.
Values that jump on one date are usually a split. Check whether you are mixing adjusted and unadjusted bars.
{"status":"NOT_AUTHORIZED"} is about the asset class rather than the indicator: the indicator endpoints follow the same subscriptions as the bars they are built from.

