massive.q
Examples
\l pq
.massive.setKey "your-api-key"
r:.massive.bars[`AAPL;2026.08.01;2026.09.04;()!()]
1-min r[`c]%maxs r`c / the max drawdown over the range
.massive.bars[`AAPL;2026.09.04;2026.09.04;`mult`span!(5;`minute)]
n:.massive.news[`ticker`max!(`AAPL;20)]; .massive.envelope`truncated
`$(.massive.tickers[(enlist `search)!enlist "apple"])`tickerEntity Summary
| Entities | Short Description |
|---|---|
| .massive.apikey | The API key, read from MASSIVE_API_KEY at load. |
| .massive.bardefaults | The bar options: `mult and `span set the bar size; `adjusted and `limit (the base aggregates one page is built from, max 50000) pass to the API. |
| .massive.bars[ticker;start;end;opts] | Bars for a ticker between two dates, both inclusive. |
| .massive.daily[date;adjusted;opts] | Every US stock's bar for one trading date (a weekend or holiday answers ()); `T is the ticker. |
| .massive.defaults | The options every call starts from: the walk stops after `max rows or `maxpages pages, checked between pages, so the first page always arrives and a page that arrived is kept whole (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: a table for a list of records, a dict for a single record (one page, no paging). |
| .massive.ipos[opts] | IPOs, newest first. |
| .massive.news[opts] | News articles. |
| .massive.ohlc[ticker;date;opts] | One ticker's open, high, low, close, pre-market and after-hours prices for one trading date, as a dict (a non-trading date signals NOT_FOUND). |
| .massive.ok | The response statuses accepted as success; any other is signalled as "STATUS: message" (the API's error or message). |
| .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; the same stamps and plan requirement as .massive.trades. |
| .massive.setKey[apikey] | Set the API key for this session. |
| .massive.snap[tickers;opts] | The current snapshot (today's bar, the last minute, the previous day) 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, as a dict. |
| .massive.tcols | The response columns holding epoch timestamps (ms or ns, told apart by magnitude): bars, snapshots and ticks. |
| .massive.tickers[opts] | The reference list of tickers. |
| .massive.times | Convert the epoch (.massive.tcols) and ISO (*_utc) columns to q timestamps on the way in; 0b keeps them raw. |
| .massive.trades[ticker;opts] | Tick-level trades for a ticker; the stamps are sip_timestamp, participant_timestamp and trf_timestamp. |
| .massive.url | The API base URL. |
Entity Details
.massive.bars[ticker;start;end;opts]
Bars for a ticker between two dates, both inclusive.
| Parameters: |
|
|---|
Examples
.massive.bars[`AAPL;2026.08.01;2026.09.04;()!()].massive.bars[`AAPL;2026.09.04;2026.09.04;`mult`span!(5;`minute)].massive.daily[date;adjusted;opts]
Every US stock's bar for one trading date (a weekend or holiday answers ()); `T is the ticker.
| Parameters: |
|
|---|
Examples
.massive.daily[2026.09.04;1b;()!()].massive.divs[opts]
Dividends.
| Parameters: |
|
|---|
Examples
.massive.divs[(enlist `ticker)!enlist `AAPL].massive.fetch[request]
GET any API path and answer its payload: a table for a list of records, a dict for a single record (one page, no paging). The key is appended, so hand it a path under .massive.url or a next_url read from .massive.envelope.
| Parameters: |
|
|---|
Examples
.massive.fetch "/v3/reference/tickers/AAPL" / ticker details.massive.fetch ("/v3/reference/tickers";(enlist `limit)!enlist 5).massive.fetch .massive.envelope`next_url / the page after a truncated walk.massive.ipos[opts]
IPOs, newest first.
| Parameters: |
|
|---|
Examples
.massive.ipos[`limit`max!(50;50)].massive.news[opts]
News articles.
| Parameters: |
|
|---|
Examples
.massive.news[`ticker`max!(`AAPL;20)].massive.ohlc[ticker;date;opts]
One ticker's open, high, low, close, pre-market and after-hours prices for one trading date, as a dict (a non-trading date signals NOT_FOUND).
Examples
.massive.ohlc[`AAPL;2026.09.04;()!()].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; the same stamps and plan requirement as .massive.trades.
| Parameters: |
|
|---|
Examples
.massive.quotes[`AAPL;`timestamp`limit!(2026.09.04;100)].massive.snap[tickers;opts]
The current snapshot (today's bar, the last minute, the previous day) 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, as a dict.
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; the stamps are sip_timestamp, participant_timestamp and trf_timestamp. Needs a plan that includes tick data (NOT_AUTHORIZED otherwise).
| Parameters: |
|
|---|
Examples
.massive.trades[`AAPL;`timestamp`limit!(2026.09.04;100)]