Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Massive (Polygon.io)

Scalekit connector
Open markdown

The Massive (Polygon.io) connector lets your AI agent act in each user's Massive (Polygon.io) account. Each user connects their own Massive (Polygon.io) access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.

Tools
60
What they doRead · write · destructive
60 · 0 · 060 read0 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Massive (Polygon.io) connection

    In AgentKit > Connections, create a Massive (Polygon.io) connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'polygon'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Massive (Polygon.io):', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'polygon_balance_sheets_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Massive (Polygon.io) credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • polygon_aggregates_getGet OHLC aggregate bars for any ticker (stocks, options, indices, forex or crypto) over a date range, in windows of multiplier x timespan (for example 5 minute or 1 day).Read-only

    Get Aggregate Bars

    Get OHLC aggregate bars for any ticker (stocks, options, indices, forex or crypto) over a date range, in windows of multiplier x timespan (for example 5 minute or 1 day). Returns per bar the open, high, low, close, volume, VWAP, trade count and start timestamp, plus next_url when more bars remain. Use this for price history and charts. Use polygon_previous_close_get for only the last day.

    Inputs

    fromstringrequired
    The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Example: 2025-11-03.
    multiplierintegerrequired
    The size of the timespan multiplier. Example: 1.
    tickerstringrequired
    Ticker symbol, case-sensitive. Stocks use the plain symbol (AAPL); options use O: (O:AAPL251219C00200000), indices I: (I:SPX), forex C: (C:EURUSD) and crypto X: (X:BTCUSD). Example: AAPL.
    timespanstringrequired
    The size of the time window. One of: second, minute, hour, day, week, month, quarter, year. Example: day.one of secondminutehourdayweekmonthquarteryear
    tostringrequired
    The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Example: 2025-11-28.
    adjustedboolean
    Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits. Example: true.
    limitinteger
    Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read more about how limit is used to calculate aggregate results in our article on <a href="https://massive.com/blog/aggs-api-updates/" target="_blank" alt="Aggregate Data API Improvements">Aggregate Data API Improvements</a>. Example: 25.
    sortstring
    Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top). One of: asc, desc. Example: asc.one of ascdesc
  • polygon_balance_sheets_listList balance sheet data from SEC filings, filtered by CIK, ticker, period end, filing date, fiscal year, fiscal quarter or timeframe.Read-only

    List Balance Sheets

    List balance sheet data from SEC filings, filtered by CIK, ticker, period end, filing date, fiscal year, fiscal quarter or timeframe. Returns assets, liabilities, equity and their line items per reporting period, plus next_url. Use this for a company's financial position. Use polygon_income_statements_list for revenue and earnings.

    Inputs

    cikstring
    The company's Central Index Key (CIK), a unique identifier assigned by the U.S. Securities and Exchange Commission (SEC). You can look up a company's CIK using the SEC CIK Lookup tool (https://www.sec.gov/search-filings/cik-lookup). Example: 0000320193.
    cursorstring
    Pagination cursor. Copy the cursor value from the next_url returned by the previous call to get the next page. Example: YXA9MjAyNS0xMS0wMyZhcz0mbGltaXQ9MjU.
    filing_datestring
    The date of the most recent SEC filing that included this period's data. This is not necessarily the date this period was originally filed. Because SEC filings restate comparative data for prior periods, multiple records can share the same filing_date. For example, an annual 10-K reports three years of results, and a 10-Q includes prior period comparatives. To find the original filing date for a specific 10-K or 10-Q, use the SEC EDGAR filings index endpoint (/stocks/filings/vX/index). Value must be formatted 'yyyy-mm-dd'. Example: 2025-10-31.
    filing_date_gtestring
    Return records with filing date on or after (greater than or equal to) this value. Example: 2025-10-31.
    filing_date_ltestring
    Return records with filing date on or before (less than or equal to) this value. Example: 2025-10-31.
    fiscal_quarterinteger
    The fiscal quarter number (1, 2, 3, or 4) for the reporting period. Value must be an integer. Example: 4.
    fiscal_yearinteger
    The fiscal year for the reporting period. Value must be an integer. Example: 2025.
    limitinteger
    Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'. Example: 25.
    period_endstring
    The last date of the reporting period, representing the specific point in time when the balance sheet snapshot was taken. Value must be formatted 'yyyy-mm-dd'. Example: 2025-09-27.
    period_end_gtestring
    Return records with period end on or after (greater than or equal to) this value. Example: 2025-09-27.
    period_end_ltestring
    Return records with period end on or before (less than or equal to) this value. Example: 2025-09-27.
    sortstring
    A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'period_end' if not specified. The sort order defaults to 'asc' if not specified. Example: period_end.desc.
    tickersstring
    Filter for arrays that contain the value. Example: AAPL.
    timeframestring
    The reporting period type. Possible values include: quarterly, annual. Example: quarterly.
  • polygon_cash_flow_statements_listList cash flow statement data from SEC filings, filtered by CIK, ticker, period end, filing date, fiscal year, fiscal quarter or timeframe.Read-only

    List Cash Flow Statements

    List cash flow statement data from SEC filings, filtered by CIK, ticker, period end, filing date, fiscal year, fiscal quarter or timeframe. Returns operating, investing and financing cash flows and their line items per period, plus next_url. Use this for a company's cash generation.

    Inputs

    cikstring
    The company's Central Index Key (CIK), a unique identifier assigned by the U.S. Securities and Exchange Commission (SEC). You can look up a company’s CIK using the SEC CIK Lookup tool (https://www.sec.gov/search-filings/cik-lookup). Example: 0000320193.
    cursorstring
    Pagination cursor. Copy the cursor value from the next_url returned by the previous call to get the next page. Example: YXA9MjAyNS0xMS0wMyZhcz0mbGltaXQ9MjU.
    filing_datestring
    The date of the most recent SEC filing that included this period's data. This is not necessarily the date this period was originally filed. Because SEC filings restate comparative data for prior periods, multiple records can share the same filing_date. For example, an annual 10-K reports three years of results, and a 10-Q includes prior period comparatives. To find the original filing date for a specific 10-K or 10-Q, use the SEC EDGAR filings index endpoint (/stocks/filings/vX/index). Value must be formatted 'yyyy-mm-dd'. Example: 2025-10-31.
    filing_date_gtestring
    Return records with filing date on or after (greater than or equal to) this value. Example: 2025-10-31.
    filing_date_ltestring
    Return records with filing date on or before (less than or equal to) this value. Example: 2025-10-31.
    fiscal_quarterinteger
    The fiscal quarter number (1, 2, 3, or 4) for the reporting period. Value must be an integer. Example: 4.
    fiscal_yearinteger
    The fiscal year for the reporting period. Value must be an integer. Example: 2025.
    limitinteger
    Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'. Example: 25.
    period_endstring
    The last date of the reporting period (formatted as YYYY-MM-DD). Value must be formatted 'yyyy-mm-dd'. Example: 2025-09-27.
    period_end_gtestring
    Return records with period end on or after (greater than or equal to) this value. Example: 2025-09-27.
    period_end_ltestring
    Return records with period end on or before (less than or equal to) this value. Example: 2025-09-27.
    sortstring
    A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'period_end' if not specified. The sort order defaults to 'asc' if not specified. Example: period_end.desc.
    tickersstring
    Filter for arrays that contain the value. Example: AAPL.
    timeframestring
    The reporting period type. Possible values include: quarterly, annual, trailing_twelve_months. Example: quarterly.
  • polygon_conditions_listList the trade and quote condition codes, optionally for one asset class, data type or SIP.Read-only

    List Trade and Quote Conditions

    List the trade and quote condition codes, optionally for one asset class, data type or SIP. Returns ID, name, type, description, SIP mappings and how the condition updates OHLC and volume. Use this to decode condition IDs in trades and quotes.

    Inputs

    asset_classstring
    Filter for conditions within a given asset class. One of: stocks, options, crypto, fx. Example: stocks.one of stocksoptionscryptofx
    cursorstring
    Pagination cursor. Copy the cursor value from the next_url returned by the previous call to get the next page. Example: YXA9MjAyNS0xMS0wMyZhcz0mbGltaXQ9MjU.
    data_typestring
    Filter by data type. One of: trade, bbo, nbbo. Example: trade.one of tradebbonbbo
    idinteger
    Filter for conditions with a given ID. Example: 2.
    limitinteger
    Limit the number of results returned, default is 10 and max is 1000. Example: 25.
    orderstring
    Order results based on the sort field. One of: asc, desc. Example: asc.one of ascdesc
    sipstring
    Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned. One of: CTA, UTP, OPRA. Example: CTA.one of CTAUTPOPRA
    sortstring
    Sort field used for ordering. One of: asset_class, id, type, name, data_types, legacy. Defaults to asset_class. Example: name.one of asset_classidtypenamedata_typeslegacy
  • polygon_crypto_daily_open_close_getGet the open and close prices of a crypto pair on one date.Read-only

    Get Crypto Daily Open and Close

    Get the open and close prices of a crypto pair on one date. Returns the symbol, open, close and the opening and closing trades. Use this for one crypto pair on one day.

    Inputs

    datestringrequired
    The date of the requested open/close in the format YYYY-MM-DD. Example: 2025-11-03.
    fromstringrequired
    Base crypto symbol of the pair. Example: BTC.
    tostringrequired
    Quote currency symbol of the pair. Example: USD.
    adjustedboolean
    Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits. Example: true.
  • polygon_crypto_last_trade_getGet the most recent trade for a crypto pair.Read-only

    Get Last Crypto Trade

    Get the most recent trade for a crypto pair. Returns price, size, exchange, conditions and timestamp. Use this for the latest crypto price.

    Inputs

    fromstringrequired
    Base crypto symbol. Example: BTC.
    tostringrequired
    Quote currency symbol. Example: USD.
  • polygon_crypto_movers_getGet the top 20 crypto gainers or losers of the day by percent change.Read-only

    Get Top Crypto Movers

    Get the top 20 crypto gainers or losers of the day by percent change. Returns snapshots for those pairs. Use this for today's biggest crypto moves.

    Inputs

    directionstringrequired
    The direction of the snapshot results to return. One of: gainers, losers. Example: gainers.one of gainerslosers
  • polygon_crypto_order_book_getGet the current level 2 order book of a crypto pair across exchanges.Read-only

    Get Crypto Order Book

    Get the current level 2 order book of a crypto pair across exchanges. Returns bids and asks with prices and sizes per exchange, the bid and ask counts and the spread. Use this for market depth.

    Inputs

    tickerstringrequired
    Crypto ticker with the X: prefix. Example: X:BTCUSD.