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<NonZeroUsize>,
pub book_interval_ms: NonZeroUsize,
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 (not yet implemented).
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<NonZeroUsize>Order book depth for subscriptions.
book_interval_ms: NonZeroUsizeOrder 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 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.
§Panics
Panics if NonZeroUsize::new(1000) fails (which should never happen).
Trait Implementations§
Source§impl Clone for DataTesterConfig
impl Clone for DataTesterConfig
Source§fn clone(&self) -> DataTesterConfig
fn clone(&self) -> DataTesterConfig
1.0.0 · 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
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>,
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§
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