pub struct LiveExecutionEngine { /* private fields */ }Expand description
Live execution engine that manages execution state and reconciliation.
The LiveExecutionEngine orchestrates:
- Startup reconciliation with all venues.
- Continuous reconciliation of execution reports.
- Inflight order checking and resolution.
- Message routing between venues and the core execution engine.
Implementations§
Source§impl LiveExecutionEngine
impl LiveExecutionEngine
Sourcepub fn new(
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
msgbus: Rc<RefCell<MessageBus>>,
config: LiveExecEngineConfig,
) -> Self
pub fn new( clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, msgbus: Rc<RefCell<MessageBus>>, config: LiveExecEngineConfig, ) -> Self
Creates a new LiveExecutionEngine instance.
Sourcepub async fn start(&mut self) -> Result<()>
pub async fn start(&mut self) -> Result<()>
Starts the live execution engine.
This initiates:
- Startup reconciliation with all venues.
- Continuous reconciliation tasks.
- Message processing loops.
§Errors
Returns an error if startup reconciliation fails.
Sourcepub fn reconcile_execution_report(&mut self, report: ExecutionReport)
pub fn reconcile_execution_report(&mut self, report: ExecutionReport)
Reconciles an execution report.
Sourcepub fn handle_command(&mut self, command: TradingCommand)
pub fn handle_command(&mut self, command: TradingCommand)
Handles a trading command.
Sourcepub fn record_local_activity(&mut self, event: &OrderEventAny)
pub fn record_local_activity(&mut self, event: &OrderEventAny)
Records local order activity for reconciliation tracking.
Sourcepub fn clear_reconciliation_tracking(
&mut self,
client_order_id: &ClientOrderId,
drop_last_query: bool,
)
pub fn clear_reconciliation_tracking( &mut self, client_order_id: &ClientOrderId, drop_last_query: bool, )
Clears reconciliation tracking for an order.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Returns whether the engine is currently running.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveExecutionEngine
impl !RefUnwindSafe for LiveExecutionEngine
impl !Send for LiveExecutionEngine
impl !Sync for LiveExecutionEngine
impl Unpin for LiveExecutionEngine
impl !UnwindSafe for LiveExecutionEngine
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more