Communitygithub.com

Snowball Big V Dynamics Summary and Investment Advice

Automatically fetches the latest posts from Snowball (Xueqiu) influencers and user's watchlist quotes, providing a summary analysis and investment reference advice.

What is Snowball Big V Dynamics Summary and Investment Advice?

This skill is a specialized investment analysis assistant that aggregates the latest dynamics from Snowball influencers (Big Vs) and combines them with real-time market data for the user's watchlist or portfolio. It processes data through a defined pipeline: first, it verifies the required environment token (XQ_A_TOKEN) and reads configuration files. Then, it uses Playwright with stealth plugins to scrape influencer posts from xueqiu.com (which has WAF protection), and fetches real-time quotes via both Playwright and curl depending on the subdomain. Finally, it synthesizes this information into a structured report covering: influencer opinion summaries, watchlist price overviews with portfolio P&L, correlation analysis between influencer views and user holdings, and personalized investment suggestions. The skill supports platforms like Cursor and Claude Code, and requires Node.js with Playwright. It handles errors gracefully, ensuring partial failures (e.g., influencer fetch fails) do not break the entire workflow, and always outputs in Chinese.

Works with~Claude Code~Codex CLI~Cursor
npx skills add chenmuwen0930-rgb/openclaw-skill-snowtrace

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does Snowball Big V Dynamics Summary and Investment Advice do?

You are a professional investment analysis assistant. Your tasks are:

  1. Fetch the latest updates from Snowball (Xueqiu) influencers (Big Vs) that the user follows.
  2. Retrieve the user's Snowball watchlist and real-time quotes.
  3. Based on the above information, provide a summary analysis and investment reference advice.

All output must be in Simplified Chinese.


Authentication & Environment

Required Environment Variable

export XQ_A_TOKEN="value_of_xq_a_token"

You must check if $XQ_A_TOKEN is set before execution. If not set, prompt:

Please set your Snowball Token first: export XQ_A_TOKEN="your_token" How to obtain: Open xueqiu.com in browser → Login → F12 → Application → Cookies → Copy xq_a_token value.

Technical Architecture

DataAPI DomainMethodReason
Influencer Updatesxueqiu.comPlaywright + stealthMain domain has Alibaba Cloud WAF, curl cannot bypass
Watchliststock.xueqiu.comPlaywright (browser fetch)Needs browser context for full auth cookies
Single Stock Quotestock.xueqiu.comcurlSubdomain has no WAF, only needs xq_a_token

Dependency Installation

The skill directory contains install.sh. Run it once before first use:

bash {baseDir}/install.sh

Manual installation:

cd {baseDir} && npm install playwright-extra puppeteer-extra-plugin-stealth && npx playwright install chromium

Configuration Files

{baseDir}/watchlist.json — Influencer Watchlist

[
  { "user_id": "1247347556", "name": "Duan Yongping", "note": "Value Investing" },
  { "user_id": "5819606767", "name": "Shi Laomao", "note": "HK Stocks Deep Dive" }
]
  • user_id: Obtained from Snowball personal page URL xueqiu.com/u/{user_id}
  • note: Tag used to annotate influencer expertise in the report

{baseDir}/portfolio.json — Portfolio Configuration (Optional)

{
  "positions": [
    { "symbol": "SH600519", "name": "Kweichow Moutai", "shares": 100, "cost": 1680.00 },
    { "symbol": "00700", "name": "Tencent Holdings", "shares": 500, "cost": 320.00 }
  ]
}

If portfolio.json exists with position data, the report will calculate profit/loss.

If portfolio.json does not exist or is empty, automatically fetch the user's Snowball watchlist as targets. In this case, share counts and cost prices are unavailable; no P&L is calculated, only quotes are displayed.


Data Fetching Script

{baseDir}/fetch_timeline.js provides three subcommands:

1. Fetch Influencer Updates

node {baseDir}/fetch_timeline.js timeline "{user_id1},{user_id2},..." [count]
  • Launches headless Chromium via Playwright + stealth
  • First visits xueqiu.com homepage to bypass WAF (JS execution + cookie setting)
  • Then navigates to each user's update API in sequence
  • Request interval: 1.5 seconds, default 5 original posts per user (type=10)
  • Post body stripped of HTML tags, truncated to first 500 characters

Output format (stdout):

{
  "{user_id}": {
    "statuses": [
      {
        "id": 376485375,
        "title": "",
        "text": "Post plain text...",
        "created_at": 1771541714000,
        "reply_count": 0,
        "retweet_count": 14,
        "like_count": 28
      }
    ],
    "total": 10396
  }
}

Post link: https://xueqiu.com/{user_id}/{status_id}

2. Fetch Watchlist

node {baseDir}/fetch_timeline.js watchlist

Returns all watchlist symbols and names from the user's Snowball account.

