pub struct EngineState { /* private fields */ }Expand description
In-memory engine state used by the facade.
Implementations§
Source§impl EngineState
impl EngineState
pub fn new( venue: Venue, product: Product, state_policy: StatePolicy, instruments: impl IntoIterator<Item = InstrumentSpec>, ) -> Self
pub fn apply_public_event(&mut self, event: PublicLaneEvent) -> Result<()>
pub fn apply_private_event(&mut self, event: PrivateLaneEvent)
pub fn apply_command_receipt(&mut self, receipt: &CommandReceipt)
pub fn replace_instruments( &mut self, instruments: impl IntoIterator<Item = InstrumentSpec>, )
pub fn replace_account_snapshot(&mut self, snapshot: AccountSnapshot)
pub fn replace_positions(&mut self, positions: Vec<Position>)
pub fn replace_open_orders(&mut self, open_orders: Vec<Order>)
pub fn merge_order_history(&mut self, orders: Vec<Order>)
pub fn merge_executions(&mut self, executions: Vec<Execution>)
pub fn apply_private_snapshot(&mut self, snapshot: PrivateSnapshot)
pub fn apply_reconcile_report(&mut self, report: &ReconcileReport)
pub fn mark_rest_success(&mut self, clock_skew_ms: Option<i64>)
pub fn mark_public_disconnect(&mut self)
pub fn mark_private_disconnect(&mut self)
pub fn mark_reconnect(&mut self)
pub fn mark_snapshot_age(&mut self, age_ms: u64, stale_after_ms: u64)
pub fn ticker(&self, instrument_id: &InstrumentId) -> Option<&Ticker>
pub fn recent_trades( &self, instrument_id: &InstrumentId, ) -> Option<Vec<TradeTick>>
pub fn book_top(&self, instrument_id: &InstrumentId) -> Option<&BookTop>
pub fn funding_rate(&self, instrument_id: &InstrumentId) -> Option<&FundingRate>
pub fn mark_price(&self, instrument_id: &InstrumentId) -> Option<&MarkPrice>
pub fn open_interest( &self, instrument_id: &InstrumentId, ) -> Option<&OpenInterest>
pub fn liquidations( &self, instrument_id: &InstrumentId, ) -> Option<Vec<Liquidation>>
pub fn balances(&self) -> Vec<Balance>
pub fn account_summary(&self) -> Option<AccountSummary>
pub fn positions(&self) -> Vec<Position>
pub fn orders(&self) -> Vec<Order>
pub fn open_orders(&self) -> Vec<Order>
pub fn executions(&self) -> Vec<Execution>
pub fn latest_order_update_at( &self, instrument_id: &InstrumentId, ) -> Option<TimestampMs>
pub fn latest_execution_at( &self, instrument_id: &InstrumentId, ) -> Option<TimestampMs>
pub const fn health(&self) -> &HealthReport
pub fn instrument_specs(&self) -> Vec<InstrumentSpec>
pub const fn venue(&self) -> Venue
pub const fn product(&self) -> Product
Trait Implementations§
Source§impl Clone for EngineState
impl Clone for EngineState
Source§fn clone(&self) -> EngineState
fn clone(&self) -> EngineState
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 moreAuto Trait Implementations§
impl Freeze for EngineState
impl RefUnwindSafe for EngineState
impl Send for EngineState
impl Sync for EngineState
impl Unpin for EngineState
impl UnsafeUnpin for EngineState
impl UnwindSafe for EngineState
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