use serde::Deserialize;
use std::collections::HashMap;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ScanPattern {
pub patternname: String,
pub patterntype: String,
pub symbol: String,
pub status: String,
pub aprice: f64,
pub atime: i64,
pub bprice: f64,
pub btime: i64,
pub cprice: f64,
pub ctime: i64,
pub dprice: f64,
pub dtime: i64,
pub entry: f64,
pub stoploss: f64,
pub profit1: f64,
pub profit2: f64,
pub sort_time: i64,
#[serde(flatten)]
pub additional_fields: HashMap<String, serde_json::Value>,
}
#[derive(Debug, Deserialize)]
pub struct PatternRecognition {
pub points: Vec<ScanPattern>,
}
#[derive(Debug, Deserialize)]
pub struct SupportResistance {
pub levels: Vec<f64>,
}
#[derive(Debug, Deserialize)]
pub struct IndicatorCount {
pub buy: i64,
pub neutral: i64,
pub sell: i64,
}
#[derive(Debug, Deserialize)]
pub struct TechnicalAnalysis {
pub count: IndicatorCount,
pub signal: String,
}
#[derive(Debug, Deserialize)]
pub struct Trend {
pub adx: f64,
pub trending: bool,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AggregateIndicators {
pub technical_analysis: TechnicalAnalysis,
pub trend: Trend,
}