Knowledge Base/How much historical stock data does Massive have?

How much historical stock data does Massive have?

Listed US stock bars, trades and quotes all start on 10 September 2003 and OTC stocks on 31 December 2021, and your plan sets how far back you reach: 2 years of bars on Stocks Basic, 5 on Starter, 10 on Developer and all of it on Advanced.

How much of Massive's stock history you can reach is set by your plan's window, which is counted back from the moment you make the request rather than from a fixed start date, so it moves forward one day every day. The archive behind it starts on the same morning for every listed ticker: the first AAPL quote at 09:00:00 UTC and the first trade at 12:00:01 UTC on 10 September 2003, with nothing on the 8th or the 9th. Trades and quotes are also gated separately from bars, so a plan with years of bars can still have no tick data at all.

Applies to

  • Plans: every Stocks plan, each with its own window. The free Stocks Basic plan is the most limited. Options, indices, forex, crypto and futures plans have their own windows, listed below.
  • Endpoints: /v2/aggs/ticker/{ticker}/range/... for bars, /v3/trades/{ticker} and /v3/quotes/{ticker} for ticks, and the flat files for bulk history.
  • Asset classes: US stocks and ETFs, including OTC. For options, indices, forex, crypto and futures, only the plan windows below.

How far back each product goes

Each stock product's earliest date is listed below. The listed-stock archive starts on one day, and OTC is the exception:

DataEarliestEndpoint
Aggregate bars, from one second upward2003-09-10/v2/aggs/ticker/{ticker}/range/...
Tick-level trades2003-09-10/v3/trades/{ticker}
Tick-level NBBO quotes2003-09-10/v3/quotes/{ticker}
Anything for an OTC ticker2021-12-31the same endpoints

The 2003 floor is the same for every listed ticker rather than the date each company listed, so AAPL, MSFT, IBM and SPY all start on the same day. A listed ticker that starts later started trading later, or changed symbol. OTC is a genuinely different archive: NSRGY and RHHBY both begin on 31 December 2021 and have nothing before it.

The aggregates endpoint will build bars down to one second, so range/1/second works and you do not have to aggregate trades yourself for a per-second series.

How much history each Stocks plan includes

Each Stocks plan reaches a different distance back, and the window is set separately for bars, trades and quotes. These are the windows in the Plan History table of the aggregates documentation and the matching tables for trades and quotes:

PlanAggregate barsTick-level tradesNBBO quotes
Stocks Basic2 yearsNot includedNot included
Stocks Starter5 yearsNot includedNot included
Stocks Developer10 years10 yearsNot included
Stocks AdvancedAll history, back to 2003-09-10All historyAll history
Stocks BusinessAll historyAll historyAll history

The Stocks plan window is counted back from the time of each request. A Stocks Developer key reaches 10 years back from today, and tomorrow that oldest day has dropped out of reach. The pricing page shows Stocks Advanced as "20+ Years Historical Data"; the documentation's word for the same plan is "All history", which means everything back to 10 September 2003.

The flat files carry the same Stocks windows from Starter upward. Stocks Basic includes no flat files, so its two years are REST only.

How much history options, indices, forex, crypto and futures include

The other asset classes start on different dates and have their own plan windows. This table summarizes the Plan History tables in the documentation for each asset class's options, indices, forex, crypto and futures aggregates, and their trades and quotes pages:

Asset classEarliest dataAggregate bars by planTrades and quotes by plan
OptionsBars and trades 2014-06-02; quotes 2022-03-07Basic and Starter 2 years, Developer 4 years, Advanced and Business all historyTrades: Developer 4 years, Advanced and Business all history. Quotes: Advanced and Business only, all history
Indices2023-02-14All history on every plan, Basic includedNot applicable: indices publish values, not trades or quotes
Forex2009-09-25Basic 2 years, Starter and Business all historyQuotes: Starter and Business all history; not on Basic
Crypto2013-11-01Basic 2 years, Starter and Business all historyTrades: Starter and Business all history; not on Basic
Futures2017-04-03Basic and Starter 2 years, Developer 5 years, Advanced and Business all historyTrades and quotes: Developer 5 years, Advanced and Business all history; not on Basic or Starter

Where the pricing page shows a plan with a plus sign, the documentation for that plan says all history: Options Advanced appears as "5+ Years", Futures Advanced as "7+ Years", Currencies Starter as "10+ Years" and every Indices plan as "1+ Year", and each of those reaches back to the earliest date in the table. The flat files follow the same windows on every plan that includes them, and no Basic plan in any asset class includes flat files.

How to check what your own key can reach

The quickest way to see what your own key reaches is to ask for a date and look at what comes back, rather than reasoning about the plan. This request asks for the oldest AAPL daily bar:

curl -X GET "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2004-12-31?sort=asc&limit=1&apiKey=YOUR_API_KEY"

Response

{
  "ticker": "AAPL",
  "adjusted": true,
  "results": [
    { "t": 1063166400000, "o": 0.3973, "h": 0.4038, "l": 0.3948, "c": 0.3961, "v": 224893256, "n": 10152 }
  ],
  "status": "OK"
}

That timestamp is 10 September 2003, and the prices look small because bars are split-adjusted by default: Apple has split several times since. This response comes from a plan with all history. On a plan whose window is shorter, the same request is refused with HTTP 403 and NOT_AUTHORIZED, because the whole range lies before the window. Move the dates forward until data comes back.

A range that only partly overlaps the window is not always refused. The response can come back with "status": "OK" and the rows from before the window left out, so compare the date of the first row with the date you asked for before treating the start of a series as missing data.

Why one date rather than a per-company one

The floor is one date because it is the start of the archive rather than a fact about any company. Massive's history begins where its capture of the consolidated feeds begins, so every listed ticker that existed on 10 September 2003 has data from that morning, and a ticker with a later first bar simply was not trading under that symbol yet. A bar from 2003 can be audited against the individual prints of the same session, because both start together.

For bulk history, use the flat files

Pulling years of ticks through the REST API means paging through hundreds of millions of rows. The flat files hold the same data as compressed daily files you download once, which is the right tool for backfilling a database or a backtest. Start with How do I get started with Flat Files and S3 on Massive?.

If you see an error

{"status":"NOT_AUTHORIZED","message":"Your plan doesn't include this data timeframe..."} with HTTP 403 on an aggregates request for old dates means the whole range is older than your plan's history window. Ask for a more recent range, or upgrade the tier. The same message on today's data means something else: a delayed plan asking for data inside its delay.

{"status":"NOT_AUTHORIZED","message":"Attempted to request data past historical entitlements..."} is the same history limit as reported by the grouped daily and daily open/close endpoints.

{"status":"NOT_AUTHORIZED","message":"You are not entitled to this data..."} is a different limit: the plan does not include that endpoint or asset class at all, whatever the date.

An empty results array with HTTP 200, for a range inside your plan's window, means no trading days in that range for that ticker, which happens with a symbol that was renamed or delisted before the dates you asked for.

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.