fmp_rs/models/
sec_filings.rs

1//! Models for SEC filings endpoints
2
3use serde::{Deserialize, Serialize};
4
5/// SEC Filing information
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct SecFiling {
9    /// Stock symbol
10    pub symbol: String,
11    /// CIK number
12    pub cik: Option<String>,
13    /// Accepted date
14    pub accepted_date: Option<String>,
15    /// Filing date
16    pub filing_date: Option<String>,
17    /// Report date
18    pub report_date: Option<String>,
19    /// Form type (e.g., "10-K", "10-Q", "8-K")
20    #[serde(rename = "type")]
21    pub filing_type: Option<String>,
22    /// Document link
23    pub link: Option<String>,
24    /// Final link
25    pub final_link: Option<String>,
26}
27
28/// RSS Feed item for SEC filings
29#[derive(Debug, Clone, Serialize, Deserialize)]
30#[serde(rename_all = "camelCase")]
31pub struct SecFilingRss {
32    /// Filing title
33    pub title: Option<String>,
34    /// Publication date
35    pub date: Option<String>,
36    /// Link to filing
37    pub link: Option<String>,
38    /// Stock symbol
39    pub symbol: Option<String>,
40    /// CIK number
41    pub cik: Option<String>,
42    /// Form type
43    pub form_type: Option<String>,
44}
45
46/// Form 13F filing data (institutional holdings)
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(rename_all = "camelCase")]
49pub struct Form13F {
50    /// Filing date
51    pub date: Option<String>,
52    /// Date submitted
53    pub date_submitted: Option<String>,
54    /// CIK number
55    pub cik: Option<String>,
56    /// Cusip
57    pub cusip: Option<String>,
58    /// Stock symbol
59    pub symbol: Option<String>,
60    /// Company name
61    pub name_of_issuer: Option<String>,
62    /// Number of shares
63    pub shares: Option<i64>,
64    /// Market value
65    pub market_value: Option<f64>,
66    /// Share price calculation
67    pub share_price_calc: Option<f64>,
68}
69
70/// Insider ownership from Form 3, 4, 5
71#[derive(Debug, Clone, Serialize, Deserialize)]
72#[serde(rename_all = "camelCase")]
73pub struct InsiderOwnership {
74    /// Filing date
75    pub filing_date: Option<String>,
76    /// Transaction date
77    pub transaction_date: Option<String>,
78    /// Stock symbol
79    pub symbol: String,
80    /// CIK number
81    pub cik: Option<String>,
82    /// Reporting owner name
83    pub reporting_name: Option<String>,
84    /// Transaction type
85    pub transaction_type: Option<String>,
86    /// Securities owned
87    pub securities_owned: Option<i64>,
88    /// Securities transacted
89    pub securities_transacted: Option<i64>,
90    /// Transaction price per share
91    pub price: Option<f64>,
92    /// Link to filing
93    pub link: Option<String>,
94}
95
96/// Form 4 filing (Statement of Changes in Beneficial Ownership)
97#[derive(Debug, Clone, Serialize, Deserialize)]
98#[serde(rename_all = "camelCase")]
99pub struct Form4 {
100    /// Accepted date
101    pub accepted_date: Option<String>,
102    /// Filing date
103    pub filing_date: Option<String>,
104    /// Transaction date
105    pub transaction_date: Option<String>,
106    /// Stock symbol
107    pub symbol: String,
108    /// CIK number
109    pub cik: Option<String>,
110    /// Reporting name
111    pub reporting_name: Option<String>,
112    /// Transaction type
113    pub transaction_type: Option<String>,
114    /// Securities transacted
115    pub securities_transacted: Option<f64>,
116    /// Transaction price
117    pub price: Option<f64>,
118    /// Securities owned
119    pub securities_owned: Option<f64>,
120    /// Link to filing
121    pub link: Option<String>,
122}
123
124/// CIK search result
125#[derive(Debug, Clone, Serialize, Deserialize)]
126#[serde(rename_all = "camelCase")]
127pub struct CikSearch {
128    /// CIK number
129    pub cik: String,
130    /// Company name
131    pub name: Option<String>,
132}
133
134/// Company name by CIK
135#[derive(Debug, Clone, Serialize, Deserialize)]
136#[serde(rename_all = "camelCase")]
137pub struct CompanyName {
138    /// CIK number
139    pub cik: String,
140    /// Company name
141    pub name: String,
142}