pub struct LiveExecutionEngineConfig {Show 39 fields
pub load_cache: bool,
pub snapshot_orders: bool,
pub snapshot_positions: bool,
pub snapshot_positions_interval_secs: Option<f64>,
pub external_clients: Option<Vec<ClientId>>,
pub debug: bool,
pub reconciliation: bool,
pub reconciliation_startup_delay_secs: f64,
pub reconciliation_lookback_mins: Option<u32>,
pub reconciliation_instrument_ids: Option<Vec<String>>,
pub filter_unclaimed_external_orders: bool,
pub filter_position_reports: bool,
pub filtered_client_order_ids: Option<Vec<String>>,
pub generate_missing_orders: bool,
pub inflight_check_interval_ms: u32,
pub inflight_check_threshold_ms: u32,
pub inflight_check_retries: u32,
pub open_check_interval_secs: Option<f64>,
pub open_check_lookback_mins: Option<u32>,
pub open_check_threshold_ms: u32,
pub open_check_missing_retries: u32,
pub open_check_open_only: bool,
pub max_single_order_queries_per_cycle: u32,
pub single_order_query_delay_ms: u32,
pub position_check_interval_secs: Option<f64>,
pub position_check_lookback_mins: u32,
pub position_check_threshold_ms: u32,
pub position_check_retries: u32,
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 own_books_audit_interval_secs: Option<f64>,
pub qsize: u32,
pub allow_overfills: bool,
pub manage_own_order_books: bool,
}Expand description
Configuration for live execution engines.
Fields§
§load_cache: boolIf the cache should be loaded on initialization.
snapshot_orders: boolIf order state snapshots should be persisted to a configured cache database.
Snapshots are persisted during order submission processing and after each state change.
snapshot_positions: boolIf position state snapshots should be published and, with cache backing, persisted.
Snapshots are published when positions open, change, or close. A configured cache database backing also persists them.
snapshot_positions_interval_secs: Option<f64>The interval (seconds) at which additional position state snapshots are published and,
with cache backing, persisted.
If None then no additional snapshots will be taken.
external_clients: Option<Vec<ClientId>>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 consumes them from the bus.
debug: boolIf debug mode is active (will provide extra debug logging).
reconciliation: boolIf reconciliation is active at start-up.
reconciliation_startup_delay_secs: f64The delay (seconds) before starting reconciliation at startup.
reconciliation_lookback_mins: Option<u32>The maximum lookback minutes to reconcile state for.
reconciliation_instrument_ids: Option<Vec<String>>Specific instrument IDs to reconcile (if None, reconciles all).
filter_unclaimed_external_orders: boolIf unclaimed order events with an EXTERNAL strategy ID should be filtered/dropped.
filter_position_reports: boolIf position status reports are filtered from reconciliation.
filtered_client_order_ids: Option<Vec<String>>Client order IDs to filter from reconciliation.
generate_missing_orders: boolIf MARKET order events will be generated during reconciliation to align discrepancies.
inflight_check_interval_ms: u32The interval (milliseconds) between checking whether in-flight orders have exceeded their threshold.
inflight_check_threshold_ms: u32The threshold (milliseconds) beyond which an in-flight order’s status is checked with the venue.
inflight_check_retries: u32The number of retry attempts for verifying in-flight order status.
open_check_interval_secs: Option<f64>The interval (seconds) between checks for open orders at the venue.
open_check_lookback_mins: Option<u32>The lookback minutes for open order checks.
When None, the check is unbounded (no time filter).
open_check_threshold_ms: u32The minimum elapsed time (milliseconds) since an order update before acting on discrepancies.
open_check_missing_retries: u32The number of retries for missing open orders.
open_check_open_only: boolIf the check_open_orders requests only currently open orders from the venue.
max_single_order_queries_per_cycle: u32The maximum number of single-order queries per consistency check cycle.
single_order_query_delay_ms: u32The delay (milliseconds) between consecutive single-order queries.
position_check_interval_secs: Option<f64>The interval (seconds) between checks for open positions at the venue.
position_check_lookback_mins: u32The lookback minutes for position consistency checks.
position_check_threshold_ms: u32The minimum elapsed time (milliseconds) since a position update before acting on discrepancies.
position_check_retries: u32The maximum number of reconciliation attempts for a position discrepancy.
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.
own_books_audit_interval_secs: Option<f64>The interval (seconds) between auditing own books against public order books.
qsize: u32The queue size for the engine’s internal queue buffers.
allow_overfills: boolIf order fills exceeding order quantity are allowed (logs warning instead of raising). Useful when position reconciliation races with exchange fill events.
manage_own_order_books: boolIf the execution engine should maintain own/user order books based on commands and events.
Implementations§
Source§impl LiveExecutionEngineConfig
impl LiveExecutionEngineConfig
Sourcepub fn builder() -> LiveExecutionEngineConfigBuilder
pub fn builder() -> LiveExecutionEngineConfigBuilder
Create an instance of LiveExecutionEngineConfig using the builder syntax
Trait Implementations§
Source§impl Clone for LiveExecutionEngineConfig
impl Clone for LiveExecutionEngineConfig
Source§fn clone(&self) -> LiveExecutionEngineConfig
fn clone(&self) -> LiveExecutionEngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LiveExecutionEngineConfig
impl Debug for LiveExecutionEngineConfig
Source§impl Default for LiveExecutionEngineConfig
impl Default for LiveExecutionEngineConfig
impl DerefToPyAny for LiveExecutionEngineConfig
Source§impl<'de> Deserialize<'de> for LiveExecutionEngineConfigwhere
LiveExecutionEngineConfig: Default,
impl<'de> Deserialize<'de> for LiveExecutionEngineConfigwhere
LiveExecutionEngineConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&LiveExecutionEngineConfig> for ExecutionManagerConfig
impl From<&LiveExecutionEngineConfig> for ExecutionManagerConfig
Source§fn from(config: &LiveExecutionEngineConfig) -> Self
fn from(config: &LiveExecutionEngineConfig) -> Self
Source§impl From<LiveExecutionEngineConfig> for ExecutionEngineConfig
impl From<LiveExecutionEngineConfig> for ExecutionEngineConfig
Source§fn from(config: LiveExecutionEngineConfig) -> Self
fn from(config: LiveExecutionEngineConfig) -> Self
Source§impl<'a, 'py> FromPyObject<'a, 'py> for LiveExecutionEngineConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for LiveExecutionEngineConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for LiveExecutionEngineConfig
impl<'py> IntoPyObject<'py> for LiveExecutionEngineConfig
Source§type Target = LiveExecutionEngineConfig
type Target = LiveExecutionEngineConfig
Source§type Output = Bound<'py, <LiveExecutionEngineConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <LiveExecutionEngineConfig as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for LiveExecutionEngineConfig
impl PyClass for LiveExecutionEngineConfig
Source§impl PyClassImpl for LiveExecutionEngineConfig
impl PyClassImpl for LiveExecutionEngineConfig
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Configuration for live execution engines.
const RAW_DOC: &'static CStr = /// Configuration for live execution engines.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<LiveExecutionEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LiveExecutionEngineConfig>
type Layout = <<LiveExecutionEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LiveExecutionEngineConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForLiveExecutionEngineConfig
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for LiveExecutionEngineConfig
impl PyClassNewTextSignature for LiveExecutionEngineConfig
const TEXT_SIGNATURE: &'static str = "(load_cache=None, manage_own_order_books=None, snapshot_positions_interval_secs=None, external_clients=None, allow_overfills=None, reconciliation=None, reconciliation_startup_delay_secs=None, reconciliation_lookback_mins=None, reconciliation_instrument_ids=None, filter_unclaimed_external_orders=None, filter_position_reports=None, filtered_client_order_ids=None, generate_missing_orders=None, inflight_check_interval_ms=None, inflight_check_threshold_ms=None, inflight_check_retries=None, open_check_interval_secs=None, open_check_lookback_mins=None, open_check_threshold_ms=None, open_check_missing_retries=None, open_check_open_only=None, max_single_order_queries_per_cycle=None, single_order_query_delay_ms=None, position_check_interval_secs=None, position_check_lookback_mins=None, position_check_threshold_ms=None, position_check_retries=None, purge_closed_orders_interval_mins=None, purge_closed_orders_buffer_mins=None, purge_closed_positions_interval_mins=None, purge_closed_positions_buffer_mins=None, purge_account_events_interval_mins=None, purge_account_events_lookback_mins=None, own_books_audit_interval_secs=None, debug=None, snapshot_orders=None, snapshot_positions=None)"
Source§impl PyStubType for LiveExecutionEngineConfig
impl PyStubType for LiveExecutionEngineConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for LiveExecutionEngineConfig
impl PyTypeInfo for LiveExecutionEngineConfig
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.impl StructuralPartialEq for LiveExecutionEngineConfig
Auto Trait Implementations§
impl Freeze for LiveExecutionEngineConfig
impl RefUnwindSafe for LiveExecutionEngineConfig
impl Send for LiveExecutionEngineConfig
impl Sync for LiveExecutionEngineConfig
impl Unpin for LiveExecutionEngineConfig
impl UnsafeUnpin for LiveExecutionEngineConfig
impl UnwindSafe for LiveExecutionEngineConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
self into a [Py<PyAny>] when the underlying conversion is infallible.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more