diff --git a/docs/en/finance.md b/docs/en/finance.md index 4c44be2efb..8ec85407c0 100644 --- a/docs/en/finance.md +++ b/docs/en/finance.md @@ -78,6 +78,12 @@ Language: +## Unusual Whales + +### News Flow + + + ## World Economic Forum ### Report diff --git a/docs/finance.md b/docs/finance.md index 8037345ed8..daa1705f4e 100644 --- a/docs/finance.md +++ b/docs/finance.md @@ -144,6 +144,12 @@ TokenInsight 官方亦有提供 RSS,可参考 +## Unusual Whales + +### News Flow + + + ## WEEX 华尔街见闻旗下全球投资线上品牌 ### 资讯 diff --git a/lib/v2/unusualwhales/maintainer.js b/lib/v2/unusualwhales/maintainer.js new file mode 100644 index 0000000000..f825877e0d --- /dev/null +++ b/lib/v2/unusualwhales/maintainer.js @@ -0,0 +1,3 @@ +module.exports = { + '/news': ['TonyRL'], +}; diff --git a/lib/v2/unusualwhales/news.js b/lib/v2/unusualwhales/news.js new file mode 100644 index 0000000000..dc99da15bb --- /dev/null +++ b/lib/v2/unusualwhales/news.js @@ -0,0 +1,24 @@ +const got = require('@/utils/got'); +const { parseDate } = require('@/utils/parse-date'); + +const apiBase = 'https://phx.unusualwhales.com'; + +module.exports = async (ctx) => { + const { data } = await got(`${apiBase}/api/fj_articles`); + + const items = data.map((item) => ({ + title: item.title, + description: item.description, + link: item.url, + pubDate: parseDate(item.publish_date), + })); + + ctx.state.data = { + title: 'Flow - News', + description: 'Explore unusual options, options flow, dark pools, short activity, and stock activity on unusualwhales.com. Unusual whales has a full news service available!', + link: 'https://unusualwhales.com/news-feed', + image: 'https://unusualwhales.com/android-icon-192x192.png', + language: 'en-US', + item: items, + }; +}; diff --git a/lib/v2/unusualwhales/radar.js b/lib/v2/unusualwhales/radar.js new file mode 100644 index 0000000000..37399f06df --- /dev/null +++ b/lib/v2/unusualwhales/radar.js @@ -0,0 +1,13 @@ +module.exports = { + 'unusualwhales.com': { + _name: 'Unusual Whales', + '.': [ + { + title: 'News Flow', + docs: 'https://docs.rsshub.app/en/finance.html#unusual-whales', + source: ['/news', '/'], + target: '/unusualwhales/news', + }, + ], + }, +}; diff --git a/lib/v2/unusualwhales/router.js b/lib/v2/unusualwhales/router.js new file mode 100644 index 0000000000..630036b8e4 --- /dev/null +++ b/lib/v2/unusualwhales/router.js @@ -0,0 +1,3 @@ +module.exports = (router) => { + router.get('/news', require('./news')); +};