fmp_rust_sdk/models/
prices.rs1use chrono::{NaiveDate, NaiveDateTime};
4use serde::{Deserialize, Serialize};
5
6#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
8#[serde(rename_all = "camelCase")]
9pub struct HistoricalPrice {
10 #[serde(deserialize_with = "super::non_empty_string")]
11 pub symbol: String,
12 pub date: NaiveDate,
13 pub open: f64,
14 pub high: f64,
15 pub low: f64,
16 pub close: f64,
17 pub volume: f64,
18 pub change: Option<f64>,
19 pub change_percent: Option<f64>,
20 pub vwap: Option<f64>,
21}
22
23#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
25pub struct HistoricalPriceLight {
26 #[serde(deserialize_with = "super::non_empty_string")]
27 pub symbol: String,
28 pub date: NaiveDate,
29 pub price: f64,
30 pub volume: Option<f64>,
31}
32
33#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
35pub struct IntradayPrice {
36 #[serde(with = "super::timestamp")]
38 pub date: NaiveDateTime,
39 pub open: f64,
40 pub high: f64,
41 pub low: f64,
42 pub close: f64,
43 pub volume: f64,
44}