> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/finnhub.md).

# Finnhub

Look up stock quotes, symbol search, company news, financials, earnings calendars, and insider transactions from Finnhub.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector         | Authentication |
| ----------------- | -------------- |
| Finnhub (API Key) | API Key        |

#### Finnhub (API Key)

Connect to Finnhub with an API key to read stock quotes, symbol search, company news, financials, earnings calendars, and insider transactions.

**Set up in Finnhub**

1. Prepare the Finnhub account or service that the workflow will access. Grant access to the required resources and operations.
2. **API Key:** Your Finnhub API key. Get a free key from your Finnhub dashboard. Access to specific data or symbols depends on your plan tier.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **Finnhub (API Key)**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field | Required | What to enter                                                                                                                                                                          |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API Key       | Yes      | Your Finnhub API key. Get a free key from your Finnhub dashboard. Access to specific data or symbols depends on your plan tier. [Provider instructions](https://finnhub.io/dashboard). |

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **Finnhub** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Get Stock Quote

Get a real-time price quote for one US stock ticker.

**Inputs**

| Field  | Type   | Required | Description                                     |
| ------ | ------ | -------- | ----------------------------------------------- |
| Symbol | string | Yes      | The stock ticker to price, e.g. AAPL for Apple. |

**Outputs**

| Field          | Type   | Description                                          |
| -------------- | ------ | ---------------------------------------------------- |
| Symbol         | string | The ticker this quote is for.                        |
| Current price  | number | The latest traded price.                             |
| Change         | number | Absolute price change from the previous close.       |
| Percent change | number | Percentage price change from the previous close.     |
| Day high       | number | The highest price so far in the current trading day. |
| Day low        | number | The lowest price so far in the current trading day.  |
| Open           | number | The opening price for the current trading day.       |
| Previous close | number | The closing price on the previous trading day.       |

#### Search Symbols

Find a stock's ticker symbol by company name, ISIN or CUSIP.

**Inputs**

| Field    | Type   | Required | Description                                     |
| -------- | ------ | -------- | ----------------------------------------------- |
| Query    | string | Yes      | Company name, ticker, ISIN or CUSIP to look up. |
| Exchange | string | No       | Limit results to a single exchange (optional).  |

**Outputs**

| Field   | Type          | Description                 |
| ------- | ------------- | --------------------------- |
| Count   | integer       | Number of matches returned. |
| Results | object\_array | The matching symbols.       |

#### Get Company News

Get recent news articles for a North American company over a date range.

**Inputs**

| Field     | Type   | Required | Description                                                                                                 |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------- |
| Symbol    | string | Yes      | The company's ticker, e.g. AAPL.                                                                            |
| From date | date   | No       | Earliest article date. Defaults to about a week before To date, or a week ago when To date is also omitted. |
| To date   | date   | No       | Latest article date. Defaults to today, or about a week after From date when only From date is set.         |

**Outputs**

| Field    | Type          | Description                                       |
| -------- | ------------- | ------------------------------------------------- |
| Count    | integer       | Number of articles returned.                      |
| Articles | object\_array | The news articles for this company, newest first. |

#### Get Basic Financials

Get a company's key financial metrics and ratios, such as P/E, margins and 52-week high/low.

**Inputs**

| Field  | Type   | Required | Description                      |
| ------ | ------ | -------- | -------------------------------- |
| Symbol | string | Yes      | The company's ticker, e.g. AAPL. |

**Outputs**

| Field       | Type   | Description                                       |
| ----------- | ------ | ------------------------------------------------- |
| Symbol      | string | The ticker these financials are for.              |
| Metric type | string | The type of financial metrics returned.           |
| Metrics     | object | Key financial ratios and figures for the company. |
| Series      | object | Historical annual and quarterly financial series. |

#### Get Earnings Calendar

See upcoming and recent earnings release dates, with EPS and revenue estimates versus actuals.

**Inputs**

| Field                 | Type    | Required | Description                                                                                                  |
| --------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| From date             | date    | No       | Earliest report date. Defaults to today, or about a week before To date when only To date is set.            |
| To date               | date    | No       | Latest report date. Defaults to about a week after From date (or a week out when From date is also omitted). |
| Symbol                | string  | No       | Limit to one company's ticker (optional).                                                                    |
| Include international | boolean | No       | Include non-US markets. Off by default.                                                                      |

**Outputs**

| Field    | Type          | Description                                |
| -------- | ------------- | ------------------------------------------ |
| Count    | integer       | Number of releases returned.               |
| Earnings | object\_array | Earnings releases in the requested window. |

#### Get Insider Transactions

See recent insider buying and selling for a company, from SEC Form 3/4/5 filings.

**Inputs**

| Field     | Type   | Required | Description                      |
| --------- | ------ | -------- | -------------------------------- |
| Symbol    | string | Yes      | The company's ticker, e.g. AAPL. |
| From date | date   | No       | Earliest filing date (optional). |
| To date   | date   | No       | Latest filing date (optional).   |

**Outputs**

| Field        | Type          | Description                                     |
| ------------ | ------------- | ----------------------------------------------- |
| Symbol       | string        | The ticker these transactions are for.          |
| Count        | integer       | Number of transactions returned.                |
| Transactions | object\_array | Recent insider buys and sells for this company. |

### Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

#### New Company News

Fires when a new news article is published for the configured company ticker. Polls Finnhub's company news and emits each newly seen article once.

**Configuration**

| Field  | Type   | Required | Description                                        |
| ------ | ------ | -------- | -------------------------------------------------- |
| Symbol | string | Yes      | The company ticker to watch for new news articles. |

**Event inputs**

| Field        | Type     | Required | Description                                                         |
| ------------ | -------- | -------- | ------------------------------------------------------------------- |
| Article ID   | integer  | Yes      | Finnhub's unique id for this article. Default: 0.                   |
| Headline     | string   | Yes      | The article's headline. Default: .                                  |
| Summary      | string   | No       | A short summary of the article. Default: .                          |
| Source       | string   | No       | The publisher of the article. Default: .                            |
| URL          | string   | No       | Link to the full article. Default: .                                |
| Category     | string   | No       | The article's news category. Default: .                             |
| Published at | datetime | Yes      | When the article was published. Default: 0001-01-01 00:00:00+00:00. |

**Outputs**

| Field        | Type     | Description                           |
| ------------ | -------- | ------------------------------------- |
| Article ID   | integer  | Finnhub's unique id for this article. |
| Headline     | string   | The article's headline.               |
| Summary      | string   | A short summary of the article.       |
| Source       | string   | The publisher of the article.         |
| URL          | string   | Link to the full article.             |
| Category     | string   | The article's news category.          |
| Published at | datetime | When the article was published.       |

#### New Insider Transaction

Fires when a new insider transaction is filed for the configured company ticker. Polls Finnhub's insider transactions and emits each newly filed transaction once.

**Configuration**

| Field  | Type   | Required | Description                                          |
| ------ | ------ | -------- | ---------------------------------------------------- |
| Symbol | string | Yes      | The company ticker to watch for new insider filings. |

**Event inputs**

| Field             | Type    | Required | Description                                                 |
| ----------------- | ------- | -------- | ----------------------------------------------------------- |
| Symbol            | string  | Yes      | The ticker this transaction is for. Default: .              |
| Insider name      | string  | No       | The reporting insider's name.                               |
| Share change      | integer | No       | The change in shares held.                                  |
| Shares held       | integer | No       | Total shares held by the insider after this transaction.    |
| Transaction price | number  | No       | Price per share for this transaction.                       |
| Transaction date  | string  | No       | When the transaction occurred.                              |
| Filing date       | string  | Yes      | When the SEC filing was made public. Default: .             |
| Transaction code  | string  | No       | SEC transaction code (e.g. 'S' for sale, 'P' for purchase). |

**Outputs**

| Field             | Type    | Description                                                 |
| ----------------- | ------- | ----------------------------------------------------------- |
| Symbol            | string  | The ticker this transaction is for.                         |
| Insider name      | string  | The reporting insider's name.                               |
| Share change      | integer | The change in shares held.                                  |
| Shares held       | integer | Total shares held by the insider after this transaction.    |
| Transaction price | number  | Price per share for this transaction.                       |
| Transaction date  | string  | When the transaction occurred.                              |
| Filing date       | string  | When the SEC filing was made public.                        |
| Transaction code  | string  | SEC transaction code (e.g. 'S' for sale, 'P' for purchase). |

### Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/finnhub.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
