Skip to main content

Crate embassy_sec_edgar

Crate embassy_sec_edgar 

Source
Expand description

SEC EDGAR port — US Securities and Exchange Commission filings.

Sovereign integration in the embassy sense: EDGAR’s contract is part of the API surface, not implementation detail. Specifically:

  • User-Agent required — anonymous requests are blocked; the SEC requires a recognizable Reflective Labs research UA with an email contact.
  • Rate limit 10 req/sec workspace-wide. Live providers must throttle; bursty traffic from one app affects every other.
  • CIK normalization — Central Index Keys are 10-digit zero-padded; 0000320193 is Apple, not 320193. The port normalizes on input.
  • Form types are a closed vocabulary — 10-K, 10-Q, 8-K, S-1, etc. — kept open via FormType::Other(String) for the long tail.

This crate ships the typed source domain (CIK, AccessionNumber, FormType, Filing). App-specific synthesis on top (drift signals, language analysis, multi-tenant aggregation) stays in the consuming app.

Today the port ships:

  • StubSecEdgarProvider — deterministic, no network, for unit tests and CI
  • LiveSecEdgarProvider — behind the live feature; fetches SEC EDGAR over HTTP and returns typed observations through the same provider trait.

Structs§

AccessionNumber
SEC accession number — the unique filing identifier.
CallContext
Cik
Central Index Key — SEC’s unique identifier for an entity that files.
Filing
A single SEC filing — the typed source domain object.
FilingSection
A named section inside a filing (e.g., “1A” for Risk Factors).
Observation
SecEdgar
Canonical provenance marker for facts emitted by the SEC EDGAR port.
SecEdgarResponse
SecFilingPayload
Typed fact payload — one filing per fact, ready to ride the convergence kernel’s promotion machinery.
SecFilingSuggestor
Reads SecEdgarRequest facts from Seeds, dispatches them through a SecEdgarProvider, and proposes one SecFilingPayload per returned observation to Hypotheses.
StubSecEdgarProvider
Deterministic stub. Given a request, returns a canned Filing whose section bodies are derived from the request hash so two different requests produce two different filings. No network, no auth, suitable for CI and formation-loop unit tests.

Enums§

FormType
SEC form type — well-known forms enumerated, long tail via FormType::Other.
SecEdgarError
SecEdgarRequest
What a caller asks for. Two shapes:

Constants§

SEC_EDGAR_PROVENANCE
Canonical provenance const — pass to Suggestor::provenance() and ProposedFact::new(..., SEC_EDGAR_PROVENANCE.as_str()).

Traits§

SecEdgarProvider

Functions§

content_hash