finflow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Finflow — Chinese Financial Data CLI

Finflow — 中文金融数据CLI

Finflow (
@openduo/finflow
) aggregates real-time data from four Chinese financial platforms: CLS (财联社), Jin10 (金十), Xueqiu (雪球), and Gelonghui (格隆汇).
Finflow (
@openduo/finflow
) 聚合了来自中国四大金融平台的实时数据:CLS(财联社)、Jin10(金十)、Xueqiu(雪球)和Gelonghui(格隆汇)。

Core Principles

核心原则

  1. Run via Bash:
    finflow <command>
    — if not found, install first with
    npm install -g @openduo/finflow
  2. Stock code formats are flexible:
    sh600519
    ,
    SH600519
    ,
    600519
    all work — the CLI normalizes internally
  3. Global markets supported: A-shares (
    SH600519
    ), HK stocks (
    00700
    ,
    09988
    ), US stocks (
    AAPL
    ,
    NVDA
    ,
    .DJI
    )
  4. Default output is JSON with
    { data, meta }
    envelope. Use
    -f text
    only when the user wants human-readable tables. Use
    -f raw
    for debugging.
  1. 通过Bash运行
    finflow <command>
    — 若未找到,请先使用
    npm install -g @openduo/finflow
    安装
  2. 股票代码格式灵活
    sh600519
    SH600519
    600519
    均可正常使用 — CLI会在内部自动标准化格式
  3. 支持全球市场:A股(
    SH600519
    )、港股(
    00700
    09988
    )、美股(
    AAPL
    NVDA
    .DJI
  4. 默认输出为带
    { data, meta }
    包裹的JSON格式。仅当用户需要易读表格时使用
    -f text
    参数,调试时使用
    -f raw
    参数。

Global Options (apply to all commands)

全局选项(适用于所有命令)

FlagDefaultDescription
-n <num>
10
Number of items
-f json|text|raw
json
Output format
-h
Show help
参数默认值说明
-n <num>
10
条目数量
-f json|text|raw
json
输出格式
-h
显示帮助信息

Command Reference

命令参考

Stock Quotes —
quote

股票行情 —
quote

quote <code>
— Single stock quote (CLS)
quote batch <codes...>
— Batch quotes (Xueqiu). Auto-prefixes
SH
/
SZ
for 6-digit A-share codes. Supports HK/US stocks.
quote batch sh600519 sz000858        # A股
quote batch 00700 09988               # 港股(纯数字代码)
quote batch AAPL NVDA TSLA .DJI     # 美股
quote search <keyword>
— Search stocks (Xueqiu)
quote search 白酒
quote related <code>
— Related stocks (Xueqiu)
quote kline <code>
— K-line data
FlagAliasDefaultValuesDescription
--period
-p
d
d
w
m
y
5d
1m
5m
15m
30m
60m
120m
Period
--number
-n
120
numberNumber of candles
--src
auto
cls
xq
Data source
Source auto-selection: minute periods (
1m
5m
15m
30m
60m
120m
) auto-use xueqiu; daily+ default to cls. For US/HK stocks, always use
--src xq
.
quote 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>
— 5-level order book
FlagDefaultValuesDescription
--src
cls
cls
xq
Data source
quote ticks <code>
— Tick-by-tick trades. Options same as
depth
.
quote timeline <code>
— Intraday timeline. Options same as
depth
.
quote sector
— Sector/plate data
SubcommandArgsOptionsDescription
sector rank
-t <type>
(default:
industry
)
Plate ranking. Type:
industry
concept
sector plate <code>
codeStock's associated plates
sector industry <code>
codeIndustry info (xueqiu)
Default (no subcommand): with code →
plate
, without →
rank -t industry
.
quote <code>
— 单只股票行情(数据源:CLS)
quote batch <codes...>
— 批量查询股票行情(数据源:雪球)。会自动为6位A股代码添加
SH
/
SZ
前缀。支持港股/美股。
quote 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线数据
参数别名默认值可选值说明
--period
-p
d
d
w
m
y
5d
1m
5m
15m
30m
60m
120m
K线周期
--number
-n
120
数字K线蜡烛数量
--src
auto
cls
xq
数据源
数据源自动选择规则:分钟级周期(
1m
5m
15m
30m
60m
120m
)自动使用雪球;日线及以上周期默认使用CLS。对于港股/美股,请始终使用
--src xq
参数。
quote 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>
— 5档盘口数据
参数默认值可选值说明
--src
cls
cls
xq
数据源
quote ticks <code>
— 逐笔成交数据。参数选项与
depth
相同。
quote timeline <code>
— 日内分时数据。参数选项与
depth
相同。
quote sector
— 板块数据
子命令参数选项说明
sector rank
-t <type>
(默认值:
industry
板块排名。类型可选:
industry
(行业)
concept
(概念)
sector plate <code>
股票代码股票所属板块
sector industry <code>
股票代码行业信息(数据源:雪球)
默认规则(无子命令):若传入股票代码则执行
plate
,未传入则执行
rank -t industry

Capital Flow —
quote flow

资金流向 —
quote flow

SubcommandArgsOptionsSourceDescription
(default)codeclsPer-stock fund flow (main in/out, super/large/medium/small)
flow market
glhNorthbound/southbound capital
flow history <code>
code
-c <num>
(default: 20)
xqHistorical flow + 3d/5d/10d/20d net
flow margin <code>
codexqMargin trading data
flow intraday <code>
codexqIntraday capital flow
flow xq <code>
codexqXueqiu capital flow
Default without code → shows market flow (same as
flow market
).
子命令参数选项数据源说明
默认股票代码CLS单只股票资金流向(主力净流入/流出、超大/大/中/单资金)
flow market
格隆汇北向/南向资金流向
flow history <code>
股票代码
-c <num>
(默认值:20)
雪球历史资金流向 + 3日/5日/10日/20日净额
flow margin <code>
股票代码雪球融资融券数据
flow intraday <code>
股票代码雪球日内资金流向
flow xq <code>
股票代码雪球雪球资金流向数据
默认规则(无股票代码):显示市场资金流向(与
flow market
效果相同)。

Fundamentals —
quote f10
/
quote finance

基本面数据 —
quote f10
/
quote finance

quote f10
subcommands (all require xueqiu login):
SubcommandDescription
f10 indicator <code>
Key indicators: ROE, EPS, gross margin, revenue growth
f10 holders <code>
Top 10 shareholders
f10 bonus <code>
Dividend history (up to 15 items)
f10 event <code>
Corporate events (up to 20 items)
quote finance <code>
— Financial statements (xueqiu login):
FlagAliasDefaultValuesDescription
--type
-t
indicator
indicator
cashflow
income
balance
Report type
TypeContent
indicator
ROE, EPS, gross margin, revenue YoY
income
Revenue, net profit, attributable net profit
balance
Total assets, liabilities, debt ratio, equity
cashflow
Operating, investing, financing, net increase
quote f10
子命令(均需雪球登录):
子命令说明
f10 indicator <code>
关键指标:ROE、EPS、毛利率、营收增长率
f10 holders <code>
十大股东
f10 bonus <code>
分红历史(最多15条)
f10 event <code>
公司事件(最多20条)
quote finance <code>
— 财务报表(需雪球登录):
参数别名默认值可选值说明
--type
-t
indicator
indicator
cashflow
income
balance
报表类型
类型内容
indicator
ROE、EPS、毛利率、营收同比增长率
income
营业收入、净利润、归属母公司净利润
balance
总资产、负债、资产负债率、净资产
cashflow
经营活动现金流、投资活动现金流、筹资活动现金流、现金净增加额

News & Flash —
info

资讯与快讯 —
info

info flash
— Flash/breaking news
FlagAliasDefaultValuesDescription
--src
-s
cls
cls
jin10
glh
Data source
--category
-c
variesvaries by sourceCategory/channel filter
CLS categories (
-s cls
):
all
red
announcement
watch
hk_us
fund
remind
GLH categories (
-s glh
):
all
popular
AStock
HKStock
USStock
fundLive
ai
international
chineseMainland
hongkongMacaoTaiwan
virtualAssets
exchangeCommodity
house
debenture
SubcommandArgsExtra OptionsNotes
flash important
--channel <glh_channel>
Important news (glh)
flash popular
Popular flash (glh)
flash detail <id>
idFlash detail (jin10, tries browser cookie)
flash date <date>
dateHistorical flash (jin10, requires login)
flash live [channel]
channel
--interval <sec>
(default: 10)
Real-time monitoring (glh, infinite loop)
info news
— Articles
SubcommandArgsDescription
(default)CLS headline news
news depth [channel]
channelCLS deep articles. Channels:
headline
ashare
world
company
realestate
finance_ch
hkstock
fund
broker
auto
tech
pinjian
news slide
Important events slideshow (jin10)
news feature
Featured articles (jin10)
news hot
Hot articles ranking (cls)
news stock <code>
codePer-stock news (cls)
info report <code>
— Institutional research reports (xueqiu, requires login)
info topic
— Topics
SubcommandArgsDescription
(default)List all topics (jin10)
topic search <keyword>
keywordSearch topics
topic groups
Topic category groups
topic hot
Hot CLS subjects
topic show <id>
idArticles in topic (jin10, tries browser cookie)
info flash
— 财经快讯/突发新闻
参数别名默认值可选值说明
--src
-s
cls
cls
jin10
glh
数据源
--category
-c
随数据源变化随数据源变化分类/频道筛选
CLS分类(
-s cls
):
all
(全部)
red
(红条)
announcement
(公告)
watch
(关注)
hk_us
(港股美股)
fund
(基金)
remind
(提醒) 格隆汇分类(
-s glh
):
all
(全部)
popular
(热门)
AStock
(A股)
HKStock
(港股)
USStock
(美股)
fundLive
(基金直播)
ai
(AI)
international
(国际)
chineseMainland
(中国大陆)
hongkongMacaoTaiwan
(港澳台)
virtualAssets
(虚拟资产)
exchangeCommodity
(商品交易所)
house
(房产)
debenture
(债券)
子命令参数额外选项说明
flash important
--channel <glh_channel>
重要新闻(数据源:格隆汇)
flash popular
热门快讯(数据源:格隆汇)
flash detail <id>
新闻ID快讯详情(数据源:金十,尝试读取浏览器Cookie)
flash date <date>
日期历史快讯(数据源:金十,需登录
flash live [channel]
频道
--interval <sec>
(默认值:10)
实时监控(数据源:格隆汇,无限循环)
info news
— 财经文章
子命令参数说明
默认财联社头条新闻
news depth [channel]
频道财联社深度文章。可选频道:
headline
(头条)
ashare
(A股)
world
(环球)
company
(公司)
realestate
(地产)
finance_ch
(国内财经)
hkstock
(港股)
fund
(基金)
broker
(券商)
auto
(汽车)
tech
(科技)
pinjian
(品见)
news slide
重要事件幻灯片(数据源:金十)
news feature
专题文章(数据源:金十)
news hot
热门文章排行(数据源:财联社)
news stock <code>
股票代码个股新闻(数据源:财联社)
info report <code>
— 机构研报(数据源:雪球,需登录
info topic
— 话题
子命令参数说明
默认列出所有话题(数据源:金十)
topic search <keyword>
关键词搜索话题
topic groups
话题分类组
topic hot
财联社热门话题
topic show <id>
话题ID话题下的文章(数据源:金十,尝试读取浏览器Cookie)

Market Overview —
market

市场概览 —
market

SubcommandArgs/OptionsSourceDescription
(default)glhMajor indices + Shanghai/Shenzhen capital flow
market emotion
clsMarket sentiment: limit-up/down, seal rate, turnover, distribution
market rank [type]
type:
change
volume
amount
turnover
amplitude
(default:
change
)
clsStock ranking
market index
glhMajor market indices
market hk [sort]
sort:
netChange
turnoverValue
turnVolume
(default:
netChange
).
-o asc|desc
(default:
desc
)
glhHK stock ranking
market flow
glhNorthbound/southbound capital flow
market rates
jin10Global central bank interest rates
子命令参数/选项数据源说明
默认格隆汇主要指数 + 沪深资金流向
market emotion
财联社市场情绪:涨跌停家数、封板率、换手率、涨跌幅分布
market rank [type]
类型:
change
(涨跌幅)
volume
(成交量)
amount
(成交额)
turnover
(换手率)
amplitude
(振幅)(默认值:
change
财联社股票排行
market index
格隆汇主要市场指数
market hk [sort]
排序方式:
netChange
(涨跌幅)
turnoverValue
(成交额)
turnVolume
(成交量)(默认值:
netChange
)。
-o asc|desc
(默认值:
desc
格隆汇港股排行
market flow
格隆汇北向/南向资金流向
market rates
金十全球央行利率

Macro Calendar —
calendar

宏观日历 —
calendar

All subcommands accept an optional
<date>
argument (defaults to today).
SubcommandSourceDescription
calendar invest [date]
clsA-share investment calendar
calendar macro [date]
jin10Global macro data releases
calendar event [date]
jin10Macro events (speeches, decisions)
calendar holiday [date]
jin10Global holidays
calendar ashare
jin10 (WS)A-share major events
calendar hk [date]
jin10 (WS)HK stock data calendar
calendar us [date]
jin10 (WS)US stock data calendar
calendar future-event [date]
jin10Futures calendar events
calendar future-holiday [date]
jin10Futures calendar holidays
All dates default to today, format:
YYYY-MM-DD
.
Default (no subcommand): same as
calendar invest
with today.
所有子命令均接受可选的
<date>
参数(默认值为今日)。
子命令数据源说明
calendar invest [date]
财联社A股投资日历
calendar macro [date]
金十全球宏观数据发布
calendar event [date]
金十宏观事件(演讲、决策)
calendar holiday [date]
金十全球节假日
calendar ashare
金十(WS)A股重大事件
calendar hk [date]
金十(WS)港股数据日历
calendar us [date]
金十(WS)美股数据日历
calendar future-event [date]
金十期货日历事件
calendar future-holiday [date]
金十期货日历节假日
所有日期默认值为今日,格式:
YYYY-MM-DD
默认规则(无子命令):与
calendar invest
今日数据效果相同。

Futures —
future

期货 —
future

Top-level
--channel
/
-c
applies to all subcommands:
ChannelDescription
all
全部 (default)
oil
原油
steel
钢铁
coal
煤炭
gas
天然气
metal
金属
nonferrous
有色金属
chemical
化工
sugar
白糖
grain
粮食
pig
生猪
macro
宏观
SubcommandDescription
(default)Futures flash news (paginated)
future headline
Futures headlines
future basis [date]
Spot-futures basis.
-g <group>
:
黑色系
金属
农产品
能源化工
金融
future calendar [date]
Futures data calendar
future event [date]
Futures calendar events
future holiday [date]
Futures calendar holidays
顶级参数
--channel
/
-c
适用于所有子命令:
频道说明
all
全部(默认值)
oil
原油
steel
钢铁
coal
煤炭
gas
天然气
metal
金属
nonferrous
有色金属
chemical
化工
sugar
白糖
grain
粮食
pig
生猪
macro
宏观
子命令说明
默认期货快讯(分页)
future headline
期货头条
future basis [date]
期现基差。
-g <group>
可选:
黑色系
金属
农产品
能源化工
金融
future calendar [date]
期货数据日历
future event [date]
期货日历事件
future holiday [date]
期货日历节假日

Portfolio —
portfolio
(requires xueqiu login)

投资组合 —
portfolio
(需雪球登录)

SubcommandArgsOptionsDescription
(default)List all groups (stocks/cubes/funds)
portfolio stocks <pid>
pid:
-1
=all,
-5
=沪深
View stocks with live quotes
portfolio stocks add <symbol>
symbol
-c <gid>
(default: 1)
Add stock to group
portfolio stocks remove <symbol>
symbol
-c <gid>
(default: 1)
Remove stock from group
portfolio cube <code>
codeCube NAV trend (up to 20)
portfolio cube holding <code>
codeCube holdings with weight/price
子命令参数选项说明
默认列出所有分组(股票/组合/基金)
portfolio stocks <pid>
pid:
-1
=全部,
-5
=沪深
查看带实时行情的股票
portfolio stocks add <symbol>
股票代码
-c <gid>
(默认值:1)
添加股票到分组
portfolio stocks remove <symbol>
股票代码
-c <gid>
(默认值:1)
从分组移除股票
portfolio cube <code>
组合代码组合净值走势(最多20条)
portfolio cube holding <code>
组合代码组合持仓(含权重/价格)

Config —
config

配置 —
config

SubcommandArgsDescription
config cookie [value]
valueSet/show xueqiu cookie. Without value: shows masked current cookie
config login
Auto-extract from macOS Chrome (Keychain + AES-128-CBC)
子命令参数说明
config cookie [value]
Cookie值设置/查看雪球Cookie。无参数时:显示掩码后的当前Cookie
config login
自动从macOS Chrome提取(钥匙串 + AES-128-CBC)

Cookie Requirements

Cookie要求

Most commands work without login. These require xueqiu cookie (
finflow config login
):
  • quote f10
    ,
    quote finance
    ,
    quote flow history/margin/intraday/xq
  • portfolio
    (all subcommands),
    info report
  • quote depth/timeline --src xq
    ,
    quote kline --src xq
Jin10 commands (
info flash detail
,
info flash date
,
info topic show
,
calendar macro/event/holiday
) try browser cookie automatically, work without it but with less data.
大多数命令无需登录即可使用。以下命令需要雪球Cookie(使用
finflow config login
获取):
  • quote f10
    quote finance
    quote flow history/margin/intraday/xq
  • portfolio
    (所有子命令)、
    info report
  • quote depth/timeline --src xq
    quote kline --src xq
金十相关命令(
info flash detail
info flash date
info topic show
calendar macro/event/holiday
)会自动尝试读取浏览器Cookie,无需登录也可使用,但数据量可能减少。

Data Interpretation Tips

数据解读提示

  • meta.source
    tells you which platform the data came from — useful context for freshness
  • CLS flash is fastest for A-share breaking news
  • market emotion
    shows limit-up/down counts, seal rates — key sentiment indicators
  • quote flow market
    shows northbound (沪港通/深港通) capital — important for A-share trend
  • 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
    显示涨跌停家数、封板率 — 是关键的情绪指标
  • quote flow market
    显示北向(沪港通/深港通)资金 — 对A股趋势判断至关重要
  • 非交易时段:部分命令会返回空数据(如情绪、分时数据)
  • 使用金十数据源的CLS快讯 会自动分页最多50页(
    -n
    值较大时速度较慢)

Common Workflows

常见工作流

"茅台现在多少钱?"
quote sh600519
"帮我看看今天大盘怎么样"
market emotion
+
market index
"今天有什么财经新闻"
info flash -n 20
"美股那边有什么重要新闻"
info flash -s glh -c USStock
"白酒板块怎么样"
quote sector rank -t concept
(filter by name for 白酒) "北向资金今天流入多少"
quote flow market
"帮我看看贵州茅台的财务数据"
quote f10 indicator sh600519
+
quote finance sh600519 -t income
"今天有什么宏观事件"
calendar macro
"今晚美国有什么CPI数据"
calendar macro 2026-04-10
(filter by country=美国) "期货方面有什么消息"
future headline
or
future -c oil
"最近的原油期现基差"
future basis -g 能源化工
"今天涨停板排行"
market rank change
"港股成交额排行"
market hk turnoverValue
"茅台现在多少钱?"
quote sh600519
"帮我看看今天大盘怎么样"
market emotion
+
market index
"今天有什么财经新闻"
info flash -n 20
"美股那边有什么重要新闻"
info flash -s glh -c USStock
"白酒板块怎么样"
quote sector rank -t concept
(筛选名称为白酒的板块) "北向资金今天流入多少"
quote flow market
"帮我看看贵州茅台的财务数据"
quote f10 indicator sh600519
+
quote finance sh600519 -t income
"今天有什么宏观事件"
calendar macro
"今晚美国有什么CPI数据"
calendar macro 2026-04-10
(筛选国家为美国) "期货方面有什么消息"
future headline
future -c oil
"最近的原油期现基差"
future basis -g 能源化工
"今天涨停板排行"
market rank change
"港股成交额排行"
market hk turnoverValue