Skip to main content

finance_query/models/filings/
provider.rs

1//! Provider-based SEC filing data models (Polygon EDGAR integration).
2//!
3//! Unlike [`crate::models::filings::EdgarFiling`] which comes from the direct
4//! EDGAR adapter, these types represent the provider-agnostic canonical shape
5//! returned by the FILINGS capability through ProviderSet.
6
7use serde::{Deserialize, Serialize};
8
9/// A collection of SEC filings from a provider (e.g., Polygon EDGAR).
10///
11/// Obtain via [`Ticker::filings`](crate::Ticker::filings).
12#[derive(Debug, Clone, Serialize, Deserialize, Default)]
13#[non_exhaustive]
14pub struct ProviderFilings {
15    /// Ticker symbol these filings belong to.
16    pub symbol: String,
17    /// Individual filing entries.
18    pub filings: Vec<ProviderFiling>,
19}
20
21/// A single SEC filing entry from a provider.
22#[derive(Debug, Clone, Serialize, Deserialize, Default)]
23#[non_exhaustive]
24pub struct ProviderFiling {
25    /// SEC accession number (unique filing ID).
26    pub accession_number: Option<String>,
27    /// Filing date as `YYYY-MM-DD`.
28    pub filing_date: Option<String>,
29    /// Filing type (e.g., `"10-K"`, `"10-Q"`, `"8-K"`).
30    pub filing_type: Option<String>,
31    /// URL to the filing document.
32    pub filing_url: Option<String>,
33    /// Company name at time of filing.
34    pub company_name: Option<String>,
35    /// SEC CIK number.
36    pub cik: Option<String>,
37}