1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct TechnicalIndicator {
9 pub date: String,
11 #[serde(flatten)]
13 pub values: std::collections::HashMap<String, f64>,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(rename_all = "camelCase")]
19pub struct SmaData {
20 pub date: String,
22 pub sma: Option<f64>,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize)]
28#[serde(rename_all = "camelCase")]
29pub struct EmaData {
30 pub date: String,
32 pub ema: Option<f64>,
34}
35
36#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(rename_all = "camelCase")]
39pub struct WmaData {
40 pub date: String,
42 pub wma: Option<f64>,
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(rename_all = "camelCase")]
49pub struct DemaData {
50 pub date: String,
52 pub dema: Option<f64>,
54}
55
56#[derive(Debug, Clone, Serialize, Deserialize)]
58#[serde(rename_all = "camelCase")]
59pub struct TemaData {
60 pub date: String,
62 pub tema: Option<f64>,
64}
65
66#[derive(Debug, Clone, Serialize, Deserialize)]
68#[serde(rename_all = "camelCase")]
69pub struct RsiData {
70 pub date: String,
72 pub rsi: Option<f64>,
74}
75
76#[derive(Debug, Clone, Serialize, Deserialize)]
78#[serde(rename_all = "camelCase")]
79pub struct AdxData {
80 pub date: String,
82 pub adx: Option<f64>,
84}
85
86#[derive(Debug, Clone, Serialize, Deserialize)]
88#[serde(rename_all = "camelCase")]
89pub struct StandardizedIndicator {
90 pub date: String,
92 pub open: Option<f64>,
94 pub high: Option<f64>,
96 pub low: Option<f64>,
98 pub close: Option<f64>,
100 pub volume: Option<f64>,
102}
103
104#[derive(Debug, Clone, Serialize, Deserialize)]
106#[serde(rename_all = "camelCase")]
107pub struct WilliamsRData {
108 pub date: String,
110 pub williams_r: Option<f64>,
112}
113
114#[derive(Debug, Clone, Serialize, Deserialize)]
116#[serde(rename_all = "camelCase")]
117pub struct CciData {
118 pub date: String,
120 pub cci: Option<f64>,
122}
123
124#[derive(Debug, Clone, Serialize, Deserialize)]
126#[serde(rename_all = "camelCase")]
127pub struct MacdData {
128 pub date: String,
130 pub macd: Option<f64>,
132 pub signal: Option<f64>,
134 pub histogram: Option<f64>,
136}
137
138#[derive(Debug, Clone, Serialize, Deserialize)]
140#[serde(rename_all = "camelCase")]
141pub struct StochasticData {
142 pub date: String,
144 pub slow_k: Option<f64>,
146 pub slow_d: Option<f64>,
148}
149
150#[derive(Debug, Clone, Serialize, Deserialize)]
152#[serde(rename_all = "camelCase")]
153pub struct BollingerBandsData {
154 pub date: String,
156 pub upper_band: Option<f64>,
158 pub middle_band: Option<f64>,
160 pub lower_band: Option<f64>,
162}
163
164#[derive(Debug, Clone, Serialize, Deserialize)]
166#[serde(rename_all = "camelCase")]
167pub struct AtrData {
168 pub date: String,
170 pub atr: Option<f64>,
172}
173
174#[derive(Debug, Clone, Serialize, Deserialize)]
176#[serde(rename_all = "camelCase")]
177pub struct AroonData {
178 pub date: String,
180 pub aroon_up: Option<f64>,
182 pub aroon_down: Option<f64>,
184}