Skip to content

Commit 5c2bfc9

Browse files
author
AdvancingTitans
committed
feat: add single stock lookup and verified flow dates
1 parent 46a1ab4 commit 5c2bfc9

8 files changed

Lines changed: 512 additions & 33 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.4] - 2026-06-01
9+
10+
### Fixed
11+
- `young flow` now returns the latest verified A-share fund-flow record instead of going blank when the requested date is newer than the data source.
12+
- Default trade-date selection now keeps pre-close weekday runs on the previous trading day, avoiding premature same-day reports before A-share data settles.
13+
14+
### Added
15+
- Added `young stock <symbol>` for single-stock snapshots across A-share, Hong Kong, and best-effort US symbols, with source/date labels and optional news lookup.
16+
17+
### Changed
18+
- Fund-flow output is explicitly labeled as A-share / Shanghai Composite scope and prints the returned trading date.
19+
- A-share reports only use fund-flow data when the returned trading date matches the report date; stale source data is shown as a clear notice rather than mixed into the review.
20+
- Documentation no longer describes Eastmoney `push2his` as a stable historical fund-flow fallback.
21+
822
## [0.1.3] - 2026-05-31
923

1024
### Added

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
> An A-share (China stock market) after-hours CLI that **just works** — no login, no API keys, no scraping tricks.
1010
> Also covers HK & US indices and a global snapshot.
1111
12-
A single command (`young a`) prints a complete after-hours dashboard: major indices, limit-up (涨停) and limit-down pools, fund flow, and top sector boards. Everything pulls from Eastmoney's public endpoints, with a 7-day local cache so repeated calls during the same session don't hammer the server.
12+
A single command (`young a`) prints a complete after-hours dashboard: major indices, limit-up (涨停) and limit-down pools, verified A-share fund flow when the trading date matches, and top sector boards. Everything pulls from public no-login endpoints, with a 7-day local cache so repeated calls during the same session don't hammer the server.
1313

1414
Born out of a real workflow: every trading day after close I wanted the same five numbers in one place without opening a browser or paying for a data terminal. So I packaged it.
1515

@@ -30,9 +30,10 @@ young a # A-share after-hours dashboard (the main thing)
3030
young hk # Hong Kong indices snapshot
3131
young us # US indices snapshot
3232
young global # A + HK + US in one view
33+
young stock 600519 # one stock snapshot (A-share / HK / US)
3334
young indices # A-share indices only
3435
young zt-pool # limit-up (涨停) / limit-down / 炸板 pool
35-
young flow # north-bound + main-capital fund flow
36+
young flow # latest verified A-share fund flow
3637
young a -d 20260530 # historical date (YYYYMMDD)
3738
young a --refresh # bypass cache, force re-fetch
3839
young update # upgrade young-stock-cli in the current Python env
@@ -64,9 +65,11 @@ It is also a foundation for analysis pipelines: every subcommand maps to a Pytho
6465
## What's in the box
6566

6667
- **Multiple public quote sources** — Tencent Finance, Sina Finance, and Eastmoney are tried in sequence so temporary source failures can be filled by another no-login endpoint.
68+
- **Single-stock lookup**`young stock 600519`, `young stock 0700.HK`, or `young stock AAPL` prints a compact quote snapshot with source, trade date, price, change, volume, turnover when available, and optional news.
6769
- **Smart caching**`~/.young_stock/cache/`, 7-day TTL, auto-pruned. Pass `--refresh` to skip.
6870
- **Trade-day awareness** — nearest-trade-day resolution including weekends and (best-effort) holidays.
6971
- **Rich terminal tables** — readable on dark and light terminals.
72+
- **Verified A-share fund flow**`young flow` shows the latest Eastmoney A-share / Shanghai Composite fund-flow date explicitly; full reports only include it when the trading date matches.
7073
- **Sector boards via browser fallback** — when Eastmoney's board API rate-limits, falls back to rendering the public web page (optional, requires a local browser engine).
7174
- **Local updater**`young update` runs `python -m pip install --upgrade young-stock-cli` with the same interpreter that launched the CLI.
7275

@@ -107,13 +110,14 @@ MIT — see [LICENSE](LICENSE).
107110

108111
## 中文说明
109112

110-
A 股盘后行情命令行工具。免登录、免 API key、免反爬技巧 — 一行命令把当日涨跌、涨停板、资金流向、板块榜全部打到终端。同时支持港股、美股指数和全球快照视图。
113+
A 股盘后行情命令行工具。免登录、免 API key、免反爬技巧 — 一行命令把当日涨跌、涨停板、可核验的 A 股资金流向、板块榜全部打到终端。同时支持港股、美股指数和全球快照视图。
111114

112115
```bash
113116
pip install young-stock-cli
114117
young a # A 股盘后总览(主命令)
118+
young stock 600519 # 单只股票速览(A股 / 港股 / 美股)
115119
young zt-pool # 涨停 / 跌停 / 炸板分析
116-
young flow # 北向资金 + 主力资金流向
120+
young flow # 最新可核验 A 股资金流向
117121
young global # 全球指数一屏
118122
young a -d 20260530 --refresh # 指定日期 + 强制刷新
119123
young update # 在当前 Python 环境中更新 CLI

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "young-stock-cli"
7-
version = "0.1.3"
7+
version = "0.1.4"
88
description = "A-share (China stock market) after-hours CLI — no login, no scraping tricks, just data."
99
readme = "README.md"
1010
requires-python = ">=3.10"

src/young_stock/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""young-stock-cli: A-share after-hours CLI."""
22

3-
__version__ = "0.1.3"
3+
__version__ = "0.1.4"

0 commit comments

Comments
 (0)