Finflow (@openduo/finflow) aggregates real-time data from four Chinese platforms — CLS (Cailian Press), Jin10 (Jinshi Data), Xueqiu (Snowball), Gelonghui — with Yahoo Finance as a fallback for markets they don't cover (Japan/Korea/HK/US). Cover A-shares, HK, US stocks, futures, commodities, forex, global indices, macro & flash news.
Core principles
- Run via Bash:
finflow <command>— install first if missing:npm install -g @openduo/finflow. - Stock codes are flexible:
sh600519,SH600519,600519all work — the CLI normalizes internally. - Markets: A-shares (
SH600519), HK (00700), US (AAPL,NVDA,.DJI). JP/KR and Yahoo-only symbols fall back to Yahoo. - Output is always one compact JSON line —
{"data": {...}, "meta": {"source", "timestamp", "command"}}. Parse it (pipe tojqor python). - Percent fields are percentage numbers, not ratios:
changePercent: -4.34means -4.34% (NOT -0.0434 or -434%). This holds for every percent-named field across every command —changePercent,percent,turnoverRate,amplitude,pe,pb,dividendYield, etc. Display them verbatim with a%; never ×/÷ 100. (changeis the absolute price delta — a different field.) - Name → code first: if a company is named without a code (Moutai/CATL/Tencent), run
quote search <名字>to get the code before quoting. Never guess a code from a name.
The golden rule: classify the question, then pick ONE command
Almost every market question maps to a single finflow command that pulls the whole picture at once. The #1 source of bad answers is reconstructing data from memory — listing "半导体/AI/白酒" tickers by hand, guessing an index code, etc. Before running anything, classify what the user is actually asking (which kind of sector? per-stock or market-wide flow? snapshot or multi-period?), then pick from the tables below. The data is one command away.
❌→✅ Anti-patterns (do not do these)
| ❌ Wrong instinct | ✅ Right command |
|---|---|
| "What stocks are in 半导体/白酒/AI" → enumerate tickers from memory, quote each | Classify the 板块 type (table below), pull it in one go: quote industry / sector stocks / quote board |
"How's the market / what's the Shanghai Composite at" → guess sh000001 and quote it |
market returns all major indices + Shanghai-Shenzhen capital flow directly (use market index for indices only) |
"AI / Huawei / SOE reform concept stocks" → quote industry (industries, not themes) |
Concepts are themes, not industries: reverse-lookup the cls plate code via sector plate <一只已知成分股> → sector <码>(sector rank -t concept only liststoday's hotconcept, usually does not include the one you want) |
Turn a name "Moutai" into a code via info search (that searches news) |
Name→code uses quote search; news/article search uses info search |
Want "latest fundamentals" → quote finance (multi-period statements, not a fresh snapshot) |
Latest single-period snapshot (PE/PB/ROE/market cap) → quote f10 indicator; multi-period reports → quote finance -t … |
A stock spiked, want its same-industry peers → quote related <code> (one cmd) |
Same-concept-plate members → sector plate <code> then sector <plate> (one step via smart default) |
"Northbound capital / main-force capital flow" → quote flow <某只股票> (that's per-stock) |
Market north/south capital → quote flow market (or market flow); per-stock main fund → quote flow <code> |
"sector / industry / concept / market" — four meanings, four commands
Chinese "板块" (sector) is overloaded. The single word that causes the most misuse. Match the user's word to its real meaning first:
| The word the user says | Actual meaning | How to tell | Command |
|---|---|---|---|
| Industry: semiconductors / baijiu / pharmaceuticals / banking / securities / new energy vehicles / steel | Shenwan / GICS / Hang Seng standard industry | A real business sector with an official classification system | Constituent stocks: quote industry <ind_code> --market cn|us|hkOverall ranking: sector rank -t industry |
| Concept / Theme: AI / Huawei / SOE reform / metaverse / carbon neutrality / internet-celebrity economy | CLS Concept sectors | A cross-industry thematic narrative | Find code: sector plate <已知成分股> reverse-lookup cls code (sector rank -t concept only has today's hot ones, not complete) → constituent stocks: sector <plate_code> |
| Listing board / Market: ChiNext / STAR Market / Shanghai Main Board / Shenzhen Main Board / BSE / NEEQ / US stocks / HK stocks / China concept stocks | Market sectors | A trading board divided by listing location | quote board <type>(cyb/kcb/us/hk…) |
Not sure whether it's an industry or a concept?Try
quote industryfirst (申万 covers the vast majority of real industries); if it's clearly a thematic narrative/policy theme, go with concept. If you want to see "where the whole sector ranks in today's gainers/losers," usesector rank。Never fall back to listing stocks from memory just because you can't tell the difference— pull it directly; if that doesn't work, switch to another method.
Intent → command (pick by what the user wants)
A. Single stock (Chinese term: 个股)
| User wants | Command |
|---|---|
| Only knows the name (茅台/宁德时代) and wants the code or quote | First quote search <名字>, then quote <code> |
| real-time quote for a given stock | quote <code> |
| view several at once | quote batch <codes...> |
| K-line | quote kline <code> -p <period> -n <num>(minute-level goes to Xueqiu, daily/weekly/monthly/yearly goes to cls; add for US/HK --src xq) |
| five-level order book / intraday / tick-by-tick | quote depth|timeline|ticks <code> |
B. Sector / industry / concept / board (Chinese term: 板块)
| user wants | Command |
|---|---|
| Constituent stocks of an industry (semiconductors/pharma…, A/US/HK) | quote industry <ind_code> --market cn|us|hk(first quote industry --market <m> list all industries to find the code) |
| Constituent stocks of a concept/theme (drill-down) | Reverse lookup code: sector plate <已知成分股>(rank -t concept only has today's hot) → sector <plate_code>(smart default directly outputs constituent stocks) |
| Stock rankings for a listing board/market (ChiNext/STAR Market/Shanghai-Shenzhen/US stocks/HK stocks/China concept stocks) | quote board <type> |
| Sector (industry/concept) gainers and losers ranking | sector rank -t industry|concept |
| Today's intraday sector/stock unusual movement(sector rotation panorama) | sector anchor [date](sector item cls* code → sector <code> drill down to constituent stocks) |
| a stock moves → find linked stocks in the same industry(most commonly used) | quote related <code>(same-industry peer, one command) |
| a stock moves → findsame-concept sectormembers | sector plate <code> → sector <plate>(drill down in one step) |
C. Fundamentals & statements (fundamentals/financial reports) — f10 ≠ finance
| user wants | command |
|---|---|
| latest-period snapshot(PE/PB/ROE/EPS/market cap/dividend yield/debt ratio) | quote f10 indicator <code>(single period, latest) |
| Multi-period statements (income/balance sheet/cash flow/indicators) | quote finance <code> -t income|balance|cashflow|indicator |
| Top ten shareholders | quote f10 holders <code> |
| Dividends and bonus shares | quote f10 bonus <code> |
D. Market overview (market/broad market) — don't guess index codes
| user wants | command |
|---|---|
| Major indices + 沪深 capital (default market overview) | market |
| Pure market indices | market index |
| Market sentiment (limit up/limit down/seal rate/advance-decline distribution) | market emotion |
| HK rankings | market hk [sort] |
| Official same-day Dragon-Tiger List (with reasons for listing) | market longhu [date] |
| Global central bank rates | market rates |
Don't confuse the two kinds of "异动": intraday real-time sector rotation/surge-plunge timeline =
sector anchor(for a sector item's cls code directlysector <code>to drill down into constituent stocks); official post-close Dragon-Tiger List (abnormal fluctuation listing) =market longhu. After a stock moves abnormally, to find same-industrylinked stocks usequote related(sameconcept sectorMembers usesector plate→sector <plate>)。
E. Capital flow (fund flows) — per-stock vs market-wide
| User wants | Command |
|---|---|
| Per-stock main capital flow (main/super-large/large/medium/small order net amount) | quote flow <code> |
| Northbound / Southbound capital (沪港通/深港通) | quote flow market(or market flow) |
| Per-stock historical capital flow (multi-day + 3/5/10/20-day net amounts) | quote flow history <code> -c <num> |
| Margin trading | quote flow margin <code> |
F. News & info (information) — quote search ≠ info search
| User wants | Command |
|---|---|
| Name → stock code (茅台/腾讯) | quote search <名字>(search stocks,notsearch news) |
| Real-time flash news/rolling telegraph | info flash(default cls;-s jin10/-s glh) |
| News/in-depth articles | info news(news depth <channel> depth;news stock <code> stocks) |
| Topics/thematic hotspots | info topic(topic hot CLS hot topics) |
| Search info/news/telegraph/articles | info search <关键词>(notsearch stock code; use a single word or whole phrase) |
G. Macro / calendar / futures
| User wants | Command |
|---|---|
| Macro data / major events / global holidays | calendar macro|event|holiday [date] |
| A-share / HK / US stock data calendar | calendar ashare|hk|us [date] |
| Futures flash news / headlines | future(-c <频道> by instrument;future headline) |
| Futures-spot basis | future basis [date](-g <板块>) |
| Futures/commodities/forex/indices real-time quotes(gold/crude oil/iron ore/rebar/US dollar index/S&P/Hang Seng/offshore yuan…) | price [codes...](CODE.EXCHANGE codes, space-separated; omit = default watchlist). See price |
| Futures/commodities/forex/indices K-line history(daily/weekly/monthly/minute lines for XAUUSD/i9888/SPX) | price kline <code> -p <period> -n <num>(tm-qtg+OSS; minute lines near real-time, the latest 1–2 daily bars may not be persisted). See price kline |
Global options
| Flag | Default | Description |
|---|---|---|
-n <num> |
varies | Item count. 10 for most; kline 120; industry/board 30. (flow history uses -c instead.) |
-h |
— | Help |
Name → code lookup
To turn a company name into a tradable code, run finflow quote search <keyword> (Xueqiu, live). It is the single source of truth — it covers all three markets in one call (A-shares + HK + US), which a per-market offline list cannot, and it stays current as stocks list/rename. No login, cookie, or local index needed.
Each hit is {code, name, type}. type is always "stock" — don't filter on it; read the market/instrument from the code prefix instead:
code shape |
market / instrument | example |
|---|---|---|
SH / SZ + 6 digits |
A-share | SH600519 Kweichow Moutai |
| bare 5 digits | HK stock | 00700 Tencent Holdings |
| plain letters | US ticker | NVDA, AAPL, BYDDY (US ADR) |
BK**** |
CLS plate / board | BK0088 baijiu |
CSI* / SH000*** / SZ399*** |
index / ETF | SZ399997 CSI Baijiu |
A name that is also listed in HK/US returns all of them at once (e.g. 比亚迪 → SZ002594 A, 01211 H, BYDDY US ADR) — pick by prefix.
Two boundaries to expect:
- Concept/industry words return plates, indices, and ETFs — not a member-stock list.
quote search 半导体gives youBK0021 半导体and SOXX/SOXL, not the constituent stocks. For industry → its stocks, usequote industry <ind_code>; for concept → its members, usesector <plate_code>. - Search matches the official security name (substring/prefix), not slang.
茅台works (it's a substring of Kweichow Moutai); pure market slang like宁王returns nothing — normalize it to the official name/short name before searching.
Command Reference (detailed syntax)
quote — securities
quote <code> — Single quote (CLS, auto-fallback xq → Yahoo).
quote batch <codes...> — Batch (Xueqiu, single-source, no fallback). Auto-prefixes SH/SZ for 6-digit A-share codes; supports HK/US.
quote batch sh600519 sz000858 # A股
quote batch 00700 09988 # 港股
quote batch AAPL NVDA TSLA .DJI # 美股
quote search <keyword> — Search by name/code across A/HK/US (Xueqiu, live). This is the name → code entry point — see Name → code lookup above for the code-prefix conventions and the two boundaries (concept words return plates not members; slang isn't matched). Note: -n has no effect here — it always returns the top ~10 hits.
quote search 比亚迪 # → SZ002594 (A) · 01211 (H) · BYDDY (US ADR)
quote related <code> — Same-industry peers (Xueqiu). The one-command expand-from-one-to-many (Moutai → Wuliangye/Luzhou Laojiao/Yanghe/Gujing Distillery).
quote industry [ind_code] [--market cn|us|hk] — Industry → member stocks (Xueqiu). ind_code is a Industry code (板塊ID) — NOT a stock code. Each market uses a different classification:
--market |
classification | example ind_code |
|---|---|---|
cn (default) |
Shenwan | S2701 = semiconductors |
us |
GICS | 453010 = semiconductors |
hk |
Hang Seng | 7030 = industrial engineering |
- No
ind_code→ lists all industries of that market{code, name, pinyin}(run first to find the code). - With
ind_code→ that industry's stocks. Pass the matching--market(codes differ per market).
This is industry → stocks. It is not "which industry does stock X belong to" (don't pass a stock code).
quote board <type> — Stocks by board/market (Xueqiu). Market is derived from <type>, no flag:
| type | board | type | board | |
|---|---|---|---|---|
sh_sz |
Shanghai-Shenzhen overview | shb |
Shanghai B-shares | |
sha |
Shanghai A-shares | szb |
Shenzhen B-shares | |
sza |
Shenzhen A-shares | zxb |
SME board | |
cyb |
ChiNext | xsbno |
NEEQ negotiated | |
kcb |
STAR Market | xsbin |
NEEQ market-making | |
us |
US stocks overview | us_china |
China concept stocks | |
hk |
HK stocks overview |
industry & board share these options:
| Flag | Default | Description |
|---|---|---|
-n <num> |
30 |
Number of stocks (paginated, 90/page) |
--order-by <key> |
percent |
Sortable field key (below) |
--order |
desc |
asc / desc |
--order-by keys (only these are confirmed sortable; unknown key → empty): current(current price) chg(change amount) percent(change percentage) current_year_percent(year-to-date) volume(volume) amount(turnover) turnover_rate(turnover rate) pe_ttm(P/E TTM) dividend_yield(dividend yield) market_capital(market cap).
Each returned stock: {code, name, price, changePercent, amount, volume, marketCap, pe, pb, turnoverRate}.
quote industry # list 申万 (A股) industries
quote industry S2701 -n 20 # A股 半导体, top 20 by 涨跌幅
quote industry 453010 --market us -n 10 # 美股 半导体
quote board cyb # 创业板 涨跌幅 ranking
quote board kcb --order-by market_capital -n 5 # 科创板 市值前5
quote board us_china # 中概股一览
quote kline <code> — K-line.
| Flag | Alias | Default | Values | Description |
|---|---|---|---|---|
--period |
-p |
d |
d w m y 5d 1m 5m 15m 30m 60m 120m |
Period |
--number |
-n |
120 |
number | Candle count |
--src |
— | auto | cls xq |
Source (US/HK → xq) |
Minute periods (1m…120m) auto-use xueqiu; daily+ default to cls. US/HK → always --src xq.
quote depth <code> — 5-level order book. quote ticks <code> — tick trades. quote timeline <code> — intraday line. All take --src cls|xq (US/HK → xq).
sector — the whole plate/concept workflow in one command group (CLS).
| Subcommand | Args | Options | Description |
|---|---|---|---|
sector |
[code] |
— | Smart default: cls* code → its member stocks; stock code → its plates; no code → industry plate ranking. |
sector anchor [date] |
date | — | Intraday movers timeline — plates (cls*) & stocks that spiked up/down, time-ordered. The whole-day plate-rotation picture. |
sector rank |
— | -t <type> (default industry) |
Plate ranking. Type: industry concept. Each plate has a code. |
sector plate <code> |
code | — | A stock's plates (each with code). |
sector stocks <plate_code> |
plate_code | --way change|last_px |
Members of one plate/concept — the drill-down (each with reason, isCore). |
The workflow: sector anchor (which sectors moved today) → grab a sector's cls* code → sector <code> (drill down to constituent stocks in one command) → quote <stock> (pick stocks). Or bottom-up: sector plate <stock> (which sectors a stock belongs to) → sector <plate> (sibling stocks in the same sector).
plate_code (cls plate id, e.g. cls80405=Huawei supply chain) — get it by reverse-lookup: sector plate <stock> where is ANY stock you know is in the concept (e.g. Runhe Software sz300339 → Huawei industrial chain cls80405); the result lists that stock's plates, each with a code. Then sector <plate_code>. For same-industry peers use quote related instead; for a stock's industry profile (F10) use quote industry-profile <code>. (sector rank -t concept only lists today's ~6 hot concepts — don't rely on it to find a specific concept's code.)
quote flow — capital flow
| Subcommand | Args | Options | Source | Description |
|---|---|---|---|---|
| (default) | code | — | cls | Per-stock fund flow (main/super/large/medium/small) |
flow market |
— | — | glh | Northbound/southbound capital |
flow history <code> |
code | -c <num> (default 20) |
xq | Historical flow + 3/5/10/20d net |
flow margin <code> |
code | — | xq | Margin trading |
flow intraday <code> |
code | — | xq | Intraday capital flow |
flow xq <code> |
code | — | xq | Xueqiu capital flow |
Default without code → market flow (same as flow market).
quote f10 / quote finance — fundamentals (Xueqiu)
quote f10 <code> with no subcommand → indicator.
| Subcommand | Description |
|---|---|
f10 indicator (default) |
Latest single-period snapshot: PE/PB/ROE/EPS/market cap/dividend yield/debt ratio |
f10 holders |
Top 10 shareholders |
f10 bonus |
Dividend history (≤15) |
quote finance <code> — multi-period statements:
| Flag | Alias | Default | Values | Description |
|---|---|---|---|---|
--type |
-t |
indicator |
indicator cashflow income balance |
Report type |
| Type | Content |
|---|---|
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 |
info — news & flash
info flash — flash/breaking news.
| Flag | Alias | Default | Values | Description |
|---|---|---|---|---|
--src |
-s |
cls |
cls jin10 glh |
Source |
--category |
-c |
varies | varies by source | Channel filter |
CLS categories: all red announcement watch hk_us fund remind. GLH categories: all popular AStock HKStock USStock fundLive ai international chineseMainland hongkongMacaoTaiwan virtualAssets exchangeCommodity house debenture.
| Subcommand | Args | Notes |
|---|---|---|
flash important |
— | Important news (glh) |
flash popular |
— | Popular flash (glh) |
flash detail <id> |
id | Flash detail (jin10, tries cookie) |
flash date <date> |
date | Historical flash (jin10, requires login) |
info news — articles.
| Subcommand | Args | Description |
|---|---|---|
| (default) | — | CLS headline news |
news depth [channel] |
channel | CLS 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> |
code | Per-stock news (cls) |
info topic — topics.
| Subcommand | Args | Description |
|---|---|---|
| (default) | — | List all topics (jin10) |
topic search <keyword> |
keyword | Search topics |
topic groups |
— | Topic category groups |
topic hot |
— | Hot CLS subjects |
topic show <id> |
id | Articles in topic (jin10, tries cookie) |
info search — full-site search (news/articles/stocks). Not for resolving stock codes — use quote search for that.
| Subcommand | Args/Options | Description |
|---|---|---|
search <keyword> |
-s cls|jin10, -t <type> |
Search informational content only (CLS keeps stocks/sectors/telegraphs/important news/in-depth/articles; paywalled/noise excluded). Stock hits include code/price/percent. Use a single keyword or solid phrase (美联储加息, not 美联储 加息) — both backends treat spaces as loose OR. |
search detail <id> |
id (from a search result) |
Full body of a CLS telegraph (Chinese term: 电报) by id — brief in results is truncated. |
market — overview
| Subcommand | Args/Options | Source | Description |
|---|---|---|---|
| (default) | — | glh | Major indices + Shanghai/Shenzhen capital flow |
market emotion |
— | cls | Sentiment: limit-up/down, seal rate, turnover, distribution |
market index |
— | glh | Major indices only |
market hk [sort] |
netChange turnoverValue turnVolume (default netChange). -o asc|desc (default desc) |
glh | HK ranking |
market flow |
— | glh | Northbound/southbound capital |
market rates |
— | jin10 | Global central bank rates |
market longhu [date] |
YYYY-MM-DD (default today) |
xq | Dragon-Tiger List — abnormal traders with reasons. Empty before close / non-trading days. |
calendar — macro
All accept optional <date> (default today, YYYY-MM-DD).
| Subcommand | Source | Description |
|---|---|---|
calendar macro [date] |
jin10 | Global macro data releases |
calendar event [date] |
jin10 | Macro events (speeches, decisions) |
calendar holiday [date] |
jin10 | Global holidays |
calendar ashare |
jin10 (WS) | A-share major events |
calendar hk [date] |
jin10 (WS) | HK data calendar |
calendar us [date] |
jin10 (WS) | US data calendar |
calendar future-event [date] |
jin10 | Futures calendar events |
calendar future-holiday [date] |
jin10 | Futures calendar holidays |
Default (no subcommand) → calendar macro today.
future — futures
Top-level --channel/-c applies to all: all(default) oil steel coal gas metal nonferrous chemical sugar grain pig macro.
| Subcommand | Description |
|---|---|
| (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 |
price — real-time futures / commodity / forex / index quotes
Live price snapshots (source: jin10 market-ws, ~2–3s push, no auth) for the instruments the A/HK/US stock commands don't cover: domestic futures, spot commodities, forex, global indices. This is the counterpart to quote (stocks) — use price for any CODE.EXCHANGE-form symbol.
price XAUUSD.GOODS i9888.DCE DXY.NYF # CODE.EXCHANGE codes, space-separated
price # default watchlist (12 mainstream instruments)
Each item: {code, price, change, changePercent, open, high, low, preclose, openInterest, turnover, timestamp}. changePercent is a percentage number (show with %); preclose = prior settlement (domestic futures) or prior close (international) — the change reference. Codes are passed through verbatim (case-preserving) — both market-ws and the OSS K-line path are case-sensitive (i9888.DCE ≠ I9888.DCE); use the exact case from the table or symbolist.
quote vs price: quote = securities with stock codes (SH600519 / 00700 / AAPL); price = everything market-ws streams, codes contain a . exchange suffix (XAUUSD.GOODS / i9888.DCE / DXY.NYF / SPX.INDEX).
Constructing codes — lookup the product code, then apply the rule. Only main contracts (888/9888), continuous contracts (c1), and active spot/forex/index instruments stream live.
Domestic futures main contract — Main code = product code + suffix,fixed total length 5: 1-letter product code plus 9888, 2-letter product code plus 888. Look up the product code in the table below → concatenate → add exchange suffix (.DCE/.SHF/.CZC/.INE/.CF/.GFEX). Example: Iron ore i→i9888.DCE; Rebar rb→rb888.SHF; 10-year treasury T→T9888.CF。
| Exchange | Product code = variety |
|---|---|
DCE DCE |
i=iron ore a=No.1 soybean b=No.2 soybean c=corn cs=starch eb=styrene eg=ethylene glycol j=coke jd=eggs jm=coking coal l=plastic lg=log lh=hogs m=soybean meal p=palm oil pg=LPG pp=PP rr=japonica rice v=PVC y=soybean oil bb=plywood bz=benzene fb=fiberboard |
SHF SHFE |
au=Shanghai Gold ag=Shanghai Silver al=Shanghai Aluminum cu=Shanghai Copper ni=Shanghai Nickel pb=Shanghai Lead sn=Shanghai Tin zn=Shanghai Zinc rb=Rebar hc=Hot-rolled Coil wr=Wire Rod ss=Stainless Steel bu=Bitumen fu=Fuel Oil ru=Rubber br=Butadiene Rubber sp=Pulp ao=Alumina ad=Cast Aluminum |
CZC CZCE |
AP=Apple CF=Cotton CJ=Red Date CY=Cotton Yarn FG=Glass MA=Methanol OI=Rapeseed Oil PF=Staple Fiber PK=Peanut PX=PX RM=Rapeseed Meal RS=Rapeseed SA=Soda Ash SF=Ferrosilicon SM=Manganese Silicon SR=White Sugar TA=PTA UR=Urea ZC=Thermal Coal and small varieties such as JR/PL/PM/PR/RI/SH/WH |
INE INE |
sc=Crude Oil fu=Fuel Oil lu=Low Sulfur Fuel Oil nr=No.20 Rubber bc=International Copper ec=Container Shipping Index (Europe route) |
CF CFFEX |
IF=CSI 300 IC=CSI 500 IH=SSE 50 IM=CSI 1000 T=10-year Treasury bond(9888) TF=5-year Treasury bond TS=2-year Treasury bond TL=30-year Treasury bond |
GFEX Guangzhou Futures Exchange |
lc=lithium carbonate si=industrial silicon ps=polysilicon pd=palladium pt=platinum |
specific-month contract(non-front-month, assemble as needed): domestic = product code + YYMM(i2509=iron ore Sep 2025,rb2510,au2506)。
International futures continuous contract = product code + c1, add exchange suffix:
| Exchange | Product code = variety (assemble c1) |
|---|---|
CMX COMEX |
GC=gold SI=silver HG=copper ALI=aluminum |
NYM NYMEX |
CL=WTI crude NG=natural gas PA=palladium PL=platinum HRC=hot-rolled steel coil TIO=iron ore fines UXX=uranium |
CBT CBOT |
S=soybeans C=corn W=wheat SM=soybean meal BO=soybean oil KW=hard wheat O=oats |
SGX SGX |
SGXCN=FTSE A50 SGXNK=Nikkei 225 SGXTWN=Taiwan index SGXSCI=iron ore |
OSA/ZHC |
JRU=Japanese rubber (OSA) CMA=aluminum (ZHC) |
Example:GCc1.CMX(COMEX gold) CLc1.NYM(WTI oil) SIc1.CMX(COMEX silver) SGXCNc1.SGX(A50)。
Spot commodities (CODE.GOODS): XAUUSD=gold XAGUSD=silver XPDUSD=palladium XPTUSD=platinum USOIL=WTI crude UKOIL=Brent NGAS=natural gas COPPER=copper NGAS=natural gas.
Forex (CODE.NYF/.FXCM/.BANK): currency pair = base + quote currency — DXY=US dollar index EURUSD GBPUSD USDJPY USDCAD AUDUSD NZDUSD USDCNH=offshore renminbi USDCHF=Swiss franc.
global indices (CODE.INDEX): SPX=S&P 500 DJI=Dow Jones NDX=Nasdaq 100 HSI=Hang Seng N225=Nikkei 225 KS11=Korea KOSPI GDAXI=Germany DAX FCHI=France CAC 000001.SH=Shanghai Composite.
Shanghai Gold/Silver T+D (CODE.ICBCM): Au(T+D) Ag(T+D) mAu(T+D) Au99.99。
Querying more symbols: full DB at https://app-server.jin10.com/symbolist_hero_0507.txt (gzip JSON, ~90k, schema c/m/n/d/t/r; subscribe as c + "." + m). For codes not in the tables above (minor contracts, options, historical months), fetch it and search by n (Chinese name). Non-streaming codes return no snapshot.
price kline — K-line history for non-equity instruments
Historical candles for the same CODE.EXCHANGE symbols price covers, via tm-qtg (10006 file list → OSS download). Source: jin10 tm-qtg. No guest token needed (register with empty token).
price kline XAUUSD.GOODS -p d -n 120 # 现货黄金 日线 120 根
price kline i9888.DCE -p 5m -n 60 # 铁矿石 5分钟 60 根
price kline SPX.INDEX -p w -n 52 # 标普500 周线
| Flag | Default | Values |
|---|---|---|
--period/-p |
d |
d w m y 1m 5m 10m 15m 30m 60m 120m |
--number/-n |
120 |
candle count |
Each item: {date, open, high, low, close, volume}. date is ISO (minute periods keep full timestamp; daily+ keep yyyy-mm-dd).
Limits (2026-06):
- K-line comes from pre-generated gzip files on OSS, not the live WS feed. Intraday (minute) files update during the session → near-real-time (~last closed bar). Daily/weekly/monthly files are batch-snapshotted → the latest 1–2 bars may not be on OSS yet. For live price use
price <code>. - Not every symbol has K-line files. Verified:
XAUUSD.GOODS(5min+daily),i9888.DCE(5min),SPX.INDEX(5min). Some (rb888.SHF,DXY.NYF) return no files. If 0 candles, the symbol likely isn't on OSS — tryprice <code>for a live quote instead. - Intraday returns up to ~1000 candles (one file ≈ 3.5 days of 5min); daily/weekly/monthly paginate through all files (few).
- Symbols are case-sensitive (
i9888.DCE, notI9888.DCE).
Auth (zero-config)
All commands work with no setup. Xueqiu (F10, finance, industry, board, longhu, flow, margin, search) auto-fetches an anonymous session (full /hq cookie set incl. acw_tc WAF cookie) on first use, cached at ~/.xueqiu-anon-cookie; no login needed. Jin10 (flash detail, flash date, topic show, calendar macro/event/holiday) tries a browser cookie and works without it (less data); flash date needs login. CLS signs every request (no login). Gelonghui needs no auth.
Interpretation tips & known limits
meta.source= which platform served the data (freshness context). Fallback markers use the space form (xq fallback,yahoo fallback).market emotionshows limit-up/down counts, seal rates — key sentiment.quote flow market/market flowshow northbound (Shanghai-Hong Kong Stock Connect/Shenzhen-Hong Kong Stock Connect) capital — key for A-share trend.- Non-trading hours:
emotion,timelinereturn empty;longhuempty before close (~17:30);sector anchoronly has data for trading days. -ndefaults vary: most 10;kline120;industry/board30;flow historyuses-c.- Xueqiu single-source commands (
search/industry/board/f10/finance/flow history) have no cls/Yahoo fallback — if xueqiu's WAF blocks them they error. Onlyquote <code>andkline/depth/ticks/timelinehave fallback chains. - CLS flash with jin10 source auto-paginates up to 50 pages (slow for large
-n). info flash -c <栏目>(non-all) is cls single-source with no cross-source fallback. The category is filtered server-side by cls, so results are accurate forwatch/hk_us/fund/red/announcement. Use default (all) or-s jin10for cross-source results.- Time formats are mostly ISO, but
timeline(hour-minute),ticks(hour-minute-second), and somecalendarcommands are exceptions — parse carefully.