pub struct DataTesterConfig {Show 29 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 request_book_snapshot: 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.
request_book_snapshot: boolWhether to request order book snapshots.
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>) -> 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).
pub fn with_log_data(self, log_data: bool) -> Self
pub fn with_subscribe_book_deltas(self, subscribe: bool) -> Self
pub fn with_subscribe_book_depth(self, subscribe: bool) -> Self
pub fn with_subscribe_book_at_interval(self, subscribe: bool) -> Self
pub fn with_subscribe_quotes(self, subscribe: bool) -> Self
pub fn with_subscribe_trades(self, subscribe: bool) -> Self
pub fn with_subscribe_mark_prices(self, subscribe: bool) -> Self
pub fn with_subscribe_index_prices(self, subscribe: bool) -> Self
pub fn with_subscribe_funding_rates(self, subscribe: bool) -> Self
pub fn with_subscribe_bars(self, subscribe: bool) -> Self
pub fn with_bar_types(self, bar_types: Vec<BarType>) -> Self
pub fn with_subscribe_instrument(self, subscribe: bool) -> Self
pub fn with_subscribe_instrument_status(self, subscribe: bool) -> Self
pub fn with_subscribe_instrument_close(self, subscribe: bool) -> Self
pub fn with_book_type(self, book_type: BookType) -> Self
pub fn with_book_depth(self, depth: Option<NonZeroUsize>) -> Self
pub fn with_book_interval_ms(self, interval_ms: NonZeroUsize) -> Self
pub fn with_manage_book(self, manage: bool) -> Self
pub fn with_request_instruments(self, request: bool) -> Self
pub fn with_request_trades(self, request: bool) -> Self
pub fn with_request_bars(self, request: bool) -> Self
pub fn with_request_book_snapshot(self, request: bool) -> Self
pub fn with_can_unsubscribe(self, can_unsubscribe: bool) -> Self
pub fn with_stats_interval_secs(self, interval_secs: u64) -> Self
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 more