Stocklake in n8n
Stock market data inside your workflows, and a trigger that starts a workflow when something happens. Prices are delayed about 15 minutes.
The package n8n-nodes-stocklake adds two nodes to n8n:
- Stocklake: 25 operations in 9 resources (stocks, portfolio, screener, market, sector, earnings, news, signals, watchlist). Lists come back as one item per row, so they go straight into Filter, Sort, Split In Batches or a spreadsheet. Three operations (Compare, Snapshot, Check Holdings) combine several calls and shape the result inside n8n. The node also works as a tool for an AI agent.
- Stocklake Trigger: a polling trigger with six events: a new signal, earnings coming up, a new SEC filing, an insider purchase, an RSI crossing and a price move. Each event fires once.
Both talk to the same MCP endpoint that Claude and ChatGPT use, with your own account and your own daily allowance.
Install
- In n8n, open Settings → Community nodes and choose Install.
- Enter the package name and confirm.
The package is on npm. It needs n8n 2.x and Node.js 20.15 or later, and has no other dependencies.
Credentials
On n8n Cloud, connect a credential. Without one the node runs as a guest, and guest calls are limited to 25 a day per network address. n8n Cloud sends many customers' requests from shared addresses, so that allowance is shared with other n8n users and can already be used up when you start. A free account gives you your own 200 calls a day.
| Credential | How |
|---|---|
| Stocklake OAuth2 API (recommended) | Add the credential and click Connect. Your browser opens, you sign in with an emailed link or code, and n8n handles the rest, including token refresh. Nothing to copy. It uses n8n's dynamic client registration against the same OAuth 2.1 server as Claude and ChatGPT. |
| Stocklake API | Sign in at stocklake.dev/login, copy your key from the account page and paste it into the credential. Use it where n8n cannot complete a browser sign-in. |
| None (guest) | Free operations only, 25 calls a day per network address. |
The node's Authentication field chooses between the two credentials.
Plans & limits
| Plan | Calls / day | Operations |
|---|---|---|
| Guest (no credential) | 25 per network address | The 16 free operations |
| Free | 200 | The same 16 free operations |
| Pro | 5,000 | All 25 operations, and more on some of the free ones (the AI read on insider activity, five years and quarterly statements, filing summaries, the content of each activity item, a longer economic calendar) |
The Pro-only operations are Stock: Get Research, Get Indicator History and Get Analyst Trend; Market: Get Assessment; Sector: Get Intelligence; Earnings: Get Intelligence; News: Get Feed; Signal: Get Many; and Watchlist: Get. Called without a Pro credential they return an error that says what is needed. See Tiers & limits for the current numbers.
List operations count one call per row returned, not one per request: Get Many, Screen Stocks, Get Movers, Signals and Earnings Intelligence bill per row, and a Symbol list bills per ticker.
Operations
| Resource | Operations |
|---|---|
| Stock | Get, Get Many (up to 25 symbols a request), Compare, Snapshot, Get History, Get News, Get Insider Activity, Get Financials, Get Filings, Get Activity; Pro: Get Research, Get Indicator History, Get Analyst Trend |
| Portfolio | Check Holdings |
| Screener | Screen Stocks: filter and rank by sector, RSI, market cap, analyst rating, AI score and more |
| Market | Get Pulse (VIX, Fear & Greed, breadth), Get Movers, Get Economic Calendar; Pro: Get Assessment |
| Sector | Pro: Get Intelligence (one sector, or all 11 as a rotation view) |
| Earnings | Get Calendar; Pro: Get Intelligence |
| News | Pro: Get Feed |
| Signal | Pro: Get Many |
| Watchlist | Pro: Get (the symbols you starred on Stocklake) |
Each operation links to its page in the tool reference. The Symbol field of a single-stock operation searches by company name or ticker, and shows your watchlist when you open it with nothing typed. Sector, preset, signal source and direction, and activity types are lists loaded from Stocklake when you open them; loading them does not use up your calls.
Symbols from earlier steps. Get Many and the Earnings Calendar take a Symbol Source: a typed list, the tickers of the input items (an expression such as {{ $json.ticker }}), or your watchlist. The list is trimmed, upper-cased and de-duplicated, sent in batches of 25, and a value that cannot be a ticker comes out as its own item with an error instead of stopping the run.
Output
Operations that return a list give one item per row: Get Many, Get History, Get Indicator History, Get News, Get Filings, Get Activity, Get Analyst Trend, Screen Stocks, Get Movers, Get Economic Calendar, both Earnings operations, Get Feed, Signal: Get Many and Watchlist: Get. The others return the whole response as one item.
- Simplify (on by default) keeps a flat, chosen set of fields. Turn it off for everything the response holds.
- Return All / Limit: with Return All off, Limit is the number of rows. With it on, the node reads every page, or every batch of 25 symbols. Each page or batch counts as a call.
- Include Response Metadata adds counts, applied filters and plan notes to every item as _meta.
- Every output item is paired with the input item that produced it, so $('Stocklake').item works.
- Download as CSV returns the rows as one binary file instead of items, with a header row, a byte order mark for Excel and protection against spreadsheet formulas.
Compare, Snapshot, Check Holdings
These three operations combine several calls and shape the result in n8n. All are free; Pro adds columns or flags.
| Operation | What you get |
|---|---|
| Stock: Compare | 2 to 25 stocks side by side in one request, one item per stock with the same columns: price, change, market cap, forward and trailing P/E, RSI, 52-week position, analyst rating and upside (Pro adds rating and AI score). Rank By sorts them and adds a rank. |
| Stock: Snapshot | One flat item for one stock: the quote, RSI and MACD state, price against the 50- and 200-day averages, the analyst view, the next earnings date, the latest filing, and a sentence that says it all. Made for people and AI agents. |
| Portfolio: Check Holdings | Send one item per holding (symbol, quantity, optional cost). Each comes back valued, with day change, profit or loss, weight and flags: RSI overbought or oversold, earnings soon, and on Pro a large insider sale. A summary item follows, with totals per currency. Several lots of one ticker are added up. |
One bad symbol does not sink the batch: a ticker Stocklake does not know comes back as its own item with an error, and everything else is still returned.
Stocklake Trigger
The trigger checks Stocklake on a schedule and starts the workflow with what is new, once. It is a polling trigger, so it works on n8n Cloud and self-hosted instances without a public URL.
| Event | Fires when | Plan |
|---|---|---|
| New Signal | Stocklake flags a signal, optionally only for one direction, above a score, or for chosen stocks | Pro |
| Earnings Coming Up | one of your stocks reports within N days (1 to 30); once per report date, and again if the date moves | Free |
| New SEC Filing | a new 8-K for one of your stocks, with title, headline and link | Free |
| Insider Purchase | an insider buys shares worth at least an amount you set | Free |
| RSI Crossing | a stock's RSI goes from one side of a level to the other, up, down or either way | Free |
| Price Move | a stock is up or down by more than a percentage on the day; once per stock, day and direction | Free |
Every item has an event field (signal.new, earnings.upcoming, filing.new, insider.purchase, rsi.crossed or price.moved) next to the data of the event. Except for signals, which look at every stock unless you give a list, the events take a typed list of up to 100 stocks (25 for filings and insider purchases) or your watchlist.
Each event fires once. The node remembers what it has sent in the workflow's static data. The first check after you activate the workflow only records the situation and starts nothing: a stock that is already above the RSI level is not news. Options → Fire on Existing Items sends what exists instead. A stock you add to the list later is recorded first and announced from its next event. n8n saves a node's static data when it fires and when the workflow is activated, so after a restart the node may announce an RSI crossing again.
A crossing, not "is above". The node compares each stock with its value at the previous check, so a stock that stays above 70 fires once, when it gets there. The RSI is recalculated a few times a day, so checking more often finds nothing new.
Test it first. Fetch Test Event returns the latest event that matches right now without touching the saved state, so you can build the rest of the workflow. If nothing matches, the error says what to change.
Calls and schedule. Every check uses calls of your daily allowance, at least one per stock. n8n's Poll Times start at every minute, so the node has its own Minimum Minutes Between Checks, 60 by default: it only calls Stocklake when that much time has passed. Estimated Calls per Day shows the upper bound for your settings, and a notice warns when you set less than 15 minutes.
AI agents
Add the node to an AI Agent's tool input (it appears as Stocklake Tool). Every operation has a description written for a model, and the fields an agent should fill in (ticker, days, limit) default to $fromAI(), so nothing has to be wired by hand.
Set Resource to Toolkit (Agent Chooses the Operation) for one tool that offers several operations. Operations the Agent May Use is the filter: the agent is told about those operations only and cannot run any other, so a market-data agent never sees the operations you leave out. A new Toolkit starts with the operations that work without Pro. The agent needs a chat model that supports tool calling.
Templates
Five workflows, each with a note that lists the set-up steps. All work with a free account. Paste one onto an empty canvas.
| Template | What it does |
|---|---|
| Daily stock briefing to Slack | Every weekday morning: the market pulse (VIX, Fear & Greed, S&P 500) and your stocks in one message. |
| Earnings week alert by Gmail | An email once for each of your stocks that reports within 7 days, from the Earnings Coming Up trigger. |
| Oversold and overbought digest by email | The ten most oversold and the ten most overbought stocks, each weekday evening. |
| Holdings check logged in Google Sheets | Reads your holdings from a sheet, values them with Check Holdings and appends one row per holding. |
| AI agent with Stocklake tools | A chat agent that answers market questions with numbers from a filtered Stocklake toolkit. |
The workflow files are in the templates folder of the package's repository, linked from its npm page.
Limits & errors
Request Options on every operation: Max Retries (3 by default; a 429 is retried after the time in Retry-After, or 1, 2, 4 seconds), Timeout (30 seconds) and Include Remaining Calls, which adds _stocklake.remainingCalls to every item so a workflow can branch before the allowance runs out.
A used-up daily allowance is never retried: the node stops with "Daily limit reached" and makes no further request until 00:00 UTC. Every failure is a node error that says what to do: which plan an operation needs, which symbol was not found, the accepted values for an invalid argument. With Continue On Fail a failed item becomes { "error": "..." } paired with its input item.
Versions
Version 2 of the node is the default for new nodes. Workflows saved with 0.1.x stay on version 1, which has the same parameters and the same output as before; nothing is converted automatically. To move a node, open its settings and pick the new version. The package's changelog lists what 2.0.0 changes.
Questions? Contact us. The same data is available to any MCP client: see Getting Started.