pub struct StrategyConfig {
pub strategy_id: Option<StrategyId>,
pub order_id_tag: Option<String>,
pub use_uuid_client_order_ids: bool,
pub use_hyphens_in_client_order_ids: bool,
pub oms_type: Option<OmsType>,
pub external_order_claims: Option<Vec<InstrumentId>>,
pub manage_contingent_orders: bool,
pub manage_gtd_expiry: bool,
pub log_events: bool,
pub log_commands: bool,
pub log_rejected_due_post_only_as_warning: bool,
}Expand description
The base model for all trading strategy configurations.
Fields§
§strategy_id: Option<StrategyId>The unique ID for the strategy. Will become the strategy ID if not None.
order_id_tag: Option<String>The unique order ID tag for the strategy. Must be unique amongst all running strategies for a particular trader ID.
use_uuid_client_order_ids: boolIf UUID4’s should be used for client order ID values.
use_hyphens_in_client_order_ids: boolIf hyphens should be used in generated client order ID values.
oms_type: Option<OmsType>The order management system type for the strategy. This will determine
how the ExecutionEngine handles position IDs.
external_order_claims: Option<Vec<InstrumentId>>The external order claim instrument IDs. External orders for matching instrument IDs will be associated with (claimed by) the strategy.
manage_contingent_orders: boolIf OUO and OCO open contingent orders should be managed automatically by the strategy.
Any emulated orders which are active local will be managed by the OrderEmulator instead.
manage_gtd_expiry: boolIf all order GTD time in force expirations should be managed by the strategy. If True, then will ensure open orders have their GTD timers re-activated on start.
log_events: boolIf events should be logged by the strategy. If False, then only warning events and above are logged.
log_commands: boolIf commands should be logged by the strategy.
log_rejected_due_post_only_as_warning: boolIf order rejected events where due_post_only is True should be logged as warnings.
Trait Implementations§
Source§impl Clone for StrategyConfig
impl Clone for StrategyConfig
Source§fn clone(&self) -> StrategyConfig
fn clone(&self) -> StrategyConfig
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StrategyConfig
impl Debug for StrategyConfig
Source§impl Default for StrategyConfig
impl Default for StrategyConfig
Source§impl<'de> Deserialize<'de> for StrategyConfig
impl<'de> Deserialize<'de> for StrategyConfig
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<'py> IntoPyObject<'py> for StrategyConfig
impl<'py> IntoPyObject<'py> for StrategyConfig
Source§type Target = StrategyConfig
type Target = StrategyConfig
Source§type Output = Bound<'py, <StrategyConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <StrategyConfig 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 StrategyConfig
impl PyClass for StrategyConfig
Source§impl PyClassImpl for StrategyConfig
impl PyClassImpl for StrategyConfig
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 = /// The base model for all trading strategy configurations.
const RAW_DOC: &'static CStr = /// The base model for all trading strategy configurations.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<StrategyConfig>
type ThreadChecker = SendablePyClass<StrategyConfig>
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<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for StrategyConfig
impl PyClassNewTextSignature for StrategyConfig
const TEXT_SIGNATURE: &'static str = "(strategy_id=None, order_id_tag=None, oms_type=None, external_order_claims=None, manage_contingent_orders=False, manage_gtd_expiry=False, use_uuid_client_order_ids=False, use_hyphens_in_client_order_ids=True, log_events=True, log_commands=True, log_rejected_due_post_only_as_warning=True)"
Source§impl PyMethods<StrategyConfig> for PyClassImplCollector<StrategyConfig>
impl PyMethods<StrategyConfig> for PyClassImplCollector<StrategyConfig>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for StrategyConfig
impl PyTypeInfo for StrategyConfig
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 StrategyConfig
impl Serialize for StrategyConfig
impl DerefToPyAny for StrategyConfig
impl ExtractPyClassWithClone for StrategyConfig
Auto Trait Implementations§
impl Freeze for StrategyConfig
impl RefUnwindSafe for StrategyConfig
impl Send for StrategyConfig
impl Sync for StrategyConfig
impl Unpin for StrategyConfig
impl UnwindSafe for StrategyConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§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 moreSource§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
Source§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
§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