pub struct LiveNodeConfig {Show 23 fields
pub environment: Environment,
pub trader_id: TraderId,
pub load_state: bool,
pub save_state: bool,
pub logging: LoggerConfig,
pub instance_id: Option<UUID4>,
pub timeout_connection: Duration,
pub timeout_reconciliation: Duration,
pub timeout_portfolio: Duration,
pub timeout_disconnection: Duration,
pub delay_post_stop: Duration,
pub timeout_shutdown: Duration,
pub cache: Option<CacheConfig>,
pub msgbus: Option<MessageBusConfig>,
pub portfolio: Option<PortfolioConfig>,
pub emulator: Option<OrderEmulatorConfig>,
pub streaming: Option<StreamingConfig>,
pub loop_debug: bool,
pub data_engine: LiveDataEngineConfig,
pub risk_engine: LiveRiskEngineConfig,
pub exec_engine: LiveExecEngineConfig,
pub data_clients: HashMap<String, LiveDataClientConfig>,
pub exec_clients: HashMap<String, LiveExecClientConfig>,
}Expand description
Configuration for live Nautilus system nodes.
Fields§
§environment: EnvironmentThe trading environment.
trader_id: TraderIdThe trader ID for the node.
load_state: boolIf trading strategy state should be loaded from the database on start.
save_state: boolIf trading strategy state should be saved to the database on stop.
logging: LoggerConfigThe logging configuration for the kernel.
instance_id: Option<UUID4>The unique instance identifier for the kernel
timeout_connection: DurationThe timeout for all clients to connect and initialize.
timeout_reconciliation: DurationThe timeout for execution state to reconcile.
timeout_portfolio: DurationThe timeout for portfolio to initialize margins and unrealized pnls.
timeout_disconnection: DurationThe timeout for all engine clients to disconnect.
delay_post_stop: DurationThe delay after stopping the node to await residual events before final shutdown.
timeout_shutdown: DurationThe timeout to await pending tasks cancellation during shutdown.
cache: Option<CacheConfig>The cache configuration.
msgbus: Option<MessageBusConfig>The message bus configuration.
portfolio: Option<PortfolioConfig>The portfolio configuration.
emulator: Option<OrderEmulatorConfig>The order emulator configuration.
streaming: Option<StreamingConfig>The configuration for streaming to feather files.
loop_debug: boolIf the asyncio event loop should run in debug mode.
data_engine: LiveDataEngineConfigThe live data engine configuration.
risk_engine: LiveRiskEngineConfigThe live risk engine configuration.
exec_engine: LiveExecEngineConfigThe live execution engine configuration.
data_clients: HashMap<String, LiveDataClientConfig>The data client configurations.
exec_clients: HashMap<String, LiveExecClientConfig>The execution client configurations.
Implementations§
Source§impl LiveNodeConfig
impl LiveNodeConfig
Sourcepub fn builder() -> LiveNodeConfigBuilder
pub fn builder() -> LiveNodeConfigBuilder
Create an instance of LiveNodeConfig using the builder syntax
Trait Implementations§
Source§impl Clone for LiveNodeConfig
impl Clone for LiveNodeConfig
Source§fn clone(&self) -> LiveNodeConfig
fn clone(&self) -> LiveNodeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LiveNodeConfig
impl Debug for LiveNodeConfig
Source§impl Default for LiveNodeConfig
impl Default for LiveNodeConfig
Source§impl<'a, 'py> FromPyObject<'a, 'py> for LiveNodeConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for LiveNodeConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for LiveNodeConfig
impl<'py> IntoPyObject<'py> for LiveNodeConfig
Source§type Target = LiveNodeConfig
type Target = LiveNodeConfig
Source§type Output = Bound<'py, <LiveNodeConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <LiveNodeConfig 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 NautilusKernelConfig for LiveNodeConfig
impl NautilusKernelConfig for LiveNodeConfig
Source§fn environment(&self) -> Environment
fn environment(&self) -> Environment
Source§fn load_state(&self) -> bool
fn load_state(&self) -> bool
Source§fn save_state(&self) -> bool
fn save_state(&self) -> bool
Source§fn instance_id(&self) -> Option<UUID4>
fn instance_id(&self) -> Option<UUID4>
Source§fn timeout_connection(&self) -> Duration
fn timeout_connection(&self) -> Duration
Source§fn timeout_reconciliation(&self) -> Duration
fn timeout_reconciliation(&self) -> Duration
Source§fn timeout_portfolio(&self) -> Duration
fn timeout_portfolio(&self) -> Duration
Source§fn timeout_disconnection(&self) -> Duration
fn timeout_disconnection(&self) -> Duration
Source§fn delay_post_stop(&self) -> Duration
fn delay_post_stop(&self) -> Duration
Source§fn timeout_shutdown(&self) -> Duration
fn timeout_shutdown(&self) -> Duration
Source§fn data_engine(&self) -> Option<DataEngineConfig>
fn data_engine(&self) -> Option<DataEngineConfig>
Source§fn risk_engine(&self) -> Option<RiskEngineConfig>
fn risk_engine(&self) -> Option<RiskEngineConfig>
Source§fn exec_engine(&self) -> Option<ExecutionEngineConfig>
fn exec_engine(&self) -> Option<ExecutionEngineConfig>
Source§impl PyClass for LiveNodeConfig
impl PyClass for LiveNodeConfig
Source§impl PyClassImpl for LiveNodeConfig
impl PyClassImpl for LiveNodeConfig
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 Nautilus system nodes.
const RAW_DOC: &'static CStr = /// Configuration for live Nautilus system nodes.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<LiveNodeConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LiveNodeConfig>
type Layout = <<LiveNodeConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<LiveNodeConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForLiveNodeConfig
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 LiveNodeConfig
impl PyClassNewTextSignature for LiveNodeConfig
const TEXT_SIGNATURE: &'static str = "(environment=None, trader_id=None, load_state=None, save_state=None, logging=None, instance_id=None, timeout_connection_secs=None, timeout_reconciliation_secs=None, timeout_portfolio_secs=None, timeout_disconnection_secs=None, delay_post_stop_secs=None, timeout_shutdown_secs=None, cache=None, msgbus=None, portfolio=None, loop_debug=None, data_engine=None, risk_engine=None, exec_engine=None)"
Source§impl PyStubType for LiveNodeConfig
impl PyStubType for LiveNodeConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for LiveNodeConfig
impl PyTypeInfo for LiveNodeConfig
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 DerefToPyAny for LiveNodeConfig
Auto Trait Implementations§
impl Freeze for LiveNodeConfig
impl RefUnwindSafe for LiveNodeConfig
impl Send for LiveNodeConfig
impl Sync for LiveNodeConfig
impl Unpin for LiveNodeConfig
impl UnsafeUnpin for LiveNodeConfig
impl UnwindSafe for LiveNodeConfig
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> 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,
§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