Struct binance_client::Kline[][src]

pub struct Kline {
    pub open_time: i64,
    pub open: Decimal,
    pub high: Decimal,
    pub low: Decimal,
    pub close: Decimal,
    pub volume: Decimal,
    pub close_time: i64,
    pub quote_asset_volume: Decimal,
    pub number_of_trades: i64,
    pub taker_buy_base_asset_volume: Decimal,
    pub taker_buy_quote_asset_volume: Decimal,
    pub ignore: Decimal,
}

A single kline.

Fields

open_time: i64

The kline open time in milliseconds since Unix epoch.

open: Decimal

The kline open price.

high: Decimal

The kline high price.

low: Decimal

The kline low price.

close: Decimal

The kline close price.

volume: Decimal

The kline volume in secondary token.

close_time: i64

The kline open time in milliseconds since Unix epoch.

quote_asset_volume: Decimal

The kline volume in primary token.

number_of_trades: i64

The number of trades executed within the kline.

taker_buy_base_asset_volume: Decimal

The taker buy volume in secondary token.

taker_buy_quote_asset_volume: Decimal

The taker buy volume in primary token.

ignore: Decimal

The unknown value.

Implementations

impl Kline[src]

pub fn is_green(&self) -> bool[src]

If the kline is green, that is, close >= open.

pub fn is_red(&self) -> bool[src]

If the kline is red, that is, close < open.

pub fn middle(&self) -> Decimal[src]

The average of low and high.

pub fn middle_body(&self) -> Decimal[src]

The average of open and close.

pub fn average(&self) -> Decimal[src]

The average of open, high, low, and close.

Trait Implementations

impl Debug for Kline[src]

impl<'de> Deserialize<'de> for Kline[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Typeable for T where
    T: Any