Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Alpha Vantage

Scalekit connector
Open markdown

The Alpha Vantage connector lets your AI agent act in each user's Alpha Vantage account. Each user connects their own Alpha Vantage API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 72 tools.

Tools
72
What they doRead · write · destructive
72 · 0 · 072 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 Alpha Vantage connection

    In AgentKit > Connections, create an Alpha Vantage connection. The name you give it is the connection_name your code passes. See Configure connections.

    Console steps with screenshots

    Register your Alpha Vantage API key with Scalekit so it can authenticate requests to the Alpha Vantage API on behalf of your users.

    1. Get an Alpha Vantage API key

      • Go to alphavantage.co and click GET FREE API KEY.

        Alpha Vantage homepage with the GET FREE API KEY button

      • Select your role, enter your organization and email, and click GET FREE API KEY. Claim your Free API Key form with role, organization and email fields

      • Copy the key Alpha Vantage shows you.

    2. Create a connection in Scalekit

      • In the Scalekit dashboard, go to AgentKit > Connections > Create Connection.
      • Search for Alpha Vantage and click Create.
      • Note the Connection name. Use it as connection_name in your code (for example, alphavantage).
    3. Add a connected account

      • Open the connection, click Connected Accounts > Add account.
      • Enter Your User’s ID and the API Key, then click Save.

      To add the account from your backend:

      await scalekit.actions.upsertConnectedAccount({
      connectionName: 'alphavantage',
      identifier: 'user_123',
      credentials: { api_key: 'YOUR_ALPHA_VANTAGE_KEY' },
      });
  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 = 'alphavantage'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Alpha Vantage:', 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: 'alphavantage_get_congress_trades',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Alpha Vantage credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • alphavantage_get_adoscGet the Chaikin A/D oscillator (ADOSC) series for an equity.Read-only

    Get Chaikin A/D Oscillator

    Get the Chaikin A/D oscillator (ADOSC) series for an equity. Returns Meta Data plus a Technical Analysis: ADOSC object keyed by date. Use alphavantage_get_price_volume_indicator for the underlying A/D line and OBV. Use alphavantage_get_moving_average, alphavantage_get_rsi, alphavantage_get_macd, alphavantage_get_bollinger_bands or alphavantage_get_stochastic for the other common indicators. Free keys are limited to 25 requests a day. Set datatype to csv to get CSV text instead of JSON. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    intervalstringrequired
    Time between data points. One of 1min, 5min, 15min, 30min, 60min, daily, weekly, monthly.one of 1min5min15min30min60mindailyweeklymonthly
    symbolstringrequired
    Ticker symbol of the equity or ETF. Non-US listings use an exchange suffix, such as TSCO.LON. Example: IBM.
    datatypestring
    Output format: json (default) or csv. With csv the response is plain CSV text, returned as {"result": "<csv text>"} instead of a JSON object.one of jsoncsv
    entitlementstring
    Market-data entitlement for premium plans: realtime for real-time US data, delayed for 15-minute delayed data. Omit it on a free key.one of realtimedelayed
    fastperiodinteger
    Time period of the fast EMA. Default 3.
    monthstring
    Return data for one calendar month in history, format YYYY-MM. Example: 2024-01. Omit to use the default range (the most recent data).
    slowperiodinteger
    Time period of the slow EMA. Default 10.
  • alphavantage_get_balance_sheetGet annual and quarterly balance sheets for a company.Read-only

    Get Balance Sheet

    Get annual and quarterly balance sheets for a company. Returns symbol, annualReports and quarterlyReports arrays of line items, normalized to GAAP and IFRS taxonomies. Use it for statement detail; use alphavantage_get_company_overview for summary ratios. Free keys are limited to 25 requests a day. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    symbolstringrequired
    Ticker symbol of the equity or ETF. Non-US listings use an exchange suffix, such as TSCO.LON. Example: IBM.
  • alphavantage_get_bollinger_bandsGet Bollinger Bands (upper, middle and lower bands) for an equity.Read-only

    Get Bollinger Bands

    Get Bollinger Bands (upper, middle and lower bands) for an equity. Returns Meta Data plus a Technical Analysis: BBANDS object keyed by date with Real Upper Band, Real Middle Band and Real Lower Band. Use alphavantage_get_macd or alphavantage_get_rsi for other indicators. Free keys are limited to 25 requests a day. Set datatype to csv to get CSV text instead of JSON. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    intervalstringrequired
    Time between data points. One of 1min, 5min, 15min, 30min, 60min, daily, weekly, monthly.one of 1min5min15min30min60mindailyweeklymonthly
    series_typestringrequired
    Price field the indicator is computed from: close, open, high or low.one of closeopenhighlow
    symbolstringrequired
    Ticker symbol of the equity or ETF. Non-US listings use an exchange suffix, such as TSCO.LON. Example: IBM.
    time_periodintegerrequired
    Number of data points used to calculate each value. Example: 60.
    datatypestring
    Output format: json (default) or csv. With csv the response is plain CSV text, returned as {"result": "<csv text>"} instead of a JSON object.one of jsoncsv
    entitlementstring
    Market-data entitlement for premium plans: realtime for real-time US data, delayed for 15-minute delayed data. Omit it on a free key.one of realtimedelayed
    matypeinteger
    Moving-average type of the middle band, 0 to 8. Default 0 (SMA).one of 012345678
    monthstring
    Return data for one calendar month in history, format YYYY-MM. Example: 2024-01. Omit to use the default range (the most recent data).
    nbdevdninteger
    Standard deviations for the lower band. Default 2.
    nbdevupinteger
    Standard deviations for the upper band. Default 2.
  • alphavantage_get_bulk_bid_ask_pricesGet realtime bid and ask prices for up to 100 US symbols in one call, across regular and extended trading hours.Read-only

    Get Bulk Bid and Ask Prices

    Get realtime bid and ask prices for up to 100 US symbols in one call, across regular and extended trading hours. Returns a data array with symbol, timestamp, bid_price, bid_size, ask_price and ask_size for each symbol. Use alphavantage_get_bulk_quotes for last-trade quotes and alphavantage_get_quote for one symbol. The vendor documentation marks this as a premium function. Without a premium plan Alpha Vantage returns artificial sample data together with a `message` that says it is a premium endpoint, so check `message` before trusting the data. Set datatype to csv to get CSV text instead of JSON. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    symbolstringrequired
    Comma-separated ticker symbols, up to 100 (symbols beyond the first 100 are ignored). Example: MSFT,AAPL,IBM.
    datatypestring
    Output format: json (default) or csv. With csv the response is plain CSV text, returned as {"result": "<csv text>"} instead of a JSON object.one of jsoncsv
  • alphavantage_get_bulk_quotesGet realtime quotes for up to 100 US symbols in one call.Read-only

    Get Bulk Quotes

    Get realtime quotes for up to 100 US symbols in one call. Returns a data array with symbol, timestamp, open, high, low, close (the latest price), volume, previous_close, change, change_percent, extended_hours_quote, extended_hours_change and extended_hours_change_percent for each symbol. Use alphavantage_get_quote for a single symbol. The vendor documentation marks this as a premium API function (realtime US market data plan). Without a premium plan Alpha Vantage returns artificial sample data together with a `message` that says it is a premium endpoint, so check `message` before trusting the data. Set datatype to csv to get CSV text instead of JSON. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    symbolstringrequired
    Comma-separated ticker symbols, up to 100. Example: MSFT,AAPL,IBM.
    datatypestring
    Output format: json (default) or csv. With csv the response is plain CSV text, returned as {"result": "<csv text>"} instead of a JSON object.one of jsoncsv
  • alphavantage_get_cash_flowGet annual and quarterly cash flow statements for a company.Read-only

    Get Cash Flow

    Get annual and quarterly cash flow statements for a company. Returns symbol, annualReports and quarterlyReports arrays of line items, normalized to GAAP and IFRS taxonomies. Use it for statement detail; use alphavantage_get_company_overview for summary ratios. Free keys are limited to 25 requests a day. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    symbolstringrequired
    Ticker symbol of the equity or ETF. Non-US listings use an exchange suffix, such as TSCO.LON. Example: IBM.
  • alphavantage_get_commodity_pricesGet historical prices for a commodity: WTI or Brent crude, natural gas, copper, aluminum, wheat, corn, cotton, sugar, coffee, or the global commodities index.Read-only

    Get Commodity Prices

    Get historical prices for a commodity: WTI or Brent crude, natural gas, copper, aluminum, wheat, corn, cotton, sugar, coffee, or the global commodities index. Returns name, interval, unit and a data array of date and value points. Use alphavantage_get_gold_silver_spot or alphavantage_get_gold_silver_history for gold and silver, and alphavantage_get_economic_indicator for macro series. Free keys are limited to 25 requests a day. Set datatype to csv to get CSV text instead of JSON. Alpha Vantage reports errors as HTTP 200: if the response has an `Error Message`, `Information` or `Note` key, the call failed and that key holds the reason (bad parameter, rate limit, or a premium-only function).

    Inputs

    commoditystringrequired
    Commodity to fetch. One of WTI, BRENT, NATURAL_GAS, COPPER, ALUMINUM, WHEAT, CORN, COTTON, SUGAR, COFFEE, ALL_COMMODITIES.one of WTIBRENTNATURAL_GASCOPPERALUMINUMWHEATCORNCOTTONSUGARCOFFEEALL_COMMODITIES
    datatypestring
    Output format: json (default) or csv. With csv the response is plain CSV text, returned as {"result": "<csv text>"} instead of a JSON object.one of jsoncsv
    intervalstring
    Data frequency. WTI, BRENT and NATURAL_GAS accept daily, weekly or monthly; the others accept monthly, quarterly or annual. Default monthly.one of dailyweeklymonthlyquarterlyannual