Agent Skills › HKUDS/Vibe-Trading › sec-edgar

sec-edgar

GitHub

用于获取美国SEC EDGAR系统数据的技能,支持将股票代码解析为CIK、查询近期财报文件及提取XBRL财务指标。

agent/src/skills/sec-edgar/SKILL.md HKUDS/Vibe-Trading

Trigger Scenarios

需要获取美股公司财务报告数据 查询上市公司XBRL财务指标

Install

npx skills add HKUDS/Vibe-Trading --skill sec-edgar -g -y
More Options

Non-standard path

npx skills add https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/sec-edgar -g -y

Use without installing

npx skills use HKUDS/Vibe-Trading@sec-edgar

指定 Agent (Claude Code)

npx skills add HKUDS/Vibe-Trading --skill sec-edgar -a claude-code -g -y

安装 repo 全部 skill

npx skills add HKUDS/Vibe-Trading --all -g -y

预览 repo 内 skill

npx skills add HKUDS/Vibe-Trading --list

SKILL.md

Frontmatter
{
    "name": "sec-edgar",
    "category": "data-source",
    "description": "U.S. SEC EDGAR fetch interface — resolve a ticker to its CIK, list recent filings (10-K \/ 10-Q \/ 8-K and friends) with primary-document URLs, and pull XBRL companyfacts financial series. Free, no API key; rate-limited by IP so every request is throttled and carries a contact User-Agent. United States only."
}

SEC EDGAR

Overview

The U.S. Securities and Exchange Commission (SEC) publishes free, no-auth JSON endpoints for every reporting company on its EDGAR system: a ticker-to-CIK directory, a recent-filings index, and the full set of XBRL ("companyfacts") financial concepts a company has reported. This skill documents how Vibe-Trading fetches that data through the bundled sec_edgar_client transport and the get_sec_filings agent tool.

This is the fetch skill — it covers how to get filing-index rows, document URLs, and us-gaap metric series out of EDGAR. The separate edgar-sec-filings skill is the methodology layer (how to read a 10-K, score insider activity, interpret 8-K items); for any actual data retrieval it delegates here.

Scope is the United States only. EDGAR has no coverage of A-shares, HK, or other non-U.S. markets — route those through tushare / yfinance / akshare instead.

Link convention: every link below that points into references/ is written relative to this document (references/...) — the form GitHub resolves when someone opens the file in a browser. The read_file tool resolves the same string against the skill that owns it, so the agent and a human reader reach one file. Keep the relative form when adding new docs, and keep reference paths unique across skills: a path two skills both carry is reported as ambiguous rather than guessed.

Quick Start

Preferred path — the get_sec_filings tool (read-only, throttled, returns strict JSON):

{ "ticker": "AAPL", "form": "10-K", "limit": 5 }
{ "ticker": "MSFT", "metric": "Revenues", "limit": 8 }

The tool resolves the ticker to a CIK, fetches the filing index (optionally filtered by form), and — when metric is set — also pulls the XBRL series for that us-gaap concept. See sec-edgar/references/get_sec_filings_tool.md for the full parameter and envelope contract.

Script path — call the sec_edgar_client transport directly when you need raw JSON the tool does not surface (e.g. company address, all units of a concept):

from backtest.loaders.sec_edgar_client import cik_for, get_submissions, get_company_facts

cik = cik_for("AAPL")            # "0000320193", or None if not in the SEC table
submissions = get_submissions(cik)   # recent-filings index + company metadata
facts = get_company_facts(cik)       # all reported XBRL concepts

A runnable end-to-end example lives at sec-edgar/scripts/sec_filings_example.py.

Parameter & Format Notes

  • Ticker: U.S. equity symbol, case-insensitive (AAPL, msft). Resolved to a CIK via the SEC company-tickers table; an unlisted ticker returns an error envelope (tool) or None (cik_for).
  • CIK: the SEC Central Index Key, normalized to a zero-padded 10-digit string (320193 → "0000320193"). The submissions and companyfacts endpoints require the padded form; document URLs use the un-padded form.
  • Form: SEC form type, case-insensitive (10-K, 10-Q, 8-K, DEF 14A, 4). Omit to return all recent forms.
  • Metric: an XBRL us-gaap concept name (Revenues, NetIncomeLoss, Assets, StockholdersEquity). Case-sensitive — these are exact taxonomy element names.
  • Dates: SEC returns ISO YYYY-MM-DD strings (e.g. 2023-09-30).
  • Return shape: the tool returns a JSON-string envelope; the client returns decoded JSON (dict).

