Skip to main content

finance_query/models/fundamentals/
short_activity.rs

1//! Short interest, short volume, and share float models.
2//!
3//! Served through the [`Capability::FUNDAMENTALS`](crate::Capability::FUNDAMENTALS)
4//! route; Polygon is currently the only provider.
5
6use serde::{Deserialize, Serialize};
7
8/// A short-interest data point (bi-monthly settlement report).
9#[derive(Debug, Clone, Default, Serialize, Deserialize)]
10#[non_exhaustive]
11pub struct ShortInterest {
12    /// Settlement date (`YYYY-MM-DD`).
13    pub settlement_date: Option<String>,
14    /// Total shares held short at settlement.
15    pub short_interest: Option<f64>,
16    /// Average daily trading volume over the reporting period.
17    pub avg_daily_volume: Option<f64>,
18    /// Days to cover (short interest / average daily volume).
19    pub days_to_cover: Option<f64>,
20}
21
22/// A daily short-volume data point.
23#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24#[non_exhaustive]
25pub struct ShortVolume {
26    /// Trade date (`YYYY-MM-DD`).
27    pub date: Option<String>,
28    /// Shares sold short.
29    pub short_volume: Option<f64>,
30    /// Shares sold short exempt from the uptick rule.
31    pub short_exempt_volume: Option<f64>,
32    /// Total volume.
33    pub total_volume: Option<f64>,
34}
35
36/// Share float and shares outstanding.
37#[derive(Debug, Clone, Default, Serialize, Deserialize)]
38#[non_exhaustive]
39pub struct ShareFloat {
40    /// Ticker symbol.
41    pub symbol: Option<String>,
42    /// Freely tradable shares.
43    pub float_shares: Option<f64>,
44    /// Total shares outstanding, as reported by the provider. `None` when the
45    /// provider does not report it; it is never derived from `float_percent`.
46    pub outstanding_shares: Option<f64>,
47    /// Freely tradable shares as a percentage of shares outstanding (0-100).
48    pub float_percent: Option<f64>,
49    /// As-of date (`YYYY-MM-DD`).
50    pub date: Option<String>,
51}