All sources
Finnhub Market News
Finance v1.0.0Financial news aggregated from major sources like Yahoo, Reuters, and CNBC via Finnhub
@codytseng #finance #news #market #stocks
Configuration
| Name | Key | Type | Required | Default | Description |
|---|---|---|---|---|---|
| API Token | FINNHUB_TOKEN | secret | Yes | — | Free API key from finnhub.io |
| News Category | CATEGORY | select | No | general | Category of financial news generalforexcryptomerger |
Source Code
version: 1.0.0
name: Finnhub Market News
description: Financial news aggregated from major sources like Yahoo, Reuters, and CNBC via Finnhub
author: codytseng
author_url: https://github.com/codytseng
category: Finance
tags:
- finance
- news
- market
- stocks
config:
- key: FINNHUB_TOKEN
name: API Token
type: secret
required: true
description: Free API key from finnhub.io
- key: CATEGORY
name: News Category
type: select
required: false
default: general
description: Category of financial news
options:
- general
- forex
- crypto
- merger version: 1.0.0
name: Finnhub Market News
description: Financial news aggregated from major sources like Yahoo, Reuters, and CNBC via Finnhub
author: codytseng
author_url: https://github.com/codytseng
category: Finance
tags:
- finance
- news
- market
- stocks
config:
- key: FINNHUB_TOKEN
name: API Token
type: secret
required: true
description: Free API key from finnhub.io
- key: CATEGORY
name: News Category
type: select
required: false
default: general
description: Category of financial news
options:
- general
- forex
- crypto
- merger module.exports = async (api) => {
const token = api.config.get("FINNHUB_TOKEN");
const category = api.config.get("CATEGORY") || "general";
async function fetchData() {
const res = await api.fetch(
`https://finnhub.io/api/v1/news?category=${category}&token=${token}`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch Finnhub news (HTTP ${res.status})`);
}
const items = res.json.map((article) => ({
id: String(article.id),
title: article.headline,
subtitle: article.summary,
url: article.url,
timestamp: article.datetime,
}));
api.emit(items);
}
await fetchData();
return {
refresh: fetchData,
};
}; module.exports = async (api) => {
const token = api.config.get("FINNHUB_TOKEN");
const category = api.config.get("CATEGORY") || "general";
async function fetchData() {
const res = await api.fetch(
`https://finnhub.io/api/v1/news?category=${category}&token=${token}`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch Finnhub news (HTTP ${res.status})`);
}
const items = res.json.map((article) => ({
id: String(article.id),
title: article.headline,
subtitle: article.summary,
url: article.url,
timestamp: article.datetime,
}));
api.emit(items);
}
await fetchData();
return {
refresh: fetchData,
};
}; Related Sources
CoinGecko Crypto Markets
FinanceTop cryptocurrencies by market cap from CoinGecko
#crypto #finance #markets
Stock Price Monitor
FinanceMonitor global stock prices in your menu bar. Displays real-time price, change amount, and change percentage. Powered by Finnhub (free API key required).
#stock #finance #market
华尔街见闻
Finance华尔街见闻 7x24 快讯
#finance #news #chinese #market
股价监控
Finance在菜单栏实时监控 A 股股价。 显示当前价格、涨跌额和涨跌幅。
#stock #finance #china #a-share