Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Finnhub

Scalekit connector
Open markdown

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

Tools
30
What they doRead · write · destructive
30 · 0 · 030 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 Finnhub connection

    In AgentKit > Connections, create a Finnhub 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 = 'finnhub'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Finnhub:', 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: 'finnhub_get_company_profile',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Finnhub 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
  • finnhub_get_basic_financialsGet a company's key financial metrics and ratio history.Read-only

    Get Basic Financials

    Get a company's key financial metrics and ratio history. Returns metric, a map of current values such as peTTM, pbAnnual, epsTTM, dividendYieldIndicatedAnnual, beta, 52WeekHigh, 52WeekLow, 10DayAverageTradingVolume, grossMarginTTM and netProfitMarginTTM, plus series, annual and quarterly histories of ratios such as currentRatio, netMargin and salesPerShare. Use finnhub_get_basic_financials for valuation, margins and 52-week range. Use finnhub_get_financials_as_reported for full statements from SEC filings and finnhub_get_quote for the current price.

    Inputs

    symbolstringrequired
    Ticker symbol of the company, as Finnhub lists it (US tickers are plain, e.g. AAPL; other markets use a suffix, e.g. BMW.DE). Use finnhub_search_symbols to find it.
    metricstring
    Metric group to return. Finnhub accepts all. Example: all.one of alldefault all
  • finnhub_get_company_profileGet a company's profile by ticker symbol, ISIN or CUSIP.Read-only

    Get Company Profile

    Get a company's profile by ticker symbol, ISIN or CUSIP. Returns name, ticker, exchange, country, currency, finnhubIndustry, ipo date, marketCapitalization and shareOutstanding (both in millions), weburl, phone and logo URL. An unknown identifier returns an empty object. Use finnhub_get_company_profile for who a company is and its size. Use finnhub_get_basic_financials for ratios and margins, and finnhub_get_peers for comparable companies. Provide exactly one of symbol, isin or cusip.

    Inputs

    cusipstring
    CUSIP of the security, used when symbol and isin are not given. Example: 037833100.
    isinstring
    ISIN of the security, used when symbol is not given. Example: US0378331005.
    symbolstring
    Ticker symbol of the company. Provide one of symbol, isin or cusip. Example: AAPL.
  • finnhub_get_crypto_candlesGet open, high, low, close and volume candles for a crypto pair over a time range.Read-only

    Get Crypto Candles

    Get open, high, low, close and volume candles for a crypto pair over a time range. Returns parallel arrays o, h, l, c, v and t (UNIX times) plus s, which is ok or no_data. Needs a paid Finnhub plan; a free key gets an access error (HTTP 403). Use finnhub_get_crypto_candles for crypto price history. Get the pair's symbol from finnhub_list_crypto_symbols.

    Inputs

    fromintegerrequired
    Start of the range as a UNIX timestamp in seconds. Example: 1756684800 (2025-09-01 00:00 UTC).
    resolutionstringrequired
    Candle size: 1, 5, 15, 30 or 60 for minutes, D for daily, W for weekly, M for monthly. Some sizes are not available on every exchange. Example: D.one of 15153060DWM
    symbolstringrequired
    Crypto pair symbol exactly as returned by finnhub_list_crypto_symbols, including the exchange prefix. Example: BINANCE:BTCUSDT.
    tointegerrequired
    End of the range as a UNIX timestamp in seconds. Example: 1759276800 (2025-10-01 00:00 UTC). Intraday resolutions return at most one month per call.
  • finnhub_get_earnings_calendarList past and upcoming earnings releases, optionally for one symbol or date range.Read-only

    Get Earnings Calendar

    List past and upcoming earnings releases, optionally for one symbol or date range. Returns earningsCalendar, a list of releases with symbol, date, hour (bmo before open, amc after close, dmh during market hours), year, quarter, epsEstimate, epsActual, revenueEstimate and revenueActual. EPS and revenue are non-GAAP. The free plan covers one month of history plus upcoming dates. Use finnhub_get_earnings_calendar to find when companies report. Use finnhub_get_earnings_surprises for one company's beat-or-miss history.

    Inputs

    fromstring
    Start date of the release range, YYYY-MM-DD. Example: 2026-09-01.
    internationalboolean
    Set to true to include non-US markets. Omit for US only. Example: true.
    symbolstring
    Only return releases for this ticker. Omit for all companies. Example: AAPL.
    tostring
    End date of the release range, YYYY-MM-DD. Example: 2026-09-30.
  • finnhub_get_earnings_surprisesGet a company's quarterly earnings per share against analyst estimates.Read-only

    Get Earnings Surprises

    Get a company's quarterly earnings per share against analyst estimates. Returns one entry per quarter with period, year, quarter, actual, estimate, surprise and surprisePercent, newest first. The free plan returns the last four quarters. Use finnhub_get_earnings_surprises for a company's beat-or-miss history. Use finnhub_get_earnings_calendar for upcoming report dates.

    Inputs

    symbolstringrequired
    Ticker symbol of the company, as Finnhub lists it (US tickers are plain, e.g. AAPL; other markets use a suffix, e.g. BMW.DE). Use finnhub_search_symbols to find it.
    limitinteger
    Maximum number of quarters to return. Omit for the full history your plan allows. Example: 4.
  • finnhub_get_economic_calendarList recent and upcoming economic data releases such as GDP, CPI and jobs reports.Read-only

    Get Economic Calendar

    List recent and upcoming economic data releases such as GDP, CPI and jobs reports. Returns economicCalendar, a list of releases with event, country, time, impact (low, medium or high), actual, estimate, prev and unit. Needs a paid Finnhub plan; a free key gets an access error (HTTP 403). Use finnhub_get_economic_calendar for macro events. Use finnhub_get_earnings_calendar for company earnings dates.

    Inputs

    fromstring
    Start date of the release range, YYYY-MM-DD. Example: 2026-09-01.
    tostring
    End date of the release range, YYYY-MM-DD. Example: 2026-09-30.
  • finnhub_get_financials_as_reportedGet a company's financial statements exactly as reported in its SEC 10-K or 10-Q filings.Read-only

    Get Financials As Reported

    Get a company's financial statements exactly as reported in its SEC 10-K or 10-Q filings. Returns symbol, cik and data, one entry per filing with year, quarter, form, startDate, endDate, filedDate, accessNumber and report, which holds the balance sheet (bs), income statement (ic) and cash flow (cf) line items as filed. Responses for a full history are large; narrow with from and to. Use finnhub_get_financials_as_reported for full statements. Use finnhub_get_basic_financials for ready-made ratios. Provide symbol, cik or access_number.

    Inputs

    access_numberstring
    Accession number of one filing to return financials from. Example: 0000320193-24-000123.
    cikstring
    SEC Central Index Key of the company, used instead of symbol. Example: 320193.
    freqstring
    Statement frequency: annual (10-K) or quarterly (10-Q). Omit for annual. Example: quarterly.one of annualquarterly
    fromstring
    Start date of the period end range, YYYY-MM-DD. Example: 2026-09-01.
    symbolstring
    Ticker symbol of the company. Provide one of symbol, cik or access_number. Example: AAPL.
    tostring
    End date of the period end range, YYYY-MM-DD. Example: 2026-09-30.
  • finnhub_get_forex_candlesGet open, high, low, close and volume candles for a currency pair over a time range.Read-only

    Get Forex Candles

    Get open, high, low, close and volume candles for a currency pair over a time range. Returns parallel arrays o, h, l, c, v and t (UNIX times) plus s, which is ok or no_data. Needs a paid Finnhub plan; a free key gets an access error (HTTP 403). Use finnhub_get_forex_candles for one pair's price history. Use finnhub_get_forex_rates for current conversion rates. Get the pair's symbol from finnhub_list_forex_symbols.

    Inputs

    fromintegerrequired
    Start of the range as a UNIX timestamp in seconds. Example: 1756684800 (2025-09-01 00:00 UTC).
    resolutionstringrequired
    Candle size: 1, 5, 15, 30 or 60 for minutes, D for daily, W for weekly, M for monthly. Some sizes are not available on every exchange. Example: D.one of 15153060DWM
    symbolstringrequired
    Forex pair symbol exactly as returned by finnhub_list_forex_symbols, including the exchange prefix. Example: OANDA:EUR_USD.
    tointegerrequired
    End of the range as a UNIX timestamp in seconds. Example: 1759276800 (2025-10-01 00:00 UTC). Intraday resolutions return at most one month per call.