pub struct Candle {
pub time: i64,
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub volume: f64,
}Expand description
OHLCV candle — the atomic unit of batched market data.
time is the open time of the candle in milliseconds since the UNIX epoch.
Stored as i64 (not f64) to avoid precision loss at millisecond granularity.
Fields§
§time: i64Candle open time in milliseconds since the UNIX epoch.
open: f64Open price.
high: f64High price during the bar.
low: f64Low price during the bar.
close: f64Close price.
volume: f64Traded volume in base-asset units (or contracts) during the bar.
Trait Implementations§
impl Copy for Candle
Source§impl<'de> Deserialize<'de> for Candle
impl<'de> Deserialize<'de> for Candle
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Candle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Candle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Candle
impl Serialize for Candle
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Candle
Auto Trait Implementations§
impl Freeze for Candle
impl RefUnwindSafe for Candle
impl Send for Candle
impl Sync for Candle
impl Unpin for Candle
impl UnsafeUnpin for Candle
impl UnwindSafe for Candle
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