Knowledge Base/What is a relative strength index (RSI)?

What is a relative strength index (RSI)?

RSI is a number between 0 and 100 measuring how one-sided recent price moves have been. Above 70 is conventionally read as overbought and below 30 as oversold. Massive computes it on the RSI endpoint.

RSI, the relative strength index, is a momentum measure on a 0 to 100 scale, comparing the size of recent gains with the size of recent losses over a window. All gains and no losses pushes it towards 100; all losses pushes it towards 0. Massive calculates it for you on the rsi indicator endpoint, so you pass a ticker, a timespan and a window rather than pulling bars and computing it yourself.

Applies to

  • Plans: every plan, including the free Basic tier.
  • Endpoints: /v1/indicators/rsi/{ticker}, with timespan and window.
  • Asset classes: stocks, options, indices, forex and crypto, using that asset class's ticker format.

How to call it

curl -X GET "https://api.massive.com/v1/indicators/rsi/AAPL?timespan=day&window=14&limit=1&apiKey=YOUR_API_KEY"

Response

{
  "results": {
    "values": [
      { "timestamp": 1789012800000, "value": 58.74808560730398 }
    ]
  },
  "status": "OK"
}

timespan is the bar size the indicator is computed on, and window is how many of those bars it looks back over. A 14 on a day timespan and a 14 on a minute timespan are entirely different indicators.

How to read it

The conventional readings are above 70 for overbought and below 30 for oversold, but they are conventions rather than rules: a strongly trending instrument can sit above 70 for weeks without reversing, which is the most common way RSI is misread.

Choosing a window

A shorter window reacts sooner and produces more signals, most of which are noise; a longer one is steadier and later. There is no correct value, and the common choices are conventions rather than findings. Pick the window from the horizon you actually trade or analyze on, and use the same one consistently rather than tuning it until the history looks good, which is the quickest route to a result that does not repeat.

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 window, such as a recent listing. The indicator cannot produce its first point until window bars have closed.

A jump on a single date is usually a stock split rather than the market. Bars are split-adjusted by default, so mixing adjusted and unadjusted history will show up here.

{"status":"NOT_AUTHORIZED"} is about the asset class rather than the indicator: it follows the same subscription as the bars underneath.

Related


Was this article helpful?

Modernizing Wall St.

Reimagining financial market data for the 21st century.

Schedule a demo

Talk with our market data experts

Recommended

Can't find the answer you're looking for? Contact our team.
  • Title
    Are all indices available through the basic subscription tier?
    Data Coverage Category

    Data Coverage

    Indices Category

    Indices

    Description
    No, and the ones it withholds are the famous ones: SPX, DJI, RUT and VIX all need a paid Indices tier. Basic still reaches more than 10,000 of the 13,000-odd indices Massive publishes, and NDX and the Nasdaq Composite are among them.
  • Title
    Does Massive offer dark pool data?
    Data Coverage Category

    Data Coverage

    Stocks Category

    Stocks

    Description
    Yes. Off-exchange prints, which include dark pool executions, arrive on the ordinary trades feed and are identified by an exchange ID of 4. There is no separate dark pool endpoint, and no way to tell which individual venue a print came from.
  • Title
    Does Massive offer pre-market and after-hours data?
    FAQ Category

    FAQ

    Stocks Category

    Stocks

    Description
    Yes. Every extended-hours trade and quote is published, from 04:00 to 20:00 Eastern. There is no session parameter, so you select a session with timestamps, and expect far fewer aggregate bars outside regular hours because many extended-hours trades are odd lots that cannot set a price.