Skip to main content

finance_query/models/fundamentals/
grading_history.rs

1//! Raw per-analyst grade-action history.
2//!
3//! Served through the [`Capability::FUNDAMENTALS`](crate::Capability::FUNDAMENTALS)
4//! route; FMP and Yahoo both implement it. Distinct from the aggregated
5//! [`RatingConsensus`](super::RatingConsensus) rollup — this is the
6//! individual upgrade/downgrade events behind that rollup.
7
8use serde::{Deserialize, Serialize};
9
10/// A single analyst upgrade/downgrade/initiation action.
11#[derive(Debug, Clone, Default, Serialize, Deserialize)]
12#[non_exhaustive]
13pub struct GradingAction {
14    /// Ticker symbol.
15    pub symbol: Option<String>,
16    /// Action date (`YYYY-MM-DD`).
17    pub date: Option<String>,
18    /// The analyst firm issuing the grade.
19    pub grading_company: Option<String>,
20    /// Prior grade, if this is a change rather than an initiation.
21    pub previous_grade: Option<String>,
22    /// New grade.
23    pub new_grade: Option<String>,
24}