Skip to main content

ExecutionEngineConfig

Struct ExecutionEngineConfig 

Source
pub struct ExecutionEngineConfig {
Show 17 fields pub load_cache: bool, pub manage_own_order_books: bool, pub snapshot_orders: bool, pub snapshot_positions: bool, pub snapshot_positions_interval_secs: Option<f64>, pub carry_replay_events_on_reopen: bool, pub allow_overfills: bool, pub filter_unclaimed_external_orders: bool, pub external_clients: Option<Vec<ClientId>>, pub purge_closed_orders_interval_mins: Option<u32>, pub purge_closed_orders_buffer_mins: Option<u32>, pub purge_closed_positions_interval_mins: Option<u32>, pub purge_closed_positions_buffer_mins: Option<u32>, pub purge_account_events_interval_mins: Option<u32>, pub purge_account_events_lookback_mins: Option<u32>, pub purge_from_database: bool, pub debug: bool,
}
Expand description

Configuration for ExecutionEngine instances.

Fields§

§load_cache: bool

If the cache should be loaded on initialization.

§manage_own_order_books: bool

If the execution engine should maintain own/user order books based on commands and events.

§snapshot_orders: bool

If order state snapshot lists are persisted to a backing database. Snapshots will be taken at every order state update (when events are applied).

§snapshot_positions: bool

If position state snapshot lists are persisted to a backing database. Snapshots will be taken at position opened, changed, and closed (when events are applied).

§snapshot_positions_interval_secs: Option<f64>

The interval (seconds) at which additional position state snapshots are persisted. If None then no additional snapshots will be taken.

§carry_replay_events_on_reopen: bool

If position replay events and fill voids are carried across NETTING close/reopen cycles. Enable to keep fills from earlier cycles correctable by an OrderFillVoided.

§allow_overfills: bool

If order fills exceeding order quantity are allowed (logs warning instead of raising). Useful when position reconciliation races with exchange fill events.

§filter_unclaimed_external_orders: bool

If unclaimed venue orders should be filtered during execution reconciliation.

§external_clients: Option<Vec<ClientId>>

The client IDs declared for external stream processing.

The execution engine will not attempt to send trading commands to these client IDs, assuming an external process will consume the serialized command messages from the bus and handle execution.

§purge_closed_orders_interval_mins: Option<u32>

The interval (minutes) between purging closed orders from the in-memory cache.

§purge_closed_orders_buffer_mins: Option<u32>

The time buffer (minutes) before closed orders can be purged.

§purge_closed_positions_interval_mins: Option<u32>

The interval (minutes) between purging closed positions from the in-memory cache.

§purge_closed_positions_buffer_mins: Option<u32>

The time buffer (minutes) before closed positions can be purged.

§purge_account_events_interval_mins: Option<u32>

The interval (minutes) between purging account events from the in-memory cache.

§purge_account_events_lookback_mins: Option<u32>

The time buffer (minutes) before account events can be purged.

§purge_from_database: bool

If purge operations should also delete from the backing database.

§debug: bool

If debug mode is active (will provide extra debug logging).

Implementations§

Source§

impl ExecutionEngineConfig

Source

pub fn builder() -> ExecutionEngineConfigBuilder

Create an instance of ExecutionEngineConfig using the builder syntax

Source§

impl ExecutionEngineConfig

Source

pub fn validate(&self) -> ConfigResult<()>

Validates the execution engine configuration, collecting every field violation.

§Errors

Returns a ConfigError (a ConfigError::Multiple when more than one field is invalid) if any field fails validation.

Trait Implementations§

Source§

impl Clone for ExecutionEngineConfig

Source§

fn clone(&self) -> ExecutionEngineConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionEngineConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExecutionEngineConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ExecutionEngineConfig

Source§

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 Serialize for ExecutionEngineConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.