Reference Docs

Scripts

Notes

  • Free, no API key: EDGAR is public. The only requirement is a descriptive User-Agent carrying a contact address; the client ships a compliant default and honors the VIBE_TRADING_SEC_UA override.
  • Rate-limited by IP: the SEC throttles per source IP and temporarily blocks clients that burst without a contact UA. Every request routes through the shared backtest.loaders._http throttle under the "sec" host bucket (≈0.12s spacing floor, overridable via VIBE_TRADING_SEC_MIN_INTERVAL). Do not bypass the client with raw requests loops.
  • United States only: a non-U.S. symbol will not resolve to a CIK.
  • Transport, not a backtest loader: sec_edgar_client is a thin REST client, not a DataLoaderProtocol. There is no source: "sec_edgar" backtest mode — EDGAR feeds the get_sec_filings tool, not the bar-loading layer.
  • Reporting lag: filings appear after the company submits; XBRL companyfacts trail the filing. Insider (Form 4) and 13F latency caveats are covered in the edgar-sec-filings methodology skill.
  • Research only: this data supports research and does not constitute investment advice.

Version History

  • 7b43ba3 Current 2026-09-03 05:51

    修复参考链接在GitHub浏览器中404的问题,将链接格式从带skill前缀改为相对路径,并更新相关测试和文档说明。

  • 0aa45a9 2026-07-24 17:47

Same Skill Collection

agent/src/skills/adr-hshare/SKILL.md
agent/src/skills/akshare/SKILL.md
agent/src/skills/alpha-zoo/SKILL.md
agent/src/skills/ashare-pre-st-filter/SKILL.md
agent/src/skills/asset-allocation/SKILL.md
agent/src/skills/backtest-diagnose/SKILL.md
agent/src/skills/behavioral-finance/SKILL.md
agent/src/skills/candlestick/SKILL.md
agent/src/skills/ccxt/SKILL.md
agent/src/skills/chanlun/SKILL.md
agent/src/skills/commodity-analysis/SKILL.md
agent/src/skills/corporate-events/SKILL.md
agent/src/skills/correlation-analysis/SKILL.md
agent/src/skills/correlation-regime/SKILL.md
agent/src/skills/cross-market-strategy/SKILL.md
agent/src/skills/crypto-derivatives/SKILL.md
agent/src/skills/data-routing/SKILL.md
agent/src/skills/defi-yield/SKILL.md
agent/src/skills/dividend-analysis/SKILL.md
agent/src/skills/doc-reader/SKILL.md
agent/src/skills/earnings-forecast/SKILL.md
agent/src/skills/earnings-revision/SKILL.md
agent/src/skills/eastmoney/SKILL.md
agent/src/skills/edgar-sec-filings/SKILL.md
agent/src/skills/elliott-wave/SKILL.md
agent/src/skills/event-driven/SKILL.md
agent/src/skills/execution-model/SKILL.md
agent/src/skills/factor-research/SKILL.md
agent/src/skills/fund-analysis/SKILL.md
agent/src/skills/fundamental-filter/SKILL.md
agent/src/skills/geopolitical-risk/SKILL.md
agent/src/skills/global-macro/SKILL.md
agent/src/skills/harmonic/SKILL.md
agent/src/skills/hedging-strategy/SKILL.md
agent/src/skills/hk-connect-flow/SKILL.md
agent/src/skills/ichimoku/SKILL.md
agent/src/skills/investor-lenses/SKILL.md
agent/src/skills/liquidation-heatmap/SKILL.md
agent/src/skills/macro-analysis/SKILL.md
agent/src/skills/market-microstructure/SKILL.md
agent/src/skills/minute-analysis/SKILL.md
agent/src/skills/ml-strategy/SKILL.md
agent/src/skills/mootdx/SKILL.md
agent/src/skills/multi-factor/SKILL.md
agent/src/skills/okx-market/SKILL.md
agent/src/skills/onchain-analysis/SKILL.md
agent/src/skills/options-advanced/SKILL.md
agent/src/skills/options-payoff/SKILL.md
agent/src/skills/options-strategy/SKILL.md
agent/src/skills/pair-trading/SKILL.md

Metadata

Files
0
Version
0244ece
Hash
2c90e30e
Indexed
2026-07-24 17:47

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-07 04:34
浙ICP备14020137号-1