simonlin1212/global-stock-data
美股与全球市场数据工具包(给 AI 编程助手用):官方源优先、零鉴权、标注合规级别 | US & global market data for AI coding assistants — zero-auth, official sources. CBOE options + 0DTE, VIX term structure, FINRA short data, SEC Form 4 / 13F, central-bank rates & FX, Taiwan exchanges, EIA energy. 16 layers, 50+ endpoints, 17 sources, each with its compliance tier.
global‑stock‑data – Market‑data skill for AI coding assistants
What it is
- A single Skill file (Markdown with embedded Python) that lets AI coding assistants (Claude Code, OpenAI Codex, OpenClaw, etc.) fetch a huge variety of US‑focused market data on‑the‑fly.
- The repository contains only the code that talks to public data sources; the actual data is pulled by the user at request time.
Why it matters
- AI assistants often need up‑to‑date financial information to answer coding‑related questions (e.g., “show AAPL’s 0‑day‑to‑expiry options flow”).
- Instead of each assistant developer re‑implementing dozens of scrapers, this skill provides a ready‑made, zero‑auth,
requests‑only interface covering 16 logical layers (quotes, K‑lines, fundamentals, options Greeks, short‑interest, SEC filings, macro rates, FX, etc.) and 50+ endpoints.
Key features (as described in the README)
| Layer | Main data & sources | Highlights |
|---|---|---|
| Market Data | Sina, Tencent, Eastmoney (real‑time US/HK quotes) | 25‑78 fields per symbol |
| K‑line / chart | Sina (back to 1984) + Yahoo (global) | Daily, weekly, monthly, minute bars; works for US, JP, TW, KR, IN, EU markets |
| Technical indicators | Pure‑Python calculations | MA, EMA, MACD, RSI, KDJ, Bollinger |
| Fundamentals | Eastmoney, Yahoo, SEC XBRL | Income‑statement, balance‑sheet, cash‑flow, 503 GAAP metrics |
| Fund flow | Eastmoney push2his | Daily flow by market‑cap tier |
| Options | Yahoo crumb (fallback) | Full chain for US symbols |
| Official‑source options | CBOE (cdn.cboe.com) | Full chain + implied vol + Greeks + 0‑day‑to‑expiry (0DTE) flow detection |
| Short volume | FINRA Reg SHO | Market‑wide daily short volume for ~12 k symbols |
| Short interest | FINRA (twice‑monthly) | Open short positions, days‑to‑cover, rankings for ~22 k symbols |
| SEC filings | EDGAR daily index + XBRL | Same‑day Form 4, 8‑K, 13F; full‑text search back to 2001 |
| Insider trades / 13F | SEC Form 4 & 13F parsers | Line‑by‑line insider trade details, quarterly institutional holdings |
| Macro / calendar | US Treasury, CFTC, Nasdaq earnings calendar | Yield curve (1 M‑30 Y), COT positions, earnings dates |
| Global rates & FX (V2.1) | BIS, ECB, NY Fed, Fed Board, Treasury | Policy rates for 38 central banks, EUR/USD, SOFR/EFFR, euro‑area yield curve |
| Taiwan market (V2.2) | TWSE & TPEx open APIs | Latest quotes, P/E, dividend yield, monthly revenue, margin data |
| Energy (V2.2) | US EIA | Weekly crude/gas inventories, daily spot prices for WTI, Brent, Henry Hub |
| Tools | Various | Symbol search, market‑wide ticker list, news, ticker↔CIK mapping |
Compliance tiers
- The README grades every data source from S (free, commercial‑friendly) to D (personal‑use only) and flags those that are B (need permission for commercial reuse) or C/D (prohibited for automated scraping). This helps developers decide which endpoints are safe for production use.
How to get started
- Create a
~/.claude/skills/global-stock-datadirectory. - Download the single
SKILL.mdfile from the repo. - Install the only runtime dependency:
pip install requests(Windows also needstzdata). - (Optional) Fill in
SEC_CONTACTwith your name/email for SEC‑required User‑Agent. - Invoke the skill from an AI assistant, e.g., “Claude, show AAPL’s financials”.
Typical use‑case prompts (from the README)
- “Show NVDA’s 0DTE options flow – unusual activity.”
- “TSLA’s short‑volume ratio trend this week.”
- “Current policy rates of the major central banks.”
- “WTI price chart for the past year.”
- “Berkshire’s top 10 holdings in its latest 13F.”
Who it’s for
- Developers building AI‑assistant‑driven finance tools.
- Quant researchers who want a quick, code‑only way to pull public market data without dealing with dozens of APIs.
- Anyone needing a zero‑auth, Python‑only wrapper around publicly available financial feeds.
Limitations
- The repository supplies only the code; you must respect each source’s terms (especially tiers C/D). Commercial projects should stick to tier S sources.
- Some data (e.g., Yahoo, Nasdaq) is technically disallowed for automated scraping; the skill includes the code but warns users.
Bottom line
global-stock-data is a well‑documented, open‑source “skill” that aggregates a broad set of public US and global market data sources into a single, AI‑assistant‑friendly Python interface, with clear compliance guidance.
Related
- Project
- Project
- Project
- Project