Skip to main content

LiveExecEngineConfig

Struct LiveExecEngineConfig 

Source
pub struct LiveExecEngineConfig {
Show 40 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 graceful_shutdown_on_error: bool, pub qsize: u32, pub allow_overfills: bool, pub manage_own_order_books: bool,
}
Expand description

Configuration for live execution engines.

Fields§

§load_cache: bool

If the cache should be loaded on initialization.

§snapshot_orders: bool

If order state snapshot lists should be persisted to a backing database.

Not implemented on the current live runtime; validate_runtime_support rejects any value other than the default because the live kernel does not yet wire a cache database adapter.

§snapshot_positions: bool

If position state snapshot lists should be persisted to a backing database.

Not implemented on the current live runtime; validate_runtime_support rejects any value other than the default because the live kernel does not yet wire a cache database adapter.

§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.

§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: bool

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

§reconciliation: bool

If reconciliation is active at start-up.

§reconciliation_startup_delay_secs: f64

The 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: bool

If unclaimed order events with an EXTERNAL strategy ID should be filtered/dropped.

§filter_position_reports: bool

If position status reports are filtered from reconciliation.

§filtered_client_order_ids: Option<Vec<String>>

Client order IDs to filter from reconciliation.

§generate_missing_orders: bool

If MARKET order events will be generated during reconciliation to align discrepancies.

§inflight_check_interval_ms: u32

The interval (milliseconds) between checking whether in-flight orders have exceeded their threshold.

§inflight_check_threshold_ms: u32

The threshold (milliseconds) beyond which an in-flight order’s status is checked with the venue.

§inflight_check_retries: u32

The 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: u32

The minimum elapsed time (milliseconds) since an order update before acting on discrepancies.

§open_check_missing_retries: u32

The number of retries for missing open orders.

§open_check_open_only: bool

If the check_open_orders requests only currently open orders from the venue.

§max_single_order_queries_per_cycle: u32

The maximum number of single-order queries per consistency check cycle.

§single_order_query_delay_ms: u32

The 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: u32

The lookback minutes for position consistency checks.

§position_check_threshold_ms: u32

The minimum elapsed time (milliseconds) since a position update before acting on discrepancies.

§position_check_retries: u32

The 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: bool

If 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.

§graceful_shutdown_on_error: bool

If the engine should gracefully shutdown when queue processing encounters unexpected errors.

§qsize: u32

The queue size for the engine’s internal queue buffers.

§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.

§manage_own_order_books: bool

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

Implementations§

Source§

impl LiveExecEngineConfig

Source

pub fn builder() -> LiveExecEngineConfigBuilder

Create an instance of LiveExecEngineConfig using the builder syntax

Trait Implementations§

Source§

impl Clone for LiveExecEngineConfig

Source§

fn clone(&self) -> LiveExecEngineConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveExecEngineConfig

Source§

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

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

impl Default for LiveExecEngineConfig

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for LiveExecEngineConfig

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 From<&LiveExecEngineConfig> for ExecutionManagerConfig

Source§

fn from(config: &LiveExecEngineConfig) -> Self

Converts to this type from the input type.
Source§

impl From<LiveExecEngineConfig> for ExecutionEngineConfig

Source§

fn from(config: LiveExecEngineConfig) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'py> FromPyObject<'a, 'py> for LiveExecEngineConfig
where Self: Clone,

Source§

type Error = PyClassGuardError<'a, 'py>

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

fn extract( obj: Borrowed<'a, 'py, PyAny>, ) -> Result<Self, <Self as FromPyObject<'a, 'py>>::Error>

Extracts Self from the bound smart pointer obj. Read more
Source§

impl<'py> IntoPyObject<'py> for LiveExecEngineConfig

Source§

type Target = LiveExecEngineConfig

The Python output type
Source§

type Output = Bound<'py, <LiveExecEngineConfig as IntoPyObject<'py>>::Target>

The smart pointer type to use. Read more
Source§

type Error = PyErr

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

fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>

Performs the conversion.
Source§

impl PartialEq for LiveExecEngineConfig

Source§

fn eq(&self, other: &LiveExecEngineConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PyClass for LiveExecEngineConfig

Source§

const NAME: &str = "LiveExecEngineConfig"

Name of the class. Read more
Source§

type Frozen = False

Whether the pyclass is frozen. Read more
Source§

impl PyClassImpl for LiveExecEngineConfig

Source§

const MODULE: Option<&str>

Module which the class will be associated with. Read more
Source§

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

const IS_IMMUTABLE_TYPE: bool = false

#[pyclass(immutable_type)]
Source§

const RAW_DOC: &'static CStr = /// Configuration for live execution engines.

Docstring for the class provided on the struct or enum. Read more
Source§

const DOC: &'static CStr

Fully rendered class doc, including the text_signature if a constructor is defined. Read more
Source§

type Layout = <<LiveExecEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LiveExecEngineConfig>

Description of how this class is laid out in memory
Source§

type BaseType = PyAny

Base class
Source§

type ThreadChecker = NoopThreadChecker

This handles following two situations: Read more
Source§

type Inventory = Pyo3MethodsInventoryForLiveExecEngineConfig

Source§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

§

fn dict_offset() -> Option<PyObjectOffset>

Used to provide the dictoffset slot (equivalent to tp_dictoffset)
§

fn weaklist_offset() -> Option<PyObjectOffset>

Used to provide the weaklistoffset slot (equivalent to tp_weaklistoffset
Source§

impl PyClassNewTextSignature for LiveExecEngineConfig

Source§

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)"

Source§

impl PyStubType for LiveExecEngineConfig

Source§

fn type_output() -> TypeInfo

The type to be used in the output signature, i.e. return type of the Python function or methods.
§

fn type_input() -> TypeInfo

The type to be used in the input signature, i.e. the arguments of the Python function or methods. Read more
Source§

impl PyTypeInfo for LiveExecEngineConfig

Source§

const NAME: &str = <Self as ::pyo3::PyClass>::NAME

👎Deprecated since 0.28.0:

prefer using ::type_object(py).name() to get the correct runtime value

Class name.
Source§

const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE

👎Deprecated since 0.28.0:

prefer using ::type_object(py).module() to get the correct runtime value

Module name, if any.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
§

fn type_object(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
§

fn is_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
§

fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
Source§

impl Serialize for LiveExecEngineConfig

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
Source§

impl DerefToPyAny for LiveExecEngineConfig

Source§

impl StructuralPartialEq for LiveExecEngineConfig

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<'py, T> IntoPyObjectExt<'py> for T
where T: IntoPyObject<'py>,

§

fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>

Converts self into an owned Python object, dropping type information.
§

fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>

Converts 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>

Converts self into a Python object. Read more
§

impl<'py, T> IntoPyObjectNautilusExt<'py> for T
where T: IntoPyObjectExt<'py>,

§

fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>

Convert self into a [Py<PyAny>] while panicking if the conversion fails. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> PyErrArguments for T
where T: for<'py> IntoPyObject<'py> + Send + Sync,

§

fn arguments(self, py: Python<'_>) -> Py<PyAny>

Arguments for exception
§

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

§

const NAME: &'static str = T::NAME

👎Deprecated since 0.27.0:

Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.

Name of self. This is used in error messages, for example.
§

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
§

fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>

Returns the expected type as a possible argument for the isinstance and issubclass function. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

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

§

impl<'py, T> FromPyObjectOwned<'py> for T
where T: for<'a> FromPyObject<'a, 'py>,

§

impl<T> Ungil for T
where T: Send,