Skip to main content

finance_query/models/corporate/
sec_filings.rs

1//! SEC Filings Module
2//!
3//! Contains recent SEC filing information (10-K, 10-Q, 8-K, etc.).
4
5use serde::{Deserialize, Serialize};
6
7/// SEC filings data
8#[derive(Default, Debug, Clone, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10#[non_exhaustive]
11pub struct SecFilings {
12    /// Maximum age of this data in seconds
13    #[serde(default)]
14    pub max_age: Option<i64>,
15
16    /// List of SEC filings
17    #[serde(default)]
18    pub filings: Vec<SecFiling>,
19}
20
21/// Individual SEC filing
22#[derive(Debug, Clone, Serialize, Deserialize)]
23#[serde(rename_all = "camelCase")]
24pub struct SecFiling {
25    /// Maximum age of this data in seconds
26    #[serde(default)]
27    pub max_age: Option<i64>,
28
29    /// Filing date (string format)
30    #[serde(default)]
31    pub date: Option<String>,
32
33    /// Filing date (epoch timestamp)
34    #[serde(default)]
35    pub epoch_date: Option<i64>,
36
37    /// Type of filing (e.g., "10-K", "10-Q", "8-K")
38    #[serde(default)]
39    #[serde(rename = "type")]
40    pub filing_type: Option<String>,
41
42    /// Title of the filing
43    #[serde(default)]
44    pub title: Option<String>,
45
46    /// URL to the Edgar filing
47    #[serde(default)]
48    pub edgar_url: Option<String>,
49
50    /// List of exhibits associated with this filing
51    #[serde(default)]
52    pub exhibits: Vec<SecExhibit>,
53}
54
55/// SEC filing exhibit
56#[derive(Debug, Clone, Serialize, Deserialize)]
57#[serde(rename_all = "camelCase")]
58pub struct SecExhibit {
59    /// Type/number of exhibit (e.g., "EX-21.1", "10-K")
60    #[serde(default)]
61    #[serde(rename = "type")]
62    pub exhibit_type: Option<String>,
63
64    /// URL to the exhibit document
65    #[serde(default)]
66    pub url: Option<String>,
67}