pub struct FutureExecutor {
pub fills: Vec<RecordedFill>,
pub pending_order_lifecycle: Vec<PendingOrderLifecycleEvent>,
pub close_events: Vec<CloseEvent>,
pub completed_positions: Vec<CompletedPosition>,
pub trade_log: Vec<TradeResult>,
/* private fields */
}Expand description
Accounting adapter for quote-authoritative FutureQuoteV1 execution.
Fields§
§fills: Vec<RecordedFill>§pending_order_lifecycle: Vec<PendingOrderLifecycleEvent>§close_events: Vec<CloseEvent>§completed_positions: Vec<CompletedPosition>§trade_log: Vec<TradeResult>Implementations§
Source§impl FutureExecutor
impl FutureExecutor
pub fn new( initial_balance: f64, contract_sizes: HashMap<String, f64>, pnl_epsilon: f64, ) -> Self
pub fn with_currency_plan(self, currency_plan: Option<RunCurrencyPlan>) -> Self
pub fn balance(&self) -> f64
pub fn realized_pnl(&self) -> f64
pub fn has_close(&self, position_id: &str) -> bool
pub fn pending_metadata( &self, position_id: &str, ) -> Option<(String, NaiveDateTime, NaiveDateTime)>
pub fn open_snapshots(&self) -> Vec<OpenPositionSnapshot>
Sourcepub fn finalize_pending_orders_at_end(&mut self, terminal_ts: NaiveDateTime)
pub fn finalize_pending_orders_at_end(&mut self, terminal_ts: NaiveDateTime)
Mark every still-pending order as unfilled at the deterministic end of the accepted quote stream. Pending snapshots remain available separately.
Trait Implementations§
Source§impl Clone for FutureExecutor
impl Clone for FutureExecutor
Source§fn clone(&self) -> FutureExecutor
fn clone(&self) -> FutureExecutor
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 moreAuto Trait Implementations§
impl Freeze for FutureExecutor
impl RefUnwindSafe for FutureExecutor
impl Send for FutureExecutor
impl Sync for FutureExecutor
impl Unpin for FutureExecutor
impl UnsafeUnpin for FutureExecutor
impl UnwindSafe for FutureExecutor
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