Skip to main content

finance_query/models/corporate/
institution_ownership.rs

1//! Institution Ownership Module
2//!
3//! Contains data about institutional ownership (mutual funds, pension funds, etc.).
4
5use serde::{Deserialize, Serialize};
6
7/// Institutional ownership data
8#[derive(Default, Debug, Clone, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10#[non_exhaustive]
11pub struct InstitutionOwnership {
12    /// Maximum age of this data in seconds
13    #[serde(default)]
14    pub max_age: Option<i64>,
15
16    /// List of institutional owners
17    #[serde(default)]
18    pub ownership_list: Vec<InstitutionOwner>,
19}
20
21/// Individual institutional owner
22#[derive(Debug, Clone, Serialize, Deserialize)]
23#[serde(rename_all = "camelCase")]
24pub struct InstitutionOwner {
25    /// Maximum age of this data in seconds
26    #[serde(default)]
27    pub max_age: Option<i64>,
28
29    /// Name of the organization
30    #[serde(default)]
31    pub organization: Option<String>,
32
33    /// Percentage of shares held
34    #[serde(default)]
35    pub pct_held: Option<crate::models::quote::FormattedValue<f64>>,
36
37    /// Number of shares held
38    #[serde(default)]
39    pub position: Option<crate::models::quote::FormattedValue<i64>>,
40
41    /// Total value of holdings
42    #[serde(default)]
43    pub value: Option<crate::models::quote::FormattedValue<i64>>,
44
45    /// Percentage change in position
46    #[serde(default)]
47    pub pct_change: Option<crate::models::quote::FormattedValue<f64>>,
48
49    /// Date of report
50    #[serde(default)]
51    pub report_date: Option<crate::models::quote::FormattedValue<i64>>,
52}