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: boolIf the cache should be loaded on initialization.
manage_own_order_books: boolIf the execution engine should maintain own/user order books based on commands and events.
snapshot_orders: boolIf 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: boolIf 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: boolIf 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: boolIf 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: boolIf 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: boolIf purge operations should also delete from the backing database.
debug: boolIf debug mode is active (will provide extra debug logging).
Implementations§
Source§impl ExecutionEngineConfig
impl ExecutionEngineConfig
Sourcepub fn builder() -> ExecutionEngineConfigBuilder
pub fn builder() -> ExecutionEngineConfigBuilder
Create an instance of ExecutionEngineConfig using the builder syntax
Source§impl ExecutionEngineConfig
impl ExecutionEngineConfig
Sourcepub fn validate(&self) -> ConfigResult<()>
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
impl Clone for ExecutionEngineConfig
Source§fn clone(&self) -> ExecutionEngineConfig
fn clone(&self) -> ExecutionEngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more