Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Polygon.io now operates as Massive; this entry uses the api.polygon.io host named in the vendor’s OpenAPI file, with the same keys.
- Data coverage, delay and rate limits depend on the plan; an endpoint outside your plan is refused.
- Timestamps are epoch milliseconds; dates are YYYY-MM-DD.
- List endpoints page with a next_url field; request it as given and add the apiKey.
- The same API also covers options, forex, crypto and indices; only US stocks are listed here.
Endpoints
Get stock aggregate bars
- Bar timestamps t are epoch milliseconds.
- Long ranges truncate at limit; follow next_url in the response (add your apiKey to it).
Get the previous day’s bar
Get a day’s open and close
Get a ticker snapshot
- Snapshot data is cleared at 3:30 AM EST and refills from about 4 AM EST as exchanges report.
Get the last trade
- Data access depends on your plan.
List tickers
- Cursor-paginated: follow next_url in the response.