π Detect stock price anomalies & send news alerts with Marketstack, HackerNews & DeepL
β‘ 759 views Β· π Crypto Trading & Stock Market
Description
Price Anomaly Detection & News Alert (Marketstack + HN + DeepL + Slack)
Overview
This workflow monitors a stockβs closing price via Marketstack. It computes a 20-day moving average and standard deviation (Β±2Ο). If the latest close is outside Β±2Ο, it flags an anomaly, fetches related headlines from Hacker News, translates them to Japanese with DeepL, and posts both original and translated text to Slack. When no anomaly is detected, it sends a concise βnormalβ report.
How it works
- Daily trigger at 09:00 JST
- Marketstack: fetch EOD data
- Code: compute mean/Ο and classify (normal/high/low)
- IF: anomaly? β yes = news path / no = normal report
- Hacker News: search related items
- DeepL: translate EN β JA
- Slack: send bilingual notification
Requirements
- Marketstack API key
- DeepL API key
- Slack OAuth2 (bot token / channel permission)
Notes
- Edit the ticker in Get Stock Data.
- Adjust N (days) and k (sigma multiplier) in Calculate Deviation.
- Keep credentials out of HTTP nodes (use n8n Credentials).
π Nodes Used
Slack, Hacker News, DeepL, Marketstack, Schedule Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File