pub struct TickRecord {
pub ask: Decimal,
pub ask_volume: Option<u32>,
pub bid: Decimal,
pub bid_volume: Option<u32>,
pub high: Decimal,
pub level: u32,
pub low: Decimal,
pub spread_raw: Decimal,
pub spread_table: Decimal,
pub symbol: String,
pub timestamp: u64,
}Expand description
Structure representing market price data
Fields§
§ask: DecimalAsk price in base currency
ask_volume: Option<u32>Number of available lots to buy at given price or None if not applicable
bid: DecimalBid price in base currency
bid_volume: Option<u32>Number of available lots to sell at given price or None if not applicable
high: DecimalThe highest price of the day in base currency
level: u32Price level
low: DecimalThe lowest price of the day in base currency
spread_raw: DecimalThe difference between raw ask and bid prices
spread_table: DecimalSpread representation
symbol: StringSymbol
timestamp: u64Timestamp in UNIX time
Implementations§
Source§impl TickRecord
impl TickRecord
Sourcepub fn with_ask_volume(self, value: impl Into<u32>) -> Self
pub fn with_ask_volume(self, value: impl Into<u32>) -> Self
Sets the ask_volume field of this struct.
Sourcepub fn with_bid_volume(self, value: impl Into<u32>) -> Self
pub fn with_bid_volume(self, value: impl Into<u32>) -> Self
Sets the bid_volume field of this struct.
Sourcepub fn with_level(self, value: impl Into<u32>) -> Self
pub fn with_level(self, value: impl Into<u32>) -> Self
Sets the level field of this struct.
Sourcepub fn with_spread_raw(self, value: impl Into<Decimal>) -> Self
pub fn with_spread_raw(self, value: impl Into<Decimal>) -> Self
Sets the spread_raw field of this struct.
Sourcepub fn with_spread_table(self, value: impl Into<Decimal>) -> Self
pub fn with_spread_table(self, value: impl Into<Decimal>) -> Self
Sets the spread_table field of this struct.
Sourcepub fn with_symbol(self, value: impl Into<String>) -> Self
pub fn with_symbol(self, value: impl Into<String>) -> Self
Sets the symbol field of this struct.
Sourcepub fn with_timestamp(self, value: impl Into<u64>) -> Self
pub fn with_timestamp(self, value: impl Into<u64>) -> Self
Sets the timestamp field of this struct.
Trait Implementations§
Source§impl Clone for TickRecord
impl Clone for TickRecord
Source§fn clone(&self) -> TickRecord
fn clone(&self) -> TickRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TickRecord
impl Debug for TickRecord
Source§impl Default for TickRecord
impl Default for TickRecord
Source§fn default() -> TickRecord
fn default() -> TickRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TickRecord
impl<'de> Deserialize<'de> for TickRecord
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 PartialEq for TickRecord
impl PartialEq for TickRecord
Source§impl Serialize for TickRecord
impl Serialize for TickRecord
impl StructuralPartialEq for TickRecord
Auto Trait Implementations§
impl Freeze for TickRecord
impl RefUnwindSafe for TickRecord
impl Send for TickRecord
impl Sync for TickRecord
impl Unpin for TickRecord
impl UnsafeUnpin for TickRecord
impl UnwindSafe for TickRecord
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