Actions26
- Stock Actions
- Index Actions
- ETF Actions
- Forex Actions
- Crypto Actions
- Alternative Actions
Overview
The Finnhub.io node for n8n allows users to interact with the Finnhub financial data API. Specifically, when using the Stock resource and the Last Bid-Ask [PREMIUM] operation, this node retrieves the most recent bid and ask prices for a specified stock symbol. This is particularly useful for traders, analysts, or applications that require up-to-date market depth information for equities.
Common scenarios:
- Displaying real-time bid/ask spreads in trading dashboards.
- Triggering alerts or automations based on changes in bid/ask prices.
- Integrating live market data into custom analytics workflows.
Example:
A user wants to monitor the latest bid and ask prices for Apple Inc. (AAPL) and trigger an alert if the spread exceeds a certain threshold.
Properties
Name | Type | Meaning |
---|---|---|
Symbol | String | The ticker symbol of the company to retrieve the last bid/ask prices for (e.g., "AAPL"). |
Premium | Boolean | Indicates whether you have a Premium Subscription for Finnhub.io, which is required for this operation. |
Output
The output will be a JSON object containing the latest bid and ask prices for the requested stock symbol. While the exact structure depends on the Finnhub API response, it typically includes fields such as:
{
"symbol": "AAPL",
"bid": 123.45,
"ask": 123.55,
"timestamp": 1712345678
}
symbol
: The stock symbol queried.bid
: The most recent bid price.ask
: The most recent ask price.timestamp
: Unix timestamp of the quote.
Note: This node does not output binary data.
Dependencies
- Finnhub API Key: You must provide a valid Finnhub API key via n8n credentials (
finnhub
). - Premium Subscription: The "Last Bid-Ask" operation requires a premium Finnhub.io subscription.
Troubleshooting
Common issues:
Missing or invalid API key:
Error message: "401 Unauthorized" or "Invalid API key."
Resolution: Ensure your Finnhub API key is correctly configured in n8n credentials.Insufficient subscription level:
Error message: "This endpoint is available for premium users only."
Resolution: Upgrade your Finnhub.io account to a premium subscription and set the "Premium" property to true.Invalid symbol:
Error message: "Symbol not found" or empty result.
Resolution: Double-check the stock symbol for typos or use a supported symbol.