Skip to content

feat(xueqiu): add kline and groups adapters#809

Merged
jackwener merged 3 commits intojackwener:mainfrom
williamxie1989:feat/xueqiu-kline-groups
Apr 5, 2026
Merged

feat(xueqiu): add kline and groups adapters#809
jackwener merged 3 commits intojackwener:mainfrom
williamxie1989:feat/xueqiu-kline-groups

Conversation

@williamxie1989
Copy link
Copy Markdown
Contributor

@williamxie1989 williamxie1989 commented Apr 5, 2026

Summary

Add two new YAML adapters for Xueqiu (雪球) to fetch stock chart data and portfolio groups.

  • kline — Fetch candlestick/OHLCV historical market data from the Xueqiu v5 chart API
  • groups — List Xueqiu portfolio group entries

New Commands

opencli xueqiu kline SH600519 --days 30   # 30-day daily candle for Kweichow Moutai
opencli xueqiu groups                      # List portfolio groups

Implementation Details

  • Auth strategy: Cookie (credentials: 'include')
  • Pipeline pattern: navigateevaluatemap, consistent with existing Xueqiu adapters
  • Kline supports all Xueqiu symbol formats: SH/SZ (A-shares), US stocks (e.g. AAPL)
  • Output columns: date, open, high, low, close, volume, percent

williamxie1989 and others added 3 commits April 5, 2026 19:06
Add kline.yaml: fetch candlestick/OHLCV data from Xueqiu v5 chart API.
Supports custom days lookback and outputs date, open, high, low, close,
volume, percent.

Add groups.yaml: list Xueqiu portfolio/group entries.

Co-Authored-By: Claude <noreply@anthropic.com>
The previous implementation used /portfolio/stock/list.json which only
returns stocks in a single group and does not return the group list.
Switch to /portfolio/list.json which returns all portfolio groups
including 实盘, 沪深, 港股, 美股, 模拟(pid=-4), 持仓 etc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove the unused 'category' parameter (the API ignores it;
  all groups live under category=1 regardless)
- Replace with 'pid' parameter to allow fetching any group:
  -4=simulated, -5=SH/SZ, -6=US stocks, -7=HK stocks, etc.
- API path still uses category=1 but pid is now user-controllable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jackwener jackwener merged commit bb7b26b into jackwener:main Apr 5, 2026
@jackwener jackwener mentioned this pull request Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants