siftingio-ai-rules / rules
Cursor rule0 starsChanged 6 months agoMITView on GitHub
SiftingIO fundamentals, the /v1/fnd/* surface for US issuers: discovery, SEC filings, filing text & risk-factor diffs, XBRL financials, insiders & 13F holdings, economic calendar, and market hours.
- Reads credentials
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/siftingio-core.mdcCursor rule
- .cursor/rules/siftingio-historical.mdcCursor rule
- .cursor/rules/siftingio-live.mdcCursor rule
- .cursor/rules/siftingio-methodology.mdcCursor rule
- .cursor/rules/siftingio-sdks.mdcCursor rule
The file
Files
---
description: SiftingIO fundamentals, the /v1/fnd/* surface for US issuers: discovery, SEC filings, filing text & risk-factor diffs, XBRL financials, insiders & 13F holdings, economic calendar, and market hours.
globs: ["**/*.py", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.go", "**/*.rb", "**/*.java"]
alwaysApply: false
---
# SiftingIO Fundamentals (`/v1/fnd/*`)
US-equity reference and fundamentals data, sourced from the SEC. All paths are under `/v1/fnd/`. See `siftingio-core` for auth, gzip, pagination, and errors.
## Glossary
- **CIK**: SEC Central Index Key; exposed as a 10-digit zero-padded string (`"0000320193"`).
- **Accession**: unique filing id, dashed `0000320193-25-000089` (undashed accepted on input).
- **XBRL**: standardized financial-statement tagging; concepts are CamelCase tags (`Revenues`, `EarningsPerShareBasic`) under a taxonomy (`us-gaap` default, also `dei`, `ifrs-full`, `srt`).
- **Forms**: `10-K` (annual), `10-Q` (quarterly), `8-K` (material events), `DEF 14A` (proxy), `SC 13D`/`SC 13G` (5%+ ownership), `13F-HR` (institutional holdings), Forms `3`/`4`/`5` (insider transactions).
## Endpoint map
***Discovery***
- `GET /v1/fnd/stocks/search`: substring/prefix lookup over ~13k US issuers. Params: `q` (required), `limit` (default 25, max 100).
- `GET /v1/fnd/stocks/:ticker/profile`: name, exchanges, SIC industry, fiscal year end, CIK, entity type.
***SEC filings***
- `GET /v1/fnd/stocks/:ticker/filings`: recent filings (up to 1000). Filter by `form` (comma-separated, e.g. `10-K,10-Q`), `from`/`to` (YYYY-MM-DD), paginate with `limit`/`cursor`.
- `GET /v1/fnd/stocks/:ticker/filings/:accession`: a single filing's metadata.
- `GET /v1/fnd/stocks/:ticker/events`: 8-K material events.
- `GET /v1/fnd/stocks/:ticker/ownership`: SC 13D/13G beneficial-ownership filings.
- `GET /v1/fnd/stocks/:ticker/compensation`: executive compensation.
- `GET /v1/fnd/stocks/:ticker/earnings`: earnings release history.
***Filing text & analysis***
- `GET /v1/fnd/stocks/:ticker/filings/:accession/sections`: list extracted sections of a 10-K/10-Q.
- `GET /v1/fnd/stocks/:ticker/filings/:accession/sections/:section`: one extracted section (invalid `:section` → `400 invalid_section` with `valid_options`).
- `GET /v1/fnd/stocks/:ticker/risk-factors-diff`: Item 1A year-over-year diff (needs ≥ 2 10-Ks → else `404 insufficient_filings`; un-extractable → `422 risk_factors_unavailable`).
**Financials (XBRL)**: *gzip required*
- `GET /v1/fnd/stocks/:ticker/financials`: full XBRL bundle across periods.
- `GET /v1/fnd/stocks/:ticker/financials/:concept`: one concept across every period. Query `taxonomy` (`us-gaap` default).
- `GET /v1/fnd/stocks/screener/:concept/:period`: cross-sectional screener.
- `GET /v1/fnd/stocks/:ticker/ratios`: fundamental ratios.
***Insiders & holdings***
- `GET /v1/fnd/stocks/:ticker/insiders`: Form 3/4/5 insider transactions (`limit` default 10, max 25).
- `GET /v1/fnd/filers/:filer/holdings`: 13F-HR institutional positions (`:filer` is a ticker or CIK; no filings → `404 no_13f_filings`).
***Calendars***
- `GET /v1/fnd/economic-calendar`: US economic events (CPI, NFP, FOMC, GDP). `to` must be strictly after `from`, range ≤ 365 days → else `400 invalid_date_range`.
- `GET /v1/fnd/markets`: list markets (23 venues).
- `GET /v1/fnd/markets/status`: all-markets status snapshot.
- `GET /v1/fnd/markets/:market/status`: one market's status.
- `GET /v1/fnd/markets/:market/hours`: weekly trading hours.
- `GET /v1/fnd/markets/:market/calendar`: holiday calendar.
***DEX wallets***
- `GET /v1/fnd/dex/wallet/:chain/:address`: on-chain wallet portfolio.
## Worked example: search → profile → revenue series
```python
# Python, requests
import os, requests
BASE = "https://api.sifting.io"
s = requests.Session()
s.headers["X-API-Key"] = os.environ["SIFTING_API_KEY"]
s.headers["Accept-Encoding"] = "gzip" # required for financials
ticker = s.get(f"{BASE}/v1/fnd/stocks/search",
params={"q": "apple", "limit": 1}).json()["data"][0]["ticker"]
profile = s.get(f"{BASE}/v1/fnd/stocks/{ticker}/profile").json()
print(profile["name"], profile["cik"]) # cik stays "0000320193"
rev = s.get(f"{BASE}/v1/fnd/stocks/{ticker}/financials/Revenues").json()
for pt in rev["series"]:
print(pt["fiscal_year"], pt["fiscal_period"], pt["value"], pt["unit"])
```
```typescript
// JavaScript / TypeScript, fetch
const BASE = "https://api.sifting.io";
const h = { "X-API-Key": process.env.SIFTING_API_KEY!, "Accept-Encoding": "gzip" };
const found = await (await fetch(`${BASE}/v1/fnd/stocks/search?q=apple&limit=1`, { headers: h })).json();
const ticker = found.data[0].ticker;
const rev = await (await fetch(`${BASE}/v1/fnd/stocks/${ticker}/financials/Revenues`, { headers: h })).json();
for (const pt of rev.series) console.log(pt.fiscal_year, pt.fiscal_period, pt.value, pt.unit);
```
Response shape for a single concept (`/financials/:concept`):
```json
{
"ticker": "AAPL",
"cik": "0000320193",
"taxonomy": "us-gaap",
"concept": "Revenues",
"series": [
{ "value": 94836000000, "unit": "USD",
"period_start": "2024-01-01", "period_end": "2024-03-30",
"fiscal_year": 2024, "fiscal_period": "Q2",
"form": "10-Q", "accession": "0000320193-24-000089", "filed_at": "2024-05-02" }
]
}
```
## Gotchas
- Financials (bundle, concept, screener) are **gzip-required** → `406 gzip_required` without the header.
- Concepts are **CamelCase XBRL tags** (`EarningsPerShareBasic`), not human labels.
- A monetary value is always `{ value, unit }`; read the `unit` (it may be `USD/shares` or `shares`, not `USD`).
- Unknown ticker → `404 unknown_ticker`; unknown filer → `404 unknown_filer`. Don't conflate them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

