# Finnhub

```json
{
  "name": "Finnhub",
  "slug": "finnhub",
  "url": "https://composio.dev/toolkits/finnhub",
  "markdown_url": "https://composio.dev/toolkits/finnhub.md",
  "logo_url": "https://logos.composio.dev/api/finnhub",
  "categories": [
    "finance & accounting"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-08-28T05:31:31.190Z"
}
```

![Finnhub logo](https://logos.composio.dev/api/finnhub)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Finnhub MCP or direct API to retrieve real-time quotes, fetch company financials, surface market news, and query economic indicators through natural language.

## Summary

Finnhub is a market data API delivering real-time quotes, company fundamentals, and financial news.
Use it to power trading apps, research, alerts, and analytics with timely market intelligence.

## Categories

- finance & accounting

## Toolkit Details

- Tools: 11

## Images

- Logo: https://logos.composio.dev/api/finnhub

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Finnhub.
  - Setup:
    - Configure Api Key credentials for Finnhub.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Get latest price for AAPL
- List company financials for TSLA
- Summarize today's market-moving news headlines

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `FINNHUB_GET_COMPANY_FINANCIAL_METRICS` | Get Company Financial Metrics | Get Finnhub's current key ratios and annual or quarterly metric series for one company. |
| `FINNHUB_GET_COMPANY_PROFILE` | Get Company Profile | Look up a company profile by exactly one ticker, ISIN, or CUSIP. |
| `FINNHUB_GET_MARKET_STATUS` | Get Market Status | Check whether an exchange is open now and identify its current session, timezone, or holiday. |
| `FINNHUB_GET_QUOTE` | Get Quote | Get the latest price snapshot for one Finnhub symbol. Unknown symbols fail explicitly instead of returning a misleading zero quote. |
| `FINNHUB_GET_QUOTES` | Get Quotes | Get price snapshots for 1-10 Finnhub symbols in one tool call. This uses one Finnhub API request per symbol and reports unrecognized symbols per result. |
| `FINNHUB_GET_REPORTED_FINANCIALS` | Get Reported Financials | Retrieve as-reported balance-sheet, cash-flow, and income-statement data for a company or filing. A ticker, CIK, or accession number is required; large statement details are available only when requested. |
| `FINNHUB_LIST_CALENDAR_EVENTS` | List Calendar Events | List earnings releases or IPO events in an ordered date range. Use an earnings ticker or a narrow date window because Finnhub does not paginate or server-limit these calendars. |
| `FINNHUB_LIST_EARNINGS_RESULTS` | List Earnings Results | List a company's recent actual versus estimated earnings and surprise values. |
| `FINNHUB_LIST_SEC_FILINGS` | List SEC Filings | List SEC filing metadata; a ticker, CIK, or accession number is required, optionally filtered by form and an ordered date range. |
| `FINNHUB_SEARCH_NEWS` | Search News | Get broad market news by category or company-specific news for an ordered date range. Use narrow company date ranges because Finnhub does not paginate or server-limit company news. |
| `FINNHUB_SEARCH_SYMBOLS` | Search Symbols | Find tradable symbols by ticker, company name, ISIN, or CUSIP, optionally restricted to an exchange. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK
```python
pip install composio_openai
```

```typescript
npm install @composio/openai
```

#### Path 1, Step 2: Initialize Composio and Create Tool Router Session

Import and initialize Composio client, then create a Tool Router session
```python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
```

```typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
```

#### Path 1, Step 3: Execute Finnhub Tools via Tool Router with Your Agent

Get tools from Tool Router session and execute Finnhub actions with your Agent
```python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'YOUR_SPECIFIC_PROMPT_HERE'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
```

```typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'YOUR_SPECIFIC_PROMPT_HERE'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK for Python or TypeScript
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
```

#### Path 2, Step 2: Initialize Client and Create Tool Router Session

Import and initialize the Composio client, then create a Tool Router session for Finnhub
```python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
```

```typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });
const session = await composio.create('your-user-id');
console.log(`Tool Router session created: ${session.mcp.url}`);
```

#### Path 2, Step 3: Connect to AI Agent

Use the MCP server with your AI agent (Anthropic Claude or Mastra)
```python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Finnhub tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('YOUR_SPECIFIC_PROMPT_HERE')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: session.mcp.url,
    headers: {
      'x-api-key': 'your-composio-api-key',
    },
  },
});

const tools = await client.tools();
const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{
    role: 'user',
    content: 'YOUR_SPECIFIC_PROMPT_HERE'
  }],
  maxSteps: 5,
});

console.log(`Agent: ${text}`);
```

## Why Use Composio?

### 1. AI Native Finnhub Integration

- Supports both Finnhub MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Finnhub data

### 2. Managed Auth

- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Finnhub access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Finnhub
- Scoped, least privilege access to Finnhub resources
- Full audit trail of agent actions to support review and compliance

## Use Finnhub with any AI Agent Framework

Choose a framework you want to connect Finnhub with:

- [ChatGPT Work](https://composio.dev/toolkits/finnhub/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/finnhub/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/finnhub/framework/hermes-agent)

## Related Toolkits

- [Stripe](https://composio.dev/toolkits/stripe) - Stripe is a global online payments platform offering APIs for managing payments, customers, and subscriptions. Trusted by businesses for secure, efficient, and scalable payment processing worldwide.
- [44API](https://composio.dev/toolkits/44api) - 44API is an API service for validating VAT and tax identifiers and returning company details. Use it to verify business tax data and manage account IP whitelists quickly.
- [Aiwyn Tax MCP](https://composio.dev/toolkits/aiwyn_tax_mcp) - Aiwyn Tax MCP is a tax estimation service powered by Aiwyn's federal and state tax engine. It helps teams estimate tax outcomes without building tax calculation logic from scratch.
- [Alpaca](https://composio.dev/toolkits/alpaca) - Alpaca is a stock and crypto trading platform for commission-free trading, real-time market data, and algorithmic strategies. Use it to build brokerage apps, trading bots, and portfolio workflows with market connectivity.
- [Alpha vantage](https://composio.dev/toolkits/alpha_vantage) - Alpha Vantage is a financial data platform offering real-time and historical stock market APIs. Get instant, reliable access to equities, forex, and technical analysis data for smarter trading decisions.
- [Altoviz](https://composio.dev/toolkits/altoviz) - Altoviz is a cloud-based billing and invoicing platform for businesses. It streamlines online payments, expense tracking, and customizable invoice management.
- [Benzinga](https://composio.dev/toolkits/benzinga) - Benzinga provides real-time financial news and data APIs for market coverage. It helps you track breaking news and actionable market insights instantly.
- [Brex](https://composio.dev/toolkits/brex) - Brex provides corporate credit cards and spend management tailored for startups and tech businesses. It helps optimize company cash flow, streamline accounting, and accelerate business growth.
- [Cashfree Payments MCP](https://composio.dev/toolkits/cashfree_payments_mcp) - Cashfree Payments MCP is a merchant payments platform that handles collection, payouts, subscriptions, settlements, refunds, and identity verification. Simplifies merchant money lifecycle management with unified, API-driven workflows.
- [Chaser](https://composio.dev/toolkits/chaser) - Chaser is accounts receivable automation software that sends invoice reminders and helps businesses get paid faster. It streamlines the collections process to save time and improve cash flow.
- [Clarity AI MCP](https://composio.dev/toolkits/clarity_ai_mcp) - Clarity AI MCP is an MCP toolkit for simulating SFDR 2.0 fund classifications from a fund name, ISIN, or CUSIP. Use it to tap Clarity AI disclosure data and modeling without building custom sustainability-data workflows.
- [Clientary](https://composio.dev/toolkits/clientary) - Clientary is a platform for managing clients, invoices, projects, proposals, and more. It streamlines client work and saves you serious admin time.
- [Coinbase](https://composio.dev/toolkits/coinbase) - Coinbase is a platform for buying, selling, and storing cryptocurrency. It makes exchanging and managing crypto simple and secure for everyone.
- [Coinranking](https://composio.dev/toolkits/coinranking) - Coinranking is a comprehensive cryptocurrency market data platform offering access to real-time coin prices, market caps, and historical data. Get accurate, up-to-date stats for thousands of digital assets in one place.
- [Coupa](https://composio.dev/toolkits/coupa) - Coupa is a business spend management platform for procurement, invoicing, and expenses. It helps organizations streamline purchasing, control costs, and gain complete visibility over financial operations.
- [CurrencyScoop](https://composio.dev/toolkits/currencyscoop) - CurrencyScoop is a developer-friendly API for real-time and historical currency exchange rates. Easily access fiat and crypto data for smart, up-to-date financial applications.
- [Daffy](https://composio.dev/toolkits/daffy) - Daffy is a modern charitable giving platform with a donor-advised fund. Easily set aside funds, grow them tax-free, and donate to over 1.7 million U.S. charities.
- [Debitura](https://composio.dev/toolkits/debitura) - Debitura is a debt collection platform for managing creditor cases, payments, tasks, coverage, divisions, and webhooks. It helps teams organize collection operations and track debtor activity through a Customer API.
- [Didit](https://composio.dev/toolkits/didit) - Didit is an identity verification and compliance API platform for KYC, KYB, AML, and fraud prevention. It helps teams onboard users faster while reducing risk and meeting compliance needs.
- [Eagle doc](https://composio.dev/toolkits/eagle_doc) - Eagle doc is an AI-powered OCR API for invoices and receipts. It delivers fast, reliable, and accurate document data extraction for seamless automation.

## Frequently Asked Questions

### Do I need my own developer credentials to use Finnhub with Composio?

Yes, Finnhub requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
