Finnhub.io icon

Finnhub.io

Consume Finnhub.io API

Overview

The ETFs Country Exposure [PREMIUM] operation for the ETF resource in this n8n node retrieves country exposure data for a specified Exchange-Traded Fund (ETF) using the Finnhub.io API. This means it provides a breakdown of how much of the ETF's holdings are invested in different countries.

Common scenarios:

  • Financial analysts or investors want to understand the geographic diversification of an ETF.
  • Automated workflows that monitor portfolio risk based on country exposure.
  • Reporting tools that visualize ETF allocations by country.

Practical example:
A user wants to know what percentage of the ARKK ETF is invested in the United States versus other countries, and uses this node to fetch and process that information automatically.

Properties

Name Type Meaning
Symbol String ETF symbol (e.g., ARKK). Specifies which ETF's country exposure data to retrieve.

Output

The output will be a JSON object containing the country exposure details for the specified ETF. While the exact structure depends on the Finnhub API response, typical fields may include:

{
  "symbol": "ARKK",
  "countryExposure": [
    {
      "country": "United States",
      "exposure": 85.2
    },
    {
      "country": "Japan",
      "exposure": 5.1
    }
    // ... more countries
  ]
}
  • symbol: The ETF symbol queried.
  • countryExposure: An array listing each country and the corresponding percentage of the ETF's holdings exposed to that country.

Note: The node does not output binary data.

Dependencies

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

Troubleshooting

Common issues:

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

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

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

  • API rate limits exceeded:
    Error message: "429 Too Many Requests."
    Resolution: Wait before making further requests or upgrade your Finnhub plan.

Links and References

Discussion