Knowledge Base/Why are there missing aggregates in Massive's data?

Why are there missing aggregates in Massive's data?

A window with no eligible trade produces no bar at all, rather than an empty one. This is common: AAPL produced 885 minute bars in a 960-minute session on an ordinary day. Check the trades endpoint for the same window to tell a real gap from an ineligible one.

Most of the gaps people find in an aggregate series are minutes in which nothing eligible traded, and there is nothing to deliver for those: Massive emits no placeholder bar rather than an empty one. The check that separates a real gap from a quiet minute takes one request, and it is worth running before you report anything.

Applies to

  • Plans: every plan.
  • Endpoints: /v2/aggs/ticker/... for the bars and /v3/trades/{ticker} for the trades behind them.
  • Asset classes: stocks above all, where sale conditions govern eligibility.

How to tell the two apart

  1. Pull the aggregate range with a limit high enough for the whole range, at least 1,000 for one day of minutes, and note which windows are absent.
  2. Pull /v3/trades for one of the absent windows.
  3. No trades at all means the market was genuinely quiet in that minute. That is not a gap in the data.
  4. Trades that exist but produced no bar means none of them was eligible. Look at each trade's conditions array, then ask the conditions endpoint what those codes update.
curl -X GET "https://api.massive.com/v3/reference/conditions?asset_class=stocks&data_type=trade&id=2&apiKey=YOUR_API_KEY"

Response

{
  "results": [
    {
      "id": 2, "type": "sale_condition", "name": "Average Price Trade",
      "update_rules": {
        "consolidated": { "updates_high_low": false, "updates_open_close": false, "updates_volume": true }
      }
    }
  ],
  "status": "OK"
}

Condition 2 updates volume but not price, so a minute containing only average-price trades gets no open, high, low or close and therefore no bar.

Where gaps concentrate

Gaps concentrate in four places, and two of them account for most reports:

PatternCause
Gaps throughout a thin ticker's dayMost minutes simply have no trade
Gaps concentrated in pre-market and after-hoursExtended-hours prints often carry conditions that do not update price
A whole day missingA market holiday or an early close. For a past date, call grouped daily (/v2/aggs/grouped/locale/us/market/stocks/{date}): resultsCount 0 means no session. /v1/marketstatus/upcoming lists future holidays only
The end of a long range missingThe limit, which counts minutes scanned rather than bars returned

Why no placeholder bar

There is no placeholder because a bar with no trades has no honest open, high, low or close to report. Carrying the previous close forward would invent a price that nobody traded at, and zeroes would corrupt any calculation that touched them. Leaving the window out means your code has to decide what a quiet minute means for it, which is the only place that decision can correctly be made.

If your charts need a continuous series, fill forward on your side, and keep the filled points distinguishable from real ones.

If you see an error

Bars missing from the end of a long request is the limit, not the data. Compare queryCount with the limit you set.

A minute with trades but no bar is eligibility. The conditions endpoint will name the reason.

A bar that appeared and then changed is a correction. Late trades revise a bar for about 15 minutes on the stream, and after that at the end of the day.

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.