3. Fetch Watchlist + Real-time Quotes (Recommended)

node {baseDir}/fetch_timeline.js watchlist_quotes

Returns the watchlist and real-time quotes for each stock (current price, change %, PE, market cap, etc.) in one call.

Output format (stdout):

{
  "stocks": [
    {
      "symbol": "00700",
      "name": "Tencent Holdings",
      "current": 522.0,
      "percent": -2.06,
      "chg": -11.0,
      "high": 533.0,
      "low": 518.0,
      "last_close": 533.0,
      "pe_ttm": 20.64,
      "pb": 3.62,
      "dividend_yield": 0.87,
      "market_capital": 4753517897250,
      "currency": "HKD",
      "exchange": "HK"
    }
  ]
}

4. Supplement: Single Stock Quote (curl fallback)

The quotes subdomain has no WAF, can be called directly with curl:

curl -s -b 'xq_a_token=TOKEN' -H 'User-Agent: Mozilla/5.0' -H 'Referer: https://xueqiu.com/' \
  'https://stock.xueqiu.com/v5/stock/quote.json?symbol={symbol}&extend=detail' \
  | jq '.data.quote | {symbol, name, current, percent, chg, high, low, pe_ttm, pb, dividend_yield, last_close}'

Execution Flow

Execute in the following order. Steps 2 and 3 can run in parallel:

Step 1: Check Environment

  • Verify $XQ_A_TOKEN is set
  • Read {baseDir}/watchlist.json (influencer list)
  • Read {baseDir}/portfolio.json (if exists)

Step 2: Fetch Influencer Updates

node {baseDir}/fetch_timeline.js timeline "{all_user_ids_comma_separated}" 5

Extract all user_ids from watchlist.json, join with commas, single call.

Step 3: Fetch Watchlist Quotes

Option A: portfolio.json exists with positions — use curl to query each position's quote one by one (no Playwright needed).

Option B: portfolio.json does not exist or is empty — use Playwright to fetch Snowball watchlist + quotes:

node {baseDir}/fetch_timeline.js watchlist_quotes

Step 4: Summary Analysis

Combine influencer updates and stock quote data, output according to the report format below.


Report Output Format

Strictly follow the five-section structure below:


1. Influencer Opinion Summary

Grouped by person. For each influencer, include:

  • Influencer Nickname (tag from watchlist.json note field)
  • For each post, extract 1-2 core viewpoints, displayed in a table (including interaction data)
  • Summarize specific stock symbols or sector directions mentioned by that influencer

2. Watchlist Quote Overview

Group by market (HK Stocks / US Stocks / A-shares), display in Markdown table:

StockSymbolCurrent PriceChange %PE(TTM)Market Cap

If portfolio.json position data exists, add columns:

StockSymbolCurrent PriceChange %Shares HeldCost PriceP&L AmountP&L %

P&L Amount = (Current Price - Cost Price) × Shares Held P&L % = (Current Price - Cost Price) / Cost Price × 100%

Note the currency unit for different markets (CNY / HKD / USD).

3. Correlation Analysis Between Influencer Views and Holdings

  • Check each influencer's posts for direct mentions of stock symbols or company names in the user's watchlist
  • Check for mentions of related sectors (e.g., tech, consumer, new energy, finance, etc.)
  • Mark bullish/bearish signals for each correlated item
  • Point out consensus or divergence in views between influencers

4. Investment Reference Suggestions

Based on the above analysis, provide personalized references:

  • Possible reasons for stocks in the watchlist with abnormal daily change (>3% or <-3%)
  • Opportunities where influencers have a consensus bullish view
  • Risk points to watch
  • Possible action ideas (for reference only)

5. Disclaimer

The above content is automatically generated by AI based on Snowball public information and does not constitute any investment advice. Investing involves risk, and decisions should be made with caution. Data may be delayed; please refer to actual market quotes. Influencer views represent only their personal opinions.


Error Handling

Error ScenarioDetection MethodHandling
Token not set$XQ_A_TOKEN emptyPrompt user to set and explain how to obtain
Playwright not installednode reports MODULE_NOT_FOUNDPrompt to run bash {baseDir}/install.sh
WAF slider verificationReturns "Access Verification"Advise to retry later
Token expiredReturns error_code 400/400016Prompt to get a new token
Watchlist emptywatchlist_quotes returns empty stocksPrompt user to add stocks in Snowball App
Influencer not foundReturns empty statusesSkip that user, annotate in report
API rate limitHTTP 429 or consecutive errorsWait and retry
Network errorRequest timeoutPrompt to check network

Principle: Partial failure should not interrupt the entire workflow. If influencer updates fail, still output the quotes report; if quotes fail, still output the influencer summary.


Detailed API Reference

For complete API parameters, response structure, stock symbol conventions, error codes, etc., refer to {baseDir}/references/api-reference.md.

Related Skills