pub struct DataTesterConfig {Show 34 fields
pub base: DataActorConfig,
pub instrument_ids: Vec<InstrumentId>,
pub client_id: Option<ClientId>,
pub bar_types: Option<Vec<BarType>>,
pub subscribe_book_deltas: bool,
pub subscribe_book_depth: bool,
pub subscribe_book_at_interval: bool,
pub subscribe_quotes: bool,
pub subscribe_trades: bool,
pub subscribe_mark_prices: bool,
pub subscribe_index_prices: bool,
pub subscribe_funding_rates: bool,
pub subscribe_bars: bool,
pub subscribe_instrument: bool,
pub subscribe_instrument_status: bool,
pub subscribe_instrument_close: bool,
pub subscribe_option_greeks: bool,
pub subscribe_params: Option<Params>,
pub request_params: Option<Params>,
pub can_unsubscribe: bool,
pub request_instruments: bool,
pub request_quotes: bool,
pub request_trades: bool,
pub request_bars: bool,
pub request_book_snapshot: bool,
pub request_book_deltas: bool,
pub request_funding_rates: bool,
pub book_type: BookType,
pub book_depth: Option<usize>,
pub book_interval_ms: usize,
pub book_levels_to_print: usize,
pub manage_book: bool,
pub log_data: bool,
pub stats_interval_secs: u64,
}Expand description
Configuration for the data tester actor.
Fields§
§base: DataActorConfigBase data actor configuration.
instrument_ids: Vec<InstrumentId>Instrument IDs to subscribe to.
client_id: Option<ClientId>Client ID to use for subscriptions.
bar_types: Option<Vec<BarType>>Bar types to subscribe to.
subscribe_book_deltas: boolWhether to subscribe to order book deltas.
subscribe_book_depth: boolWhether to subscribe to order book depth snapshots.
subscribe_book_at_interval: boolWhether to subscribe to order book at interval.
subscribe_quotes: boolWhether to subscribe to quotes.
subscribe_trades: boolWhether to subscribe to trades.
subscribe_mark_prices: boolWhether to subscribe to mark prices.
subscribe_index_prices: boolWhether to subscribe to index prices.
subscribe_funding_rates: boolWhether to subscribe to funding rates.
subscribe_bars: boolWhether to subscribe to bars.
subscribe_instrument: boolWhether to subscribe to instrument updates.
subscribe_instrument_status: boolWhether to subscribe to instrument status.
subscribe_instrument_close: boolWhether to subscribe to instrument close.
subscribe_option_greeks: boolWhether to subscribe to option greeks.
subscribe_params: Option<Params>Optional parameters passed to all subscribe calls.
request_params: Option<Params>Optional parameters passed to all request calls.
can_unsubscribe: boolWhether unsubscribe is supported on stop.
request_instruments: boolWhether to request instruments on start.
request_quotes: boolWhether to request historical quotes.
request_trades: boolWhether to request historical trades (not yet implemented).
request_bars: boolWhether to request historical bars.
request_book_snapshot: boolWhether to request order book snapshots.
request_book_deltas: boolWhether to request historical order book deltas (not yet implemented).
request_funding_rates: boolWhether to request historical funding rates.
book_type: BookTypeBook type for order book subscriptions.
book_depth: Option<usize>Order book depth for subscriptions.
book_interval_ms: usizeOrder book interval in milliseconds for at_interval subscriptions.
book_levels_to_print: usizeNumber of order book levels to print when logging.
manage_book: boolWhether to manage local order book from deltas.
log_data: boolWhether to log received data.
stats_interval_secs: u64Stats logging interval in seconds (0 to disable).
Implementations§
Source§impl DataTesterConfig
impl DataTesterConfig
Sourcepub fn builder() -> DataTesterConfigBuilder
pub fn builder() -> DataTesterConfigBuilder
Create an instance of DataTesterConfig using the builder syntax
Source§impl DataTesterConfig
impl DataTesterConfig
Sourcepub fn validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validates the data tester configuration, collecting every field violation.
§Errors
Returns a [ConfigError] (a [ConfigError::Multiple] when more than one field is
invalid) if any field fails validation.
Sourcepub fn new(client_id: ClientId, instrument_ids: Vec<InstrumentId>) -> Self
pub fn new(client_id: ClientId, instrument_ids: Vec<InstrumentId>) -> Self
Creates a new DataTesterConfig instance with minimal settings.
Trait Implementations§
Source§impl Clone for DataTesterConfig
impl Clone for DataTesterConfig
Source§fn clone(&self) -> DataTesterConfig
fn clone(&self) -> DataTesterConfig
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 DataTesterConfig
impl Debug for DataTesterConfig
Source§impl Default for DataTesterConfig
impl Default for DataTesterConfig
impl DerefToPyAny for DataTesterConfig
Source§impl<'de> Deserialize<'de> for DataTesterConfigwhere
DataTesterConfig: Default,
impl<'de> Deserialize<'de> for DataTesterConfigwhere
DataTesterConfig: 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<'a, 'py> FromPyObject<'a, 'py> for DataTesterConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for DataTesterConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for DataTesterConfig
impl<'py> IntoPyObject<'py> for DataTesterConfig
Source§type Target = DataTesterConfig
type Target = DataTesterConfig
Source§type Output = Bound<'py, <DataTesterConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <DataTesterConfig 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 DataTesterConfig
impl PyClass for DataTesterConfig
Source§impl PyClassImpl for DataTesterConfig
impl PyClassImpl for DataTesterConfig
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 the data tester actor.
const RAW_DOC: &'static CStr = /// Configuration for the data tester actor.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<DataTesterConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<DataTesterConfig>
type Layout = <<DataTesterConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<DataTesterConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForDataTesterConfig
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 DataTesterConfig
impl PyClassNewTextSignature for DataTesterConfig
const TEXT_SIGNATURE: &'static str = "(actor_id=None, client_id=None, instrument_ids=None, bar_types=None, subscribe_book_deltas=None, subscribe_book_depth=None, subscribe_book_at_interval=None, subscribe_quotes=None, subscribe_trades=None, subscribe_mark_prices=None, subscribe_index_prices=None, subscribe_funding_rates=None, subscribe_bars=None, subscribe_instrument=None, subscribe_instrument_status=None, subscribe_instrument_close=None, subscribe_option_greeks=None, can_unsubscribe=None, request_instruments=None, request_quotes=None, request_trades=None, request_bars=None, request_book_snapshot=None, request_book_deltas=None, request_funding_rates=None, book_depth=None, book_interval_ms=None, book_levels_to_print=None, manage_book=None, log_data=None, stats_interval_secs=None, log_events=None, log_commands=None)"
Source§impl PyStubType for DataTesterConfig
impl PyStubType for DataTesterConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for DataTesterConfig
impl PyTypeInfo for DataTesterConfig
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.Auto Trait Implementations§
impl Freeze for DataTesterConfig
impl RefUnwindSafe for DataTesterConfig
impl Send for DataTesterConfig
impl Sync for DataTesterConfig
impl Unpin for DataTesterConfig
impl UnsafeUnpin for DataTesterConfig
impl UnwindSafe for DataTesterConfig
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>
§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,
§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