pub struct BlockTrade {
pub id: String,
pub timestamp: i64,
pub trades: Vec<BlockTradeExecution>,
pub app_name: Option<String>,
pub broker_code: Option<String>,
pub broker_name: Option<String>,
}Expand description
Executed block trade
Contains the full details of an executed block trade,
returned by /private/execute_block_trade or /private/get_block_trade.
Fields§
§id: StringBlock trade ID
timestamp: i64Execution timestamp in milliseconds
trades: Vec<BlockTradeExecution>List of executed trades in this block
app_name: Option<String>Application name that executed the block trade (optional)
broker_code: Option<String>Broker code (for broker trades)
broker_name: Option<String>Broker name (for broker trades)
Implementations§
Source§impl BlockTrade
impl BlockTrade
Sourcepub fn trade_count(&self) -> usize
pub fn trade_count(&self) -> usize
Get the total number of trades in this block
Sourcepub fn is_broker_trade(&self) -> bool
pub fn is_broker_trade(&self) -> bool
Check if this is a broker-facilitated block trade
Sourcepub fn instruments(&self) -> Vec<&str>
pub fn instruments(&self) -> Vec<&str>
Get all unique instruments in this block trade
Sourcepub fn total_fees(&self) -> f64
pub fn total_fees(&self) -> f64
Calculate total fees across all trades
Trait Implementations§
Source§impl Clone for BlockTrade
impl Clone for BlockTrade
Source§fn clone(&self) -> BlockTrade
fn clone(&self) -> BlockTrade
Returns a duplicate of the value. Read more
1.0.0 · 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 BlockTrade
impl Debug for BlockTrade
Source§impl<'de> Deserialize<'de> for BlockTrade
impl<'de> Deserialize<'de> for BlockTrade
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 Display for BlockTrade
impl Display for BlockTrade
Source§impl PartialEq for BlockTrade
impl PartialEq for BlockTrade
Source§impl Serialize for BlockTrade
impl Serialize for BlockTrade
impl StructuralPartialEq for BlockTrade
Auto Trait Implementations§
impl Freeze for BlockTrade
impl RefUnwindSafe for BlockTrade
impl Send for BlockTrade
impl Sync for BlockTrade
impl Unpin for BlockTrade
impl UnsafeUnpin for BlockTrade
impl UnwindSafe for BlockTrade
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