pub struct LastTradesData {
pub ticker: String,
pub class_code: String,
pub side: Option<String>,
pub volume: Option<Decimal>,
pub price: Decimal,
pub quantity: Decimal,
pub date_time: Option<String>,
}Expand description
One trade of the anonymous trades tape: one trade per frame.
§Examples
use brokapi_bcs_protocol::ws::models::LastTradesData;
let t: LastTradesData = serde_json::from_str(
r#"{"ticker":"SBER","classCode":"TQBR","side":"SELL","volume":30015.0,"price":300.15,"quantity":100}"#,
)?;
assert_eq!(t.side.as_deref(), Some("SELL"));Fields§
§ticker: StringTicker.
class_code: StringClass code (board).
side: Option<String>Side of the trade as text: BUY or SELL (the REST tape uses 1 and 2).
volume: Option<Decimal>Trade volume in the instrument currency.
price: DecimalTrade price.
quantity: DecimalQuantity in pieces.
date_time: Option<String>Time of the trade (UTC), kept as the text the broker sends.
Trait Implementations§
Source§impl Clone for LastTradesData
impl Clone for LastTradesData
Source§fn clone(&self) -> LastTradesData
fn clone(&self) -> LastTradesData
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 LastTradesData
impl Debug for LastTradesData
Source§impl<'de> Deserialize<'de> for LastTradesData
impl<'de> Deserialize<'de> for LastTradesData
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
Auto Trait Implementations§
impl Freeze for LastTradesData
impl RefUnwindSafe for LastTradesData
impl Send for LastTradesData
impl Sync for LastTradesData
impl Unpin for LastTradesData
impl UnsafeUnpin for LastTradesData
impl UnwindSafe for LastTradesData
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