pub struct Candlestick {
pub timestamp: DateTime<Utc>,
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub volume: f64,
pub open_interest: Option<f64>,
}Expand description
OHLCV candlestick, normalized across all exchanges.
Prices are decimals (0.0 to 1.0). Timestamp is the period START (not end).
Serialized over the wire as RFC3339 (DateTime
Fields§
§timestamp: DateTime<Utc>Period start timestamp (UTC). lightweight-charts expects start-of-period.
open: f64§high: f64§low: f64§close: f64§volume: f64Trade volume in contracts. 0.0 if exchange doesn’t provide volume.
open_interest: Option<f64>Open interest at this candle’s close. Only available from exchanges that report it (e.g., Kalshi).
Trait Implementations§
Source§impl Clone for Candlestick
impl Clone for Candlestick
Source§fn clone(&self) -> Candlestick
fn clone(&self) -> Candlestick
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Candlestick
impl Debug for Candlestick
Source§impl<'de> Deserialize<'de> for Candlestick
impl<'de> Deserialize<'de> for Candlestick
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Candlestick
impl RefUnwindSafe for Candlestick
impl Send for Candlestick
impl Sync for Candlestick
impl Unpin for Candlestick
impl UnsafeUnpin for Candlestick
impl UnwindSafe for Candlestick
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more