pub struct BarMsg {Show 17 fields
pub symbol: String,
pub exchange: Exchange,
pub name: String,
pub interval: u64,
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub volume: f64,
pub buy_volume: f64,
pub sell_volume: f64,
pub trades: u64,
pub vwap: f64,
pub open_timestamp: DateTime<Utc>,
pub close_timestamp: DateTime<Utc>,
pub timestamp: DateTime<Utc>,
pub local_timestamp: DateTime<Utc>,
}
Expand description
Trades data in aggregated form, known as OHLC, candlesticks, klines etc. Not only most common time based aggregation is supported, but volume and tick count based as well. Bars are computed from tick-by-tick raw trade data, if in given interval no trades happened, there is no bar produced.
Fields§
§symbol: String
The symbol as provided by the exchange.
exchange: Exchange
The exchange ID.
name: String
name with format trade_bar
_{interval}
interval: u64
The requested trade bar interval.
open: f64
The open price.
high: f64
The high price.
low: f64
The low price.
close: f64
The close price.
volume: f64
The total volume traded in given interval.
buy_volume: f64
The buy volume traded in given interval.
sell_volume: f64
The sell volume traded in given interval.
trades: u64
The trades count in given interval.
vwap: f64
The volume weighted average price.
open_timestamp: DateTime<Utc>
The timestamp of first trade for given bar.
close_timestamp: DateTime<Utc>
The timestamp of last trade for given bar.
timestamp: DateTime<Utc>
The end of interval period timestamp.
local_timestamp: DateTime<Utc>
The message arrival timestamp that triggered given bar computation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BarMsg
impl<'de> Deserialize<'de> for BarMsg
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>,
Auto Trait Implementations§
impl Freeze for BarMsg
impl RefUnwindSafe for BarMsg
impl Send for BarMsg
impl Sync for BarMsg
impl Unpin for BarMsg
impl UnwindSafe for BarMsg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more