Knowledge Base/What is the max number of tickers I can pass through Massive's snapshot?

What is the max number of tickers I can pass through Massive's snapshot?

Two hundred and fifty. A request with 250 tickers in ticker.any_of succeeds and 251 returns HTTP 400, so split a larger universe into batches of 250 or fewer.

The limit fails loudly, which is the useful part: at 251 tickers the unified snapshot returns HTTP 400 rather than quietly truncating your list, so you will never get a short response you mistake for a complete one. For a universe larger than 250, batch it, or use an endpoint that covers the whole market in a single call.

Applies to

  • Plans: Starter and above. The free Basic plans do not include the snapshot, and each ticker still has to be covered by a subscription you hold.
  • Endpoints: /v3/snapshot with ticker.any_of.
  • Asset classes: stocks, options, indices, forex and crypto, which can be mixed in one request.

How to batch a larger universe

curl -X GET "https://api.massive.com/v3/snapshot?ticker.any_of=AAPL,MSFT,SPY&apiKey=YOUR_API_KEY"

Response

{
  "results": [
    { "ticker": "AAPL", "type": "stocks", "name": "Apple Inc.", "market_status": "closed",
      "last_trade": { "id": "636947", "timeframe": "REAL-TIME" } }
  ],
  "status": "OK"
}

Chunk your list into groups of 250 and make one request per chunk. A symbol we do not recognize comes back as a row carrying "error": "NOT_FOUND" rather than being left out, so check for that field rather than comparing the count you sent with the count you received.

When to use something else

Use something else when a batching loop stops making sense, which is at a few hundred tickers:

What you needBetter endpoint
Every US stock's current day, in one request/v2/snapshot/locale/us/markets/stocks/tickers
Every US stock's daily bar for a date/v2/aggs/grouped/locale/us/market/stocks/{date}
A whole option chain for one underlying/v3/snapshot/options/{underlyingAsset}
The same values continuouslyThe WebSocket, rather than polling anything

Polling a snapshot loop is also the pattern most likely to meet a rate limit, because each chunk is a request and the limit is counted per asset class.

Why there is a limit at all

The limit exists because a snapshot is assembled per ticker at request time, so a very long list turns one HTTP request into a great deal of work and a large response. Capping it keeps a single request predictable for everyone, and the market-wide endpoints exist precisely so that "I want everything" does not have to be expressed as a list.

If you see an error

HTTP 400 on a snapshot request is almost always the ticker count. Count the entries in ticker.any_of.

Rows carrying "error": "NOT_FOUND" are symbols we do not recognize. Check the prefixes: O:, I:, X: and C:.

A 429 from a batching loop is the per-asset-class request limit rather than the ticker limit.

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.