hyper_ta/candle.rs
1use serde::{Deserialize, Serialize};
2
3/// A single OHLCV candle.
4///
5/// This is a pure-data struct with no framework dependencies.
6/// The `time` field is epoch seconds (compatible with Lightweight Charts).
7#[derive(Debug, Clone, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct Candle {
10 /// Candle open time as epoch seconds.
11 pub time: u64,
12 pub open: f64,
13 pub high: f64,
14 pub low: f64,
15 pub close: f64,
16 pub volume: f64,
17}