Finnhub.io icon

Finnhub.io

Consume Finnhub.io API

Overview

This n8n node interacts with the Finnhub.io API to retrieve sector exposure data for a specified Exchange-Traded Fund (ETF). The "ETFs Sector Exposure [PREMIUM]" operation allows users to obtain detailed information about how an ETF's holdings are distributed across different industry sectors. This is particularly useful for investors, analysts, or portfolio managers who want to assess the diversification and risk profile of an ETF.

Practical examples:

  • An investor wants to check if an ETF is heavily weighted in technology versus healthcare.
  • A financial analyst needs to compare sector exposures across multiple ETFs for a report.
  • A portfolio manager evaluates sector overlap between existing holdings and a new ETF.

Properties

Name Type Meaning
Symbol String ETF symbol (e.g., ARKK). Specifies which ETF's sector exposure will be retrieved.

Output

The output will contain a json field with the sector exposure breakdown for the specified ETF. While the exact structure depends on the Finnhub API response, it typically includes:

  • sector: Name of the sector (e.g., Technology, Healthcare).
  • exposure: Percentage of the ETF's assets allocated to that sector.

Example output:

{
  "sectorExposure": [
    { "sector": "Technology", "exposure": 35.2 },
    { "sector": "Healthcare", "exposure": 18.7 },
    ...
  ],
  "symbol": "ARKK"
}

Note: The actual keys may vary based on Finnhub's API.

Dependencies

  • External Service: Requires access to the Finnhub.io API.
  • API Key: You must provide a valid Finnhub API key via n8n credentials (finnhub).
  • n8n Configuration: Ensure the Finnhub credential is set up in your n8n instance.

Troubleshooting

  • Missing or Invalid API Key:
    Error message: "401 Unauthorized" or similar.
    Resolution: Check that your Finnhub API key is correctly configured in n8n credentials.

  • Invalid Symbol:
    Error message: "Symbol not found" or empty results.
    Resolution: Verify that the ETF symbol is correct and supported by Finnhub.

  • Premium Endpoint Access:
    Error message: "Access denied" or "Premium endpoint".
    Resolution: Ensure your Finnhub account has access to premium endpoints required for this operation.

  • Network Issues:
    Error message: "Request failed" or timeout errors.
    Resolution: Check your network connection and Finnhub service status.

Links and References

Discussion