finflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFinflow — Chinese Financial Data CLI
Finflow — 中文金融数据CLI
Finflow () aggregates real-time data from four Chinese financial platforms: CLS (财联社), Jin10 (金十), Xueqiu (雪球), and Gelonghui (格隆汇).
@openduo/finflowFinflow () 聚合了来自中国四大金融平台的实时数据:CLS(财联社)、Jin10(金十)、Xueqiu(雪球)和Gelonghui(格隆汇)。
@openduo/finflowCore Principles
核心原则
- Run via Bash: — if not found, install first with
finflow <command>npm install -g @openduo/finflow - Stock code formats are flexible: ,
sh600519,SH600519all work — the CLI normalizes internally600519 - Global markets supported: A-shares (), HK stocks (
SH600519,00700), US stocks (09988,AAPL,NVDA).DJI - Default output is JSON with envelope. Use
{ data, meta }only when the user wants human-readable tables. Use-f textfor debugging.-f raw
- 通过Bash运行:— 若未找到,请先使用
finflow <command>安装npm install -g @openduo/finflow - 股票代码格式灵活:、
sh600519、SH600519均可正常使用 — CLI会在内部自动标准化格式600519 - 支持全球市场:A股()、港股(
SH600519、00700)、美股(09988、AAPL、NVDA).DJI - 默认输出为带包裹的JSON格式。仅当用户需要易读表格时使用
{ data, meta }参数,调试时使用-f text参数。-f raw
Global Options (apply to all commands)
全局选项(适用于所有命令)
| Flag | Default | Description |
|---|---|---|
| | Number of items |
| | Output format |
| — | Show help |
| 参数 | 默认值 | 说明 |
|---|---|---|
| | 条目数量 |
| | 输出格式 |
| — | 显示帮助信息 |
Command Reference
命令参考
Stock Quotes — quote
quote股票行情 — quote
quotequote <code>quote batch <codes...>SHSZquote batch sh600519 sz000858 # A股
quote batch 00700 09988 # 港股(纯数字代码)
quote batch AAPL NVDA TSLA .DJI # 美股quote search <keyword>quote search 白酒quote related <code>quote kline <code>| Flag | Alias | Default | Values | Description |
|---|---|---|---|---|
| | | | Period |
| | | number | Number of candles |
| — | auto | | Data source |
Source auto-selection: minute periods ( ) auto-use xueqiu; daily+ default to cls. For US/HK stocks, always use .
1m5m15m30m60m120m--src xqquote kline sh600519 -p d -n 120 # 日K 120根 (cls)
quote kline sh600519 -p 5m -n 48 # 5分钟K线 (xueqiu, auto)
quote kline sh600519 -p w # 周K (cls)
quote kline sh600519 -p d --src xq # 强制用雪球quote depth <code>| Flag | Default | Values | Description |
|---|---|---|---|
| | | Data source |
quote ticks <code>depthquote timeline <code>depthquote sector| Subcommand | Args | Options | Description |
|---|---|---|---|
| — | | Plate ranking. Type: |
| code | — | Stock's associated plates |
| code | — | Industry info (xueqiu) |
Default (no subcommand): with code → , without → .
platerank -t industryquote <code>quote batch <codes...>SHSZquote batch sh600519 sz000858 # A股
quote batch 00700 09988 # 港股(纯数字代码)
quote batch AAPL NVDA TSLA .DJI # 美股quote search <keyword>quote search 白酒quote related <code>quote kline <code>| 参数 | 别名 | 默认值 | 可选值 | 说明 |
|---|---|---|---|---|
| | | | K线周期 |
| | | 数字 | K线蜡烛数量 |
| — | auto | | 数据源 |
数据源自动选择规则:分钟级周期( )自动使用雪球;日线及以上周期默认使用CLS。对于港股/美股,请始终使用参数。
1m5m15m30m60m120m--src xqquote kline sh600519 -p d -n 120 # 日K 120根 (CLS)
quote kline sh600519 -p 5m -n 48 # 5分钟K线 (雪球,自动选择)
quote kline sh600519 -p w # 周K (CLS)
quote kline sh600519 -p d --src xq # 强制使用雪球数据源quote depth <code>| 参数 | 默认值 | 可选值 | 说明 |
|---|---|---|---|
| | | 数据源 |
quote ticks <code>depthquote timeline <code>depthquote sector| 子命令 | 参数 | 选项 | 说明 |
|---|---|---|---|
| — | | 板块排名。类型可选: |
| 股票代码 | — | 股票所属板块 |
| 股票代码 | — | 行业信息(数据源:雪球) |
默认规则(无子命令):若传入股票代码则执行,未传入则执行。
platerank -t industryCapital Flow — quote flow
quote flow资金流向 — quote flow
quote flow| Subcommand | Args | Options | Source | Description |
|---|---|---|---|---|
| (default) | code | — | cls | Per-stock fund flow (main in/out, super/large/medium/small) |
| — | — | glh | Northbound/southbound capital |
| code | | xq | Historical flow + 3d/5d/10d/20d net |
| code | — | xq | Margin trading data |
| code | — | xq | Intraday capital flow |
| code | — | xq | Xueqiu capital flow |
Default without code → shows market flow (same as ).
flow market| 子命令 | 参数 | 选项 | 数据源 | 说明 |
|---|---|---|---|---|
| 默认 | 股票代码 | — | CLS | 单只股票资金流向(主力净流入/流出、超大/大/中/单资金) |
| — | — | 格隆汇 | 北向/南向资金流向 |
| 股票代码 | | 雪球 | 历史资金流向 + 3日/5日/10日/20日净额 |
| 股票代码 | — | 雪球 | 融资融券数据 |
| 股票代码 | — | 雪球 | 日内资金流向 |
| 股票代码 | — | 雪球 | 雪球资金流向数据 |
默认规则(无股票代码):显示市场资金流向(与效果相同)。
flow marketFundamentals — quote f10
/ quote finance
quote f10quote finance基本面数据 — quote f10
/ quote finance
quote f10quote financequote f10| Subcommand | Description |
|---|---|
| Key indicators: ROE, EPS, gross margin, revenue growth |
| Top 10 shareholders |
| Dividend history (up to 15 items) |
| Corporate events (up to 20 items) |
quote finance <code>| Flag | Alias | Default | Values | Description |
|---|---|---|---|---|
| | | | Report type |
| Type | Content |
|---|---|
| ROE, EPS, gross margin, revenue YoY |
| Revenue, net profit, attributable net profit |
| Total assets, liabilities, debt ratio, equity |
| Operating, investing, financing, net increase |
quote f10| 子命令 | 说明 |
|---|---|
| 关键指标:ROE、EPS、毛利率、营收增长率 |
| 十大股东 |
| 分红历史(最多15条) |
| 公司事件(最多20条) |
quote finance <code>| 参数 | 别名 | 默认值 | 可选值 | 说明 |
|---|---|---|---|---|
| | | | 报表类型 |
| 类型 | 内容 |
|---|---|
| ROE、EPS、毛利率、营收同比增长率 |
| 营业收入、净利润、归属母公司净利润 |
| 总资产、负债、资产负债率、净资产 |
| 经营活动现金流、投资活动现金流、筹资活动现金流、现金净增加额 |
News & Flash — info
info资讯与快讯 — info
infoinfo flash| Flag | Alias | Default | Values | Description |
|---|---|---|---|---|
| | | | Data source |
| | varies | varies by source | Category/channel filter |
CLS categories ():
GLH categories ():
-s clsallredannouncementwatchhk_usfundremind-s glhallpopularAStockHKStockUSStockfundLiveaiinternationalchineseMainlandhongkongMacaoTaiwanvirtualAssetsexchangeCommodityhousedebenture| Subcommand | Args | Extra Options | Notes |
|---|---|---|---|
| — | | Important news (glh) |
| — | — | Popular flash (glh) |
| id | — | Flash detail (jin10, tries browser cookie) |
| date | — | Historical flash (jin10, requires login) |
| channel | | Real-time monitoring (glh, infinite loop) |
info news| Subcommand | Args | Description |
|---|---|---|
| (default) | — | CLS headline news |
| channel | CLS deep articles. Channels: |
| — | Important events slideshow (jin10) |
| — | Featured articles (jin10) |
| — | Hot articles ranking (cls) |
| code | Per-stock news (cls) |
info report <code>info topic| Subcommand | Args | Description |
|---|---|---|
| (default) | — | List all topics (jin10) |
| keyword | Search topics |
| — | Topic category groups |
| — | Hot CLS subjects |
| id | Articles in topic (jin10, tries browser cookie) |
info flash| 参数 | 别名 | 默认值 | 可选值 | 说明 |
|---|---|---|---|---|
| | | | 数据源 |
| | 随数据源变化 | 随数据源变化 | 分类/频道筛选 |
CLS分类():(全部)(红条)(公告)(关注)(港股美股)(基金)(提醒)
格隆汇分类():(全部)(热门)(A股)(港股)(美股)(基金直播)(AI)(国际)(中国大陆)(港澳台)(虚拟资产)(商品交易所)(房产)(债券)
-s clsallredannouncementwatchhk_usfundremind-s glhallpopularAStockHKStockUSStockfundLiveaiinternationalchineseMainlandhongkongMacaoTaiwanvirtualAssetsexchangeCommodityhousedebenture| 子命令 | 参数 | 额外选项 | 说明 |
|---|---|---|---|
| — | | 重要新闻(数据源:格隆汇) |
| — | — | 热门快讯(数据源:格隆汇) |
| 新闻ID | — | 快讯详情(数据源:金十,尝试读取浏览器Cookie) |
| 日期 | — | 历史快讯(数据源:金十,需登录) |
| 频道 | | 实时监控(数据源:格隆汇,无限循环) |
info news| 子命令 | 参数 | 说明 |
|---|---|---|
| 默认 | — | 财联社头条新闻 |
| 频道 | 财联社深度文章。可选频道: |
| — | 重要事件幻灯片(数据源:金十) |
| — | 专题文章(数据源:金十) |
| — | 热门文章排行(数据源:财联社) |
| 股票代码 | 个股新闻(数据源:财联社) |
info report <code>info topic| 子命令 | 参数 | 说明 |
|---|---|---|
| 默认 | — | 列出所有话题(数据源:金十) |
| 关键词 | 搜索话题 |
| — | 话题分类组 |
| — | 财联社热门话题 |
| 话题ID | 话题下的文章(数据源:金十,尝试读取浏览器Cookie) |
Market Overview — market
market市场概览 — market
market| Subcommand | Args/Options | Source | Description |
|---|---|---|---|
| (default) | — | glh | Major indices + Shanghai/Shenzhen capital flow |
| — | cls | Market sentiment: limit-up/down, seal rate, turnover, distribution |
| type: | cls | Stock ranking |
| — | glh | Major market indices |
| sort: | glh | HK stock ranking |
| — | glh | Northbound/southbound capital flow |
| — | jin10 | Global central bank interest rates |
| 子命令 | 参数/选项 | 数据源 | 说明 |
|---|---|---|---|
| 默认 | — | 格隆汇 | 主要指数 + 沪深资金流向 |
| — | 财联社 | 市场情绪:涨跌停家数、封板率、换手率、涨跌幅分布 |
| 类型: | 财联社 | 股票排行 |
| — | 格隆汇 | 主要市场指数 |
| 排序方式: | 格隆汇 | 港股排行 |
| — | 格隆汇 | 北向/南向资金流向 |
| — | 金十 | 全球央行利率 |
Macro Calendar — calendar
calendar宏观日历 — calendar
calendarAll subcommands accept an optional argument (defaults to today).
<date>| Subcommand | Source | Description |
|---|---|---|
| cls | A-share investment calendar |
| jin10 | Global macro data releases |
| jin10 | Macro events (speeches, decisions) |
| jin10 | Global holidays |
| jin10 (WS) | A-share major events |
| jin10 (WS) | HK stock data calendar |
| jin10 (WS) | US stock data calendar |
| jin10 | Futures calendar events |
| jin10 | Futures calendar holidays |
All dates default to today, format: .
YYYY-MM-DDDefault (no subcommand): same as with today.
calendar invest所有子命令均接受可选的参数(默认值为今日)。
<date>| 子命令 | 数据源 | 说明 |
|---|---|---|
| 财联社 | A股投资日历 |
| 金十 | 全球宏观数据发布 |
| 金十 | 宏观事件(演讲、决策) |
| 金十 | 全球节假日 |
| 金十(WS) | A股重大事件 |
| 金十(WS) | 港股数据日历 |
| 金十(WS) | 美股数据日历 |
| 金十 | 期货日历事件 |
| 金十 | 期货日历节假日 |
所有日期默认值为今日,格式:。
YYYY-MM-DD默认规则(无子命令):与今日数据效果相同。
calendar investFutures — future
future期货 — future
futureTop-level / applies to all subcommands:
--channel-c| Channel | Description |
|---|---|
| 全部 (default) |
| 原油 |
| 钢铁 |
| 煤炭 |
| 天然气 |
| 金属 |
| 有色金属 |
| 化工 |
| 白糖 |
| 粮食 |
| 生猪 |
| 宏观 |
| Subcommand | Description |
|---|---|
| (default) | Futures flash news (paginated) |
| Futures headlines |
| Spot-futures basis. |
| Futures data calendar |
| Futures calendar events |
| Futures calendar holidays |
顶级参数 / 适用于所有子命令:
--channel-c| 频道 | 说明 |
|---|---|
| 全部(默认值) |
| 原油 |
| 钢铁 |
| 煤炭 |
| 天然气 |
| 金属 |
| 有色金属 |
| 化工 |
| 白糖 |
| 粮食 |
| 生猪 |
| 宏观 |
| 子命令 | 说明 |
|---|---|
| 默认 | 期货快讯(分页) |
| 期货头条 |
| 期现基差。 |
| 期货数据日历 |
| 期货日历事件 |
| 期货日历节假日 |
Portfolio — portfolio
(requires xueqiu login)
portfolio投资组合 — portfolio
(需雪球登录)
portfolio| Subcommand | Args | Options | Description |
|---|---|---|---|
| (default) | — | — | List all groups (stocks/cubes/funds) |
| pid: | — | View stocks with live quotes |
| symbol | | Add stock to group |
| symbol | | Remove stock from group |
| code | — | Cube NAV trend (up to 20) |
| code | — | Cube holdings with weight/price |
| 子命令 | 参数 | 选项 | 说明 |
|---|---|---|---|
| 默认 | — | — | 列出所有分组(股票/组合/基金) |
| pid: | — | 查看带实时行情的股票 |
| 股票代码 | | 添加股票到分组 |
| 股票代码 | | 从分组移除股票 |
| 组合代码 | — | 组合净值走势(最多20条) |
| 组合代码 | — | 组合持仓(含权重/价格) |
Config — config
config配置 — config
config| Subcommand | Args | Description |
|---|---|---|
| value | Set/show xueqiu cookie. Without value: shows masked current cookie |
| — | Auto-extract from macOS Chrome (Keychain + AES-128-CBC) |
| 子命令 | 参数 | 说明 |
|---|---|---|
| Cookie值 | 设置/查看雪球Cookie。无参数时:显示掩码后的当前Cookie |
| — | 自动从macOS Chrome提取(钥匙串 + AES-128-CBC) |
Cookie Requirements
Cookie要求
Most commands work without login. These require xueqiu cookie ():
finflow config login- ,
quote f10,quote financequote flow history/margin/intraday/xq - (all subcommands),
portfolioinfo report - ,
quote depth/timeline --src xqquote kline --src xq
Jin10 commands (, , , ) try browser cookie automatically, work without it but with less data.
info flash detailinfo flash dateinfo topic showcalendar macro/event/holiday大多数命令无需登录即可使用。以下命令需要雪球Cookie(使用获取):
finflow config login- 、
quote f10、quote financequote flow history/margin/intraday/xq - (所有子命令)、
portfolioinfo report - 、
quote depth/timeline --src xqquote kline --src xq
金十相关命令(、、、)会自动尝试读取浏览器Cookie,无需登录也可使用,但数据量可能减少。
info flash detailinfo flash dateinfo topic showcalendar macro/event/holidayData Interpretation Tips
数据解读提示
- tells you which platform the data came from — useful context for freshness
meta.source - CLS flash is fastest for A-share breaking news
- shows limit-up/down counts, seal rates — key sentiment indicators
market emotion - shows northbound (沪港通/深港通) capital — important for A-share trend
quote flow market - Non-trading hours: some commands return empty data (emotion, timeline)
- CLS flash with jin10 source auto-paginates up to 50 pages (slow for large )
-n
- 会告知数据来自哪个平台 — 有助于判断数据新鲜度
meta.source - CLS快讯 是A股突发新闻最快的数据源
- 显示涨跌停家数、封板率 — 是关键的情绪指标
market emotion - 显示北向(沪港通/深港通)资金 — 对A股趋势判断至关重要
quote flow market - 非交易时段:部分命令会返回空数据(如情绪、分时数据)
- 使用金十数据源的CLS快讯 会自动分页最多50页(值较大时速度较慢)
-n
Common Workflows
常见工作流
"茅台现在多少钱?" →
"帮我看看今天大盘怎么样" → +
"今天有什么财经新闻" →
"美股那边有什么重要新闻" →
"白酒板块怎么样" → (filter by name for 白酒)
"北向资金今天流入多少" →
"帮我看看贵州茅台的财务数据" → +
"今天有什么宏观事件" →
"今晚美国有什么CPI数据" → (filter by country=美国)
"期货方面有什么消息" → or
"最近的原油期现基差" →
"今天涨停板排行" →
"港股成交额排行" →
quote sh600519market emotionmarket indexinfo flash -n 20info flash -s glh -c USStockquote sector rank -t conceptquote flow marketquote f10 indicator sh600519quote finance sh600519 -t incomecalendar macrocalendar macro 2026-04-10future headlinefuture -c oilfuture basis -g 能源化工market rank changemarket hk turnoverValue"茅台现在多少钱?" →
"帮我看看今天大盘怎么样" → +
"今天有什么财经新闻" →
"美股那边有什么重要新闻" →
"白酒板块怎么样" → (筛选名称为白酒的板块)
"北向资金今天流入多少" →
"帮我看看贵州茅台的财务数据" → +
"今天有什么宏观事件" →
"今晚美国有什么CPI数据" → (筛选国家为美国)
"期货方面有什么消息" → 或
"最近的原油期现基差" →
"今天涨停板排行" →
"港股成交额排行" →
quote sh600519market emotionmarket indexinfo flash -n 20info flash -s glh -c USStockquote sector rank -t conceptquote flow marketquote f10 indicator sh600519quote finance sh600519 -t incomecalendar macrocalendar macro 2026-04-10future headlinefuture -c oilfuture basis -g 能源化工market rank changemarket hk turnoverValue