massive.q

Market data from the Massive REST API (massive.com) as q tables: bars, daily aggregates, snapshots, trades, quotes, tickers, splits, dividends, IPOs and news. Set MASSIVE_API_KEY in the environment or call .massive.setKey. The last argument of every call is an options dict, ()!() for none: `max and `maxpages bound the paging, any other key is passed to the API as a query parameter.

Examples

.massive.setKey "your-api-key"
.massive.bars[`AAPL;2026.08.01;2026.09.05;()!()]
.massive.tickers[(enlist `search)!enlist "apple"]

Entity Summary

EntitiesShort Description
.massive.apikeyThe API key, read from MASSIVE_API_KEY at load.
.massive.bardefaultsThe default bar options: `mult and `span set the bar size, `adjusted and `limit pass to the API.
.massive.bars[ticker;start;end;opts]Bars for a ticker between two dates.
.massive.daily[date;adjusted;opts]Every US stock's daily bar for one date.
.massive.defaultsThe default options every call starts from: paging stops after `max rows or `maxpages pages (a page that arrived is kept whole, so the result may exceed `max).
.massive.divs[opts]Dividends.
.massive.envelopeThe last response's envelope: status, count, next_url and, after a paged call, truncated.
.massive.fetch[request]GET any API path and answer its payload as a table (one page, no paging).
.massive.ipos[opts]IPOs.
.massive.news[opts]News articles.
.massive.ohlc[ticker;date;opts]One ticker's open, high, low and close for one date.
.massive.okThe response statuses accepted as success; any other status is signalled verbatim.
.massive.payThe response keys whose value is the payload, in the order tried.
.massive.prevclose[ticker;opts]The previous day's open, high, low, close and volume for a ticker.
.massive.quotes[ticker;opts]Tick-level quotes for a ticker.
.massive.setKey[apikey]Set the API key for this session.
.massive.snap[tickers;opts]The current snapshot (last trade, last quote, today's bar) for a list of tickers.
.massive.splits[opts]Stock splits.
.massive.status[]Whether the market is open now: the exchanges, their state and the server time.
.massive.tcolsThe response columns holding epoch timestamps (ms or ns, told apart by magnitude).
.massive.tickers[opts]The reference list of tickers.
.massive.timesConvert epoch timestamp columns (t, updated, *_utc) to q timestamps on the way in.
.massive.trades[ticker;opts]Tick-level trades for a ticker.
.massive.urlThe API base URL.

Entity Details

.massive.bars[ticker;start;end;opts]

Bars for a ticker between two dates.

Parameters:
  • opts - `span (`day `hour `minute) and `mult set the bar size: `mult`span!(5;`minute) is 5-minute bars

Examples

.massive.bars[`AAPL;2026.08.01;2026.09.05;()!()]
.massive.bars[`AAPL;2026.09.05;2026.09.05;`mult`span!(5;`minute)]

.massive.daily[date;adjusted;opts]

Every US stock's daily bar for one date.

Parameters:
  • adjusted - 1b for split-adjusted prices

Examples

.massive.daily[2026.09.05;1b;()!()]

.massive.divs[opts]

Dividends.

Parameters:
  • opts - API filters such as `ticker`ex_dividend_date

Examples

.massive.divs[(enlist `ticker)!enlist `AAPL]

.massive.fetch[request]

GET any API path and answer its payload as a table (one page, no paging).

Parameters:
  • request - a path string, or (path;params dict)

Examples

.massive.fetch ("/v3/reference/tickers";(enlist `limit)!enlist 5)

.massive.ipos[opts]

IPOs.

Parameters:
  • opts - API filters such as `ticker`listing_date

.massive.news[opts]

News articles.

Parameters:
  • opts - API filters such as `ticker`published_utc

Examples

.massive.news[`ticker`max!(`AAPL;20)]

.massive.ohlc[ticker;date;opts]

One ticker's open, high, low and close for one date.

Examples

.massive.ohlc[`AAPL;2026.09.05;()!()]

.massive.prevclose[ticker;opts]

The previous day's open, high, low, close and volume for a ticker.

Examples

.massive.prevclose[`AAPL;()!()]

.massive.quotes[ticker;opts]

Tick-level quotes for a ticker.

Parameters:
  • opts - API filters such as `timestamp`limit bound the range

Examples

.massive.quotes[`AAPL;`timestamp`limit!(2026.09.05;100)]

.massive.snap[tickers;opts]

The current snapshot (last trade, last quote, today's bar) for a list of tickers.

Examples

.massive.snap[`AAPL`MSFT;()!()]

.massive.splits[opts]

Stock splits.

Parameters:
  • opts - API filters such as `ticker`execution_date

Examples

.massive.splits[(enlist `ticker)!enlist `AAPL]

.massive.status[]

Whether the market is open now: the exchanges, their state and the server time.

Examples

.massive.status[]

.massive.tickers[opts]

The reference list of tickers.

Parameters:
  • opts - API filters such as `market`exchange`search`active

Examples

.massive.tickers[`search`active!("apple";1b)]

.massive.trades[ticker;opts]

Tick-level trades for a ticker.

Parameters:
  • opts - API filters such as `timestamp`limit bound the range

Examples

.massive.trades[`AAPL;`timestamp`limit!(2026.09.05;100)]