Finnhub.io icon

Finnhub.io

Consume Finnhub.io API

Overview

The Finnhub.io n8n node allows users to interact with the Finnhub financial data API. Specifically, when using the Stock resource and the Basic Financials operation, this node retrieves fundamental financial metrics for a given stock symbol (e.g., AAPL for Apple Inc.). This is useful for workflows that require up-to-date company financials, such as automated investment analysis, portfolio monitoring, or reporting.

Practical examples:

  • Automatically fetch and log key financial ratios for a list of stocks.
  • Enrich CRM records with the latest financial data for publicly traded companies.
  • Trigger alerts if certain financial metrics cross predefined thresholds.

Properties

Name Type Meaning
Symbol String The ticker symbol of the company to retrieve basic financials for (e.g., "AAPL").
Premium Boolean Indicates whether you have a Premium Subscription for Finnhub.io, which may affect data access or limits.

Output

The output will be a JSON object containing the basic financial metrics for the specified stock symbol. The structure typically includes fields such as:

{
  "symbol": "AAPL",
  "metricType": "all",
  "metric": {
    "52WeekHigh": 150.0,
    "52WeekLow": 100.0,
    "10DayAverageTradingVolume": 50000000,
    "beta": 1.2,
    "peNormalizedAnnual": 25.3,
    // ...more financial metrics
  }
}
  • symbol: The stock symbol queried.
  • metricType: The type/category of metrics returned.
  • metric: An object containing various financial metrics (e.g., price/earnings ratio, trading volume, highs/lows).

Note: The exact fields in metric depend on Finnhub's API response.

Dependencies

  • Finnhub.io API Key: You must provide valid Finnhub credentials in n8n (API key required).
  • n8n Configuration: The node requires the Finnhub credential to be set up in your n8n instance.

Troubleshooting

Common issues:

  • Invalid or missing API key: If the Finnhub credential is not configured or is incorrect, the node will fail with an authentication error.
  • Symbol not found: If an invalid or unsupported stock symbol is provided, the API may return an empty result or an error message.
  • Premium data access: Some financial metrics may only be available to premium subscribers. If you do not have a premium subscription and request premium-only data, you may receive incomplete results or an error.

Error messages and resolutions:

  • "401 Unauthorized": Check your Finnhub API key in n8n credentials.
  • "404 Not Found" or empty response: Verify the stock symbol is correct and supported by Finnhub.
  • "403 Forbidden": You may be trying to access premium data without a subscription; set the Premium property accordingly or upgrade your Finnhub plan.

Links and References

Discussion