#[non_exhaustive]pub struct Candle {
pub ts: NumberString,
pub open: NumberString,
pub high: NumberString,
pub low: NumberString,
pub close: NumberString,
pub vol: NumberString,
pub vol_ccy: NumberString,
pub vol_ccy_quote: NumberString,
pub confirm: NumberString,
}Expand description
A single candlestick (OHLCV) bar.
On the wire OKX encodes a bar as a 9-element string array.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ts: NumberStringOpening timestamp (Unix milliseconds).
open: NumberStringOpen price.
high: NumberStringHighest price.
low: NumberStringLowest price.
close: NumberStringClose price.
vol: NumberStringTrading volume in contracts / base currency.
vol_ccy: NumberStringTrading volume in quote currency.
vol_ccy_quote: NumberStringTrading volume in quote currency (alternate calculation).
confirm: NumberString1 if the bar is closed/confirmed, 0 otherwise.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Candle
impl<'de> Deserialize<'de> for Candle
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
Source§impl From<(NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString)> for Candle
impl From<(NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString)> for Candle
Source§fn from(
raw: (NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString),
) -> Self
fn from( raw: (NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString, NumberString), ) -> Self
Converts to this type from the input type.
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