Skip to main content

Module edgar

Module edgar 

Source
Expand description

SEC EDGAR API client for filing history, XBRL data, and full-text search. SEC EDGAR API client.

Provides access to SEC EDGAR data including filing history, structured XBRL financial data, and full-text search.

All requests are rate-limited to 10 per second as required by SEC. Rate limiting and CIK caching are managed via a process-global singleton.

§Quick Start

Initialize once at application startup, then use anywhere:

use finance_query::edgar;

// Initialize once (required)
edgar::init("user@example.com")?;

// Use anywhere
let cik = edgar::resolve_cik("AAPL").await?;
let submissions = edgar::submissions(cik).await?;
let facts = edgar::company_facts(cik).await?;

// Search filings
let results = edgar::search(
    "artificial intelligence",
    Some(&["10-K"]),
    Some("2024-01-01"),
    None,
    None,
    None,
).await?;

Functions§

company_facts
Fetch structured XBRL financial data for a CIK.
filing_index
Fetch the filing index for a specific accession number.
init
Initialize the global EDGAR client with a contact email.
init_with_config
Initialize the global EDGAR client with full configuration.
resolve_cik
Resolve a ticker symbol to its SEC CIK number.
search
Search SEC EDGAR filings by text content.
submissions
Fetch filing history and company metadata for a CIK.