pub struct DataTesterConfig {Show 28 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 can_unsubscribe: bool,
pub request_instruments: bool,
pub request_quotes: bool,
pub request_trades: bool,
pub request_bars: 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.
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 (not yet implemented).
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 new(
client_id: ClientId,
instrument_ids: Vec<InstrumentId>,
subscribe_quotes: bool,
subscribe_trades: bool,
) -> Self
pub fn new( client_id: ClientId, instrument_ids: Vec<InstrumentId>, subscribe_quotes: bool, subscribe_trades: bool, ) -> Self
Creates a new DataTesterConfig instance with minimal settings.
For subscribing to quotes and trades on specified instruments.
§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
Auto Trait Implementations§
impl Freeze for DataTesterConfig
impl RefUnwindSafe for DataTesterConfig
impl Send for DataTesterConfig
impl Sync for DataTesterConfig
impl Unpin 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