Knowledge Base/Does Massive have per second aggregates available?

Does Massive have per second aggregates available?

Yes, both ways. Per-second bars stream live on every WebSocket cluster, with a channel name that differs by asset class, and the REST aggregates endpoint builds them historically with a timespan of second.

Yes, and by two routes. Massive streams per-second aggregate bars live on every WebSocket cluster, not only Stocks: the channel is A on the stocks, options, indices and futures clusters, XAS on crypto and CAS on forex. For history, the REST aggregates endpoint builds one-second bars directly, because second is a timespan like any other.

Applies to

  • Plans: every paid subscription that includes the WebSocket feed for that asset class.
  • Endpoints: A on /stocks, /options, /indices and /futures; XAS on /crypto; CAS on /forex; and /v2/aggs/ticker/{ticker}/range/1/second/{from}/{to} for history.
  • Asset classes: stocks, options, indices, futures, forex and crypto.

How to stream per-second bars

Subscribe on the cluster for your asset class, using that cluster's channel name.

{"action":"subscribe","params":"A.AAPL"}

Response

[{"ev":"status","status":"success","message":"subscribed to: A.AAPL"}]

For crypto and forex the channel differs, so the same request looks like this:

{"action":"subscribe","params":"XAS.X:BTC-USD"}

Two things differ there and both fail quietly. Using A on the crypto or forex cluster is refused with "not authorized", which reads like a plan problem and is not one. And the pair must be hyphenated on the WebSocket: XAS.X:BTCUSD is acknowledged with "subscribed to: XAS.X:BTCUSD" and then sends nothing, while XAS.X:BTC-USD streams. REST takes the unhyphenated form, which is why the habit carries over.

How to get historical per-second bars

Ask the aggregates endpoint for a second timespan. Set limit generously, because it counts base units scanned rather than bars returned:

curl -X GET "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/second/2026-09-04/2026-09-04?limit=5000&apiKey=YOUR_API_KEY"

Response

{
  "ticker": "AAPL",
  "results": [
    { "t": 1788508800000, "o": 326.5, "c": 327.16, "v": 596.715824, "n": 51 },
    { "t": 1788508803000, "o": 327.01, "c": 327.81, "v": 223.609276, "n": 70 }
  ],
  "status": "OK"
}

The gap between the first two bars is the point: seconds with no eligible trade produce no bar, so a per-second series is sparse even on a busy ticker.

Building your own from /v3/trades is still an option when you need control over which conditions count, but it is no longer necessary just to get the bars.

What a per-second bar contains

Every per-second bar carries the open, high, low and close for that second, and after that the fields differ by asset class:

ClusterAlso carries
Stocks and optionsVolume and the volume-weighted average price
CryptoVolume and the volume-weighted average price
FuturesVolume, but no VWAP
ForexA v that counts quotes rather than shares, and no VWAP
IndicesValues only: no volume and no VWAP, because an index does not trade

A second with no trades produces no bar rather than an empty one, so gaps in the stream are normal and are not missing data.

If you see an error

{"ev":"status","status":"error","message":"not authorized"} after subscribing to A means either your plan does not include that cluster's WebSocket feed or you used A where the cluster expects XAS or CAS.

An empty results array from /v3/trades for a recent timestamp usually means the date is outside the history your plan includes rather than a gap in the data.

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.