pub struct ReconciliationManager { /* private fields */ }
Expand description
Manager for reconciling execution state between local cache and venues.
The ReconciliationManager
handles:
- Startup reconciliation to align state on system start
- Continuous reconciliation of inflight orders
- External order discovery and claiming
- Fill report processing and validation
Implementations§
Source§impl ReconciliationManager
impl ReconciliationManager
Sourcepub fn new(
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
config: ReconciliationConfig,
) -> Self
pub fn new( clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, config: ReconciliationConfig, ) -> Self
Creates a new ReconciliationManager
instance.
Sourcepub async fn reconcile_execution_mass_status(
&mut self,
mass_status: ExecutionMassStatus,
) -> Vec<OrderEventAny>
pub async fn reconcile_execution_mass_status( &mut self, mass_status: ExecutionMassStatus, ) -> Vec<OrderEventAny>
Reconciles orders and fills from a mass status report.
Sourcepub fn reconcile_report(
&mut self,
report: ExecutionReport,
) -> Vec<OrderEventAny>
pub fn reconcile_report( &mut self, report: ExecutionReport, ) -> Vec<OrderEventAny>
Reconciles a single execution report during runtime.
Sourcepub fn check_inflight_orders(&mut self) -> Vec<OrderEventAny>
pub fn check_inflight_orders(&mut self) -> Vec<OrderEventAny>
Checks inflight orders and returns events for any that need reconciliation.
Sourcepub async fn check_open_orders(&mut self) -> Vec<OrderEventAny>
pub async fn check_open_orders(&mut self) -> Vec<OrderEventAny>
Checks open orders against the venue state.
Sourcepub fn register_inflight(&mut self, client_order_id: ClientOrderId)
pub fn register_inflight(&mut self, client_order_id: ClientOrderId)
Registers an order as inflight for tracking.
Sourcepub fn claim_external_orders(
&mut self,
instrument_id: InstrumentId,
strategy_id: StrategyId,
)
pub fn claim_external_orders( &mut self, instrument_id: InstrumentId, strategy_id: StrategyId, )
Claims external orders for a specific strategy and instrument.
Trait Implementations§
Source§impl Clone for ReconciliationManager
impl Clone for ReconciliationManager
Source§fn clone(&self) -> ReconciliationManager
fn clone(&self) -> ReconciliationManager
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 ReconciliationManager
impl !RefUnwindSafe for ReconciliationManager
impl !Send for ReconciliationManager
impl !Sync for ReconciliationManager
impl Unpin for ReconciliationManager
impl !UnwindSafe for ReconciliationManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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