use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ETFProfileData {
pub name: Option<String>,
#[serde(rename = "assetClass")]
pub asset_class: Option<String>,
#[serde(rename = "investmentSegment")]
pub investment_segment: Option<String>,
pub aum: Option<f64>,
pub nav: Option<f64>,
#[serde(rename = "navCurrency")]
pub nav_currency: Option<String>,
#[serde(rename = "expenseRatio")]
pub expense_ratio: Option<f64>,
#[serde(rename = "trackingIndex")]
pub tracking_index: Option<String>,
#[serde(rename = "etfCompany")]
pub etf_company: Option<String>,
pub domicile: Option<String>,
#[serde(rename = "inceptionDate")]
pub inception_date: Option<String>,
pub website: Option<String>,
pub logo: Option<String>,
pub isin: Option<String>,
pub cusip: Option<String>,
#[serde(rename = "priceToEarnings")]
pub price_to_earnings: Option<f64>,
#[serde(rename = "priceToBook")]
pub price_to_book: Option<f64>,
#[serde(rename = "avgVolume")]
pub avg_volume: Option<f64>,
pub description: Option<String>,
#[serde(rename = "isInverse")]
pub is_inverse: Option<bool>,
#[serde(rename = "isLeveraged")]
pub is_leveraged: Option<bool>,
#[serde(rename = "leverageFactor")]
pub leverage_factor: Option<f64>,
#[serde(rename = "dividendYield")]
pub dividend_yield: Option<f64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ETFProfile {
pub symbol: String,
pub profile: ETFProfileData,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ETFHolding {
pub symbol: Option<String>,
pub name: Option<String>,
pub isin: Option<String>,
pub cusip: Option<String>,
pub share: Option<f64>,
pub percent: Option<f64>,
pub value: Option<f64>,
#[serde(rename = "assetType")]
pub asset_type: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ETFHoldings {
pub symbol: String,
#[serde(rename = "atDate")]
pub at_date: Option<String>,
pub holdings: Vec<ETFHolding>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CountryExposure {
pub country: String,
pub exposure: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ETFCountryExposure {
pub symbol: String,
#[serde(rename = "countryExposure")]
pub country_exposure: Vec<CountryExposure>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SectorExposure {
#[serde(rename = "industry")]
pub sector: String,
pub exposure: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ETFSectorExposure {
pub symbol: String,
#[serde(rename = "sectorExposure")]
pub sector_exposure: Vec<SectorExposure>,
}