pub struct TimeBar {Show 17 fields
pub template_id: i32,
pub symbol: Option<String>,
pub exchange: Option<String>,
pub type: Option<i32>,
pub period: Option<String>,
pub marker: Option<i32>,
pub num_trades: Option<u64>,
pub volume: Option<u64>,
pub bid_volume: Option<u64>,
pub ask_volume: Option<u64>,
pub open_price: Option<f64>,
pub close_price: Option<f64>,
pub high_price: Option<f64>,
pub low_price: Option<f64>,
pub settlement_price: Option<f64>,
pub has_settlement_price: Option<bool>,
pub must_clear_settlement_price: Option<bool>,
}Expand description
PB_OFFSET = 100000, is the offset added for each MNM field id
Fields§
§template_id: i32PB_OFFSET + MNM_TEMPLATE_ID
symbol: Option<String>PB_OFFSET + MNM_SYMBOL
exchange: Option<String>PB_OFFSET + MNM_EXCHANGE
type: Option<i32>PB_OFFSET + MNM_DATA_BAR_TYPE
period: Option<String>PB_OFFSET + MNM_TIME_BAR_PERIOD
marker: Option<i32>PB_OFFSET + MNM_TIME_BAR_MARKER
num_trades: Option<u64>PB_OFFSET + MNM_TIME_BAR_NUM_TRADES
volume: Option<u64>PB_OFFSET + MNM_TIME_BAR_TRADE_VOLUME
bid_volume: Option<u64>PB_OFFSET + MNM_TIME_BAR_BID_VOLUME
ask_volume: Option<u64>PB_OFFSET + MNM_TIME_BAR_ASK_VOLUME
open_price: Option<f64>PB_OFFSET + MNM_OPEN_PRICE
close_price: Option<f64>PB_OFFSET + MNM_CLOSE_TRADE_PRICE
high_price: Option<f64>PB_OFFSET + MNM_HIGH_PRICE
low_price: Option<f64>PB_OFFSET + MNM_LOW_PRICE
settlement_price: Option<f64>PB_OFFSET + MNM_SETTLEMENT_PRICE
has_settlement_price: Option<bool>PB_OFFSET + MNM_PRICING_INDICATOR
must_clear_settlement_price: Option<bool>PB_OFFSET + MNM_DISPLAY_INDICATOR
Implementations§
Source§impl TimeBar
impl TimeBar
Sourcepub fn high_price(&self) -> f64
pub fn high_price(&self) -> f64
Returns the value of high_price, or the default value if high_price is unset.
Sourcepub fn low_price(&self) -> f64
pub fn low_price(&self) -> f64
Returns the value of low_price, or the default value if low_price is unset.
Sourcepub fn open_price(&self) -> f64
pub fn open_price(&self) -> f64
Returns the value of open_price, or the default value if open_price is unset.
Sourcepub fn close_price(&self) -> f64
pub fn close_price(&self) -> f64
Returns the value of close_price, or the default value if close_price is unset.
Sourcepub fn settlement_price(&self) -> f64
pub fn settlement_price(&self) -> f64
Returns the value of settlement_price, or the default value if settlement_price is unset.
Sourcepub fn symbol(&self) -> &str
pub fn symbol(&self) -> &str
Returns the value of symbol, or the default value if symbol is unset.
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
Returns the value of exchange, or the default value if exchange is unset.
Sourcepub fn marker(&self) -> i32
pub fn marker(&self) -> i32
Returns the value of marker, or the default value if marker is unset.
Sourcepub fn num_trades(&self) -> u64
pub fn num_trades(&self) -> u64
Returns the value of num_trades, or the default value if num_trades is unset.
Sourcepub fn volume(&self) -> u64
pub fn volume(&self) -> u64
Returns the value of volume, or the default value if volume is unset.
Sourcepub fn period(&self) -> &str
pub fn period(&self) -> &str
Returns the value of period, or the default value if period is unset.
Sourcepub fn bid_volume(&self) -> u64
pub fn bid_volume(&self) -> u64
Returns the value of bid_volume, or the default value if bid_volume is unset.
Sourcepub fn ask_volume(&self) -> u64
pub fn ask_volume(&self) -> u64
Returns the value of ask_volume, or the default value if ask_volume is unset.
Sourcepub fn type(&self) -> BarType
pub fn type(&self) -> BarType
Returns the enum value of type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn has_settlement_price(&self) -> bool
pub fn has_settlement_price(&self) -> bool
Returns the value of has_settlement_price, or the default value if has_settlement_price is unset.
Sourcepub fn must_clear_settlement_price(&self) -> bool
pub fn must_clear_settlement_price(&self) -> bool
Returns the value of must_clear_settlement_price, or the default value if must_clear_settlement_price is unset.
Trait Implementations§
Source§impl Message for TimeBar
impl Message for TimeBar
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.