Massive.com (formerly Polygon.io)Massive stock market data API
GET/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}
Get custom aggregate bars
Retrieve historical OHLC and volume bars over a custom date range in Eastern Time. Bars are built from qualifying trades; an interval with no eligible trades is omitted rather than returned as an empty bar.
Use a Massive API key to query U.S. stock trades, OHLC aggregates, unified snapshots, and ticker reference data; availability depends on the data plan.
Request
- operationId
getAggregateBars- Server
https://api.massive.com- Authentication
- BearerAuth
Request parameters
stocksTicker
pathstringrequired
Case-sensitive stock ticker, for example `AAPL`.
AAPL
multiplier
pathintegerrequired
Timespan multiplier
1
timespan
pathstringrequired
Bar unit
minute
from
pathstringrequired
Start date in `YYYY-MM-DD` format or Unix timestamp in milliseconds.
2025-01-02
to
pathstringrequired
End date in `YYYY-MM-DD` format or Unix timestamp in milliseconds.
2025-01-31
adjusted
queryboolean
Whether results are adjusted for stock splits.
true
sort
querystring
Order bars by their start timestamp.
asc
limit
queryinteger
Maximum number of base aggregates queried to construct results.
5000
Responses
200
AggregateResponseapplication/json
Successful response
Properties: tickeradjustedqueryCountrequest_idresultsCountstatusresultsnext_url
default
ErrorResponseapplication/json
Request failed because of authentication, authorization, validation, rate limiting, or a server error.
Properties: statuserrormessagerequest_id
{
"ticker": "AAPL",
"adjusted": true,
"queryCount": 1,
"request_id": "6a7e466379af0a71039d60cc78e72282",
"resultsCount": 1,
"status": "OK",
"results": [
{
"T": "AAPL",
"c": 115.97,
"h": 117.59,
"l": 114.13,
"n": 2,
"o": 115.55,
"otc": false,
"t": 1605042000000
}
],
"next_url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw"
}