api.polygon.io and api.massive.com serve the same API. The plugin calls api.polygon.io. Create a key in the Massive dashboard under Keys and paste it into the plugin; it travels as the documented apiKey query parameter.
What to know before you query:
- Plans gate the data, not the routes. A free (Basic) key reaches market status and holidays, tickers, ticker types, exchanges and the end-of-day aggregates (
barsby minute and up,previousDay,dailySummary,marketSummary). Snapshots, movers and second bars need a paid plan. When a plan does not include a dataset the API answers 403NOT_AUTHORIZEDrather than an empty result, and the plugin reports that as a permission error instead of retrying. statusis not alwaysOK. A plan with delayed data answersDELAYED, so the field stays a string rather than an enum a future value could break.- Paging.
aggregates.barsandtickers.listreturnnext_urlwhile another page exists (marketSummaryanswers every ticker in one page). It already carries the cursor and your filters, so pass it to the same operation asnextUrland the other arguments are ignored. AnyapiKeythe URL echoes is dropped, because the plugin adds the caller’s own. - A missing bar is not an error.
aggregates.barsomitsresultswhen no qualifying trades happened in the window, so the plugin reads that as an empty page rather than a failed call. It does not mean the market was closed: an open session with no trades produces the same answer. Usemarket.statuswhen you need the current market state. - Rates. The free tier allows 5 calls a minute. A 429 is retried by the transport three times, honouring any
Retry-Afterthe API sends; the plugin adds no retries of its own, so the budget is not multiplied. - Webhooks. The API sends none, so the plugin receives none.
- 12 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Polygon.io API key before the first call: More: API Key
pnpm corsair setup --plugin=polygonio --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List actively traded US stocksWhat’s next
API reference
Every
polygonio.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.