Finnhub.io icon

Finnhub.io

Consume Finnhub.io API

Overview

The ETFs Holdings [PREMIUM] operation of the Finnhub.io n8n node retrieves the holdings (i.e., the list of assets or securities) within a specified Exchange-Traded Fund (ETF). This is particularly useful for users who want to analyze the composition of an ETF, perform portfolio analysis, or integrate ETF data into financial dashboards and reports.

Common scenarios:

  • Financial analysts extracting ETF holdings for research.
  • Automated workflows that monitor changes in ETF compositions.
  • Portfolio managers comparing ETF exposures.

Example:
A user wants to fetch all current holdings of the "ARKK" ETF to analyze its sector allocation.

Properties

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

Output

The output will contain a json field with the ETF's holdings data. While the exact structure depends on the Finnhub API response, it typically includes:

  • A list/array of holdings, where each holding may include:
    • Ticker/Symbol
    • Name of the asset
    • Number of shares
    • Weight/percentage in the ETF
    • Market value

Example output structure:

{
  "holdings": [
    {
      "symbol": "TSLA",
      "name": "Tesla Inc",
      "shares": 100000,
      "weight": 10.5,
      "marketValue": 80000000
    },
    ...
  ]
}

Note: The actual fields 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

  • Invalid or Missing 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 the ETF symbol is correct and supported by Finnhub.

  • Premium Endpoint Access:
    Some ETF endpoints may require a premium Finnhub subscription.
    Error message: "Access denied" or "Upgrade required."
    Resolution: Ensure your Finnhub account has the necessary subscription level.

Links and References

Discussion