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
| Entities | Short Description |
|---|---|
| .massive.apikey | The API key, read from MASSIVE_API_KEY at load. |
| .massive.bardefaults | The 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.defaults | The 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.envelope | The 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.ok | The response statuses accepted as success; any other status is signalled verbatim. |
| .massive.pay | The 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.tcols | The response columns holding epoch timestamps (ms or ns, told apart by magnitude). |
| .massive.tickers[opts] | The reference list of tickers. |
| .massive.times | Convert epoch timestamp columns (t, updated, *_utc) to q timestamps on the way in. |
| .massive.trades[ticker;opts] | Tick-level trades for a ticker. |
| .massive.url | The API base URL. |
Entity Details
.massive.bars[ticker;start;end;opts]
Bars for a ticker between two dates.
| Parameters: |
|
|---|
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: |
|
|---|
Examples
.massive.daily[2026.09.05;1b;()!()].massive.divs[opts]
Dividends.
| Parameters: |
|
|---|
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: |
|
|---|
Examples
.massive.fetch ("/v3/reference/tickers";(enlist `limit)!enlist 5).massive.ipos[opts]
IPOs.
| Parameters: |
|
|---|
.massive.news[opts]
News articles.
| Parameters: |
|
|---|
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: |
|
|---|
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: |
|
|---|
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: |
|
|---|
Examples
.massive.tickers[`search`active!("apple";1b)].massive.trades[ticker;opts]
Tick-level trades for a ticker.
| Parameters: |
|
|---|
Examples
.massive.trades[`AAPL;`timestamp`limit!(2026.09.05;100)]