This guide explains how the skill reads SEC data with tools/edgar.py.
- CIK lookup:
https://www.sec.gov/files/company_tickers.json - Company facts (XBRL):
https://data.sec.gov/api/xbrl/companyfacts/CIK{cik}.json - Submission metadata:
https://data.sec.gov/submissions/CIK{cik}.json
10-K10-Q20-F6-K
get_cik(ticker)get_company_facts(ticker)get_financials(ticker)get_filings_metadata(ticker)
- Normalize ticker to uppercase.
- Resolve
.and-variants during CIK lookup. - Parse both
us-gaapandifrs-fullconcept namespaces. - Map IFRS terms into common output field names where possible.
- Keep annual and quarterly snapshots separate.
- Return
shares_outstandingonly from period-end share concepts; if unavailable, keep it null instead of using weighted-average EPS denominators.
python3 tools/edgar.py AAPL
python3 tools/edgar.py NVDA --mode filings
python3 tools/edgar.py ASML --mode facts- SEC requests should include a reasonable
User-Agent. - SEC endpoints can rate-limit bursty traffic; avoid aggressive loops.
- International tickers may have sparse EDGAR coverage.
- Values should be tied to filing metadata when presented in analysis.
- Fail loudly on invalid ticker/CIK resolution.
- Return partial datasets when some concepts are unavailable.
- Never invent missing values.