pub struct ExecutionEngineConfig {Show 15 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 allow_overfills: 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.
allow_overfills: boolIf order fills exceeding order quantity are allowed (logs warning instead of raising). Useful when position reconciliation races with exchange fill events.
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
Trait Implementations§
Source§impl Clone for ExecutionEngineConfig
impl Clone for ExecutionEngineConfig
Source§fn clone(&self) -> ExecutionEngineConfig
fn clone(&self) -> ExecutionEngineConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionEngineConfig
impl Debug for ExecutionEngineConfig
Source§impl Default for ExecutionEngineConfig
impl Default for ExecutionEngineConfig
Source§impl<'de> Deserialize<'de> for ExecutionEngineConfig
impl<'de> Deserialize<'de> for ExecutionEngineConfig
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<'a, 'py> FromPyObject<'a, 'py> for ExecutionEngineConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for ExecutionEngineConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for ExecutionEngineConfig
impl<'py> IntoPyObject<'py> for ExecutionEngineConfig
Source§type Target = ExecutionEngineConfig
type Target = ExecutionEngineConfig
Source§type Output = Bound<'py, <ExecutionEngineConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <ExecutionEngineConfig 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 ExecutionEngineConfig
impl PyClass for ExecutionEngineConfig
Source§impl PyClassImpl for ExecutionEngineConfig
impl PyClassImpl for ExecutionEngineConfig
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 `ExecutionEngine` instances.
const RAW_DOC: &'static CStr = /// Configuration for `ExecutionEngine` instances.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<ExecutionEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<ExecutionEngineConfig>
type Layout = <<ExecutionEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<ExecutionEngineConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForExecutionEngineConfig
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 ExecutionEngineConfig
impl PyClassNewTextSignature for ExecutionEngineConfig
const TEXT_SIGNATURE: &'static str = "(load_cache=None, manage_own_order_books=None, snapshot_orders=None, snapshot_positions=None, snapshot_positions_interval_secs=None, allow_overfills=None, external_clients=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, purge_from_database=None, debug=None)"
Source§impl PyStubType for ExecutionEngineConfig
impl PyStubType for ExecutionEngineConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for ExecutionEngineConfig
impl PyTypeInfo for ExecutionEngineConfig
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.Source§impl Serialize for ExecutionEngineConfig
impl Serialize for ExecutionEngineConfig
impl DerefToPyAny for ExecutionEngineConfig
Auto Trait Implementations§
impl Freeze for ExecutionEngineConfig
impl RefUnwindSafe for ExecutionEngineConfig
impl Send for ExecutionEngineConfig
impl Sync for ExecutionEngineConfig
impl Unpin for ExecutionEngineConfig
impl UnsafeUnpin for ExecutionEngineConfig
impl UnwindSafe for ExecutionEngineConfig
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
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>
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>
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
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.
§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