pub struct ExecTesterConfig {Show 51 fields
pub base: StrategyConfig,
pub instrument_id: InstrumentId,
pub order_qty: Quantity,
pub order_display_qty: Option<Quantity>,
pub order_expire_time_delta_mins: Option<u64>,
pub order_params: Option<Params>,
pub client_id: Option<ClientId>,
pub subscribe_book: bool,
pub subscribe_quotes: bool,
pub subscribe_trades: bool,
pub book_type: BookType,
pub book_depth: Option<NonZeroUsize>,
pub book_interval_ms: NonZeroUsize,
pub book_levels_to_print: usize,
pub open_position_on_start_qty: Option<Decimal>,
pub open_position_time_in_force: TimeInForce,
pub enable_limit_buys: bool,
pub enable_limit_sells: bool,
pub enable_stop_buys: bool,
pub enable_stop_sells: bool,
pub tob_offset_ticks: u64,
pub limit_time_in_force: Option<TimeInForce>,
pub stop_order_type: OrderType,
pub stop_offset_ticks: u64,
pub stop_limit_offset_ticks: Option<u64>,
pub stop_trigger_type: TriggerType,
pub stop_time_in_force: Option<TimeInForce>,
pub trailing_offset: Option<Decimal>,
pub trailing_offset_type: TrailingOffsetType,
pub enable_brackets: bool,
pub batch_submit_limit_pair: bool,
pub bracket_entry_order_type: OrderType,
pub bracket_offset_ticks: u64,
pub modify_orders_to_maintain_tob_offset: bool,
pub modify_stop_orders_to_maintain_offset: bool,
pub cancel_replace_orders_to_maintain_tob_offset: bool,
pub cancel_replace_stop_orders_to_maintain_offset: bool,
pub use_post_only: bool,
pub use_quote_quantity: bool,
pub emulation_trigger: Option<TriggerType>,
pub cancel_orders_on_stop: bool,
pub close_positions_on_stop: bool,
pub close_positions_time_in_force: Option<TimeInForce>,
pub reduce_only_on_stop: bool,
pub use_individual_cancels_on_stop: bool,
pub use_batch_cancel_on_stop: bool,
pub dry_run: bool,
pub log_data: bool,
pub test_reject_post_only: bool,
pub test_reject_reduce_only: bool,
pub can_unsubscribe: bool,
}Expand description
Configuration for the execution tester strategy.
Fields§
§base: StrategyConfigBase strategy configuration.
instrument_id: InstrumentIdInstrument ID to test.
order_qty: QuantityOrder quantity.
order_display_qty: Option<Quantity>Display quantity for iceberg orders (None for full display, Some(0) for hidden).
order_expire_time_delta_mins: Option<u64>Minutes until GTD orders expire (None for GTC).
order_params: Option<Params>Adapter-specific order parameters.
client_id: Option<ClientId>Client ID to use for orders and subscriptions.
subscribe_book: boolWhether to subscribe to order book.
subscribe_quotes: boolWhether to subscribe to quotes.
subscribe_trades: boolWhether to subscribe to trades.
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.
book_levels_to_print: usizeNumber of order book levels to print when logging.
open_position_on_start_qty: Option<Decimal>Quantity to open position on start (positive for buy, negative for sell).
open_position_time_in_force: TimeInForceTime in force for opening position order.
enable_limit_buys: boolEnable limit buy orders.
enable_limit_sells: boolEnable limit sell orders.
enable_stop_buys: boolEnable stop buy orders.
enable_stop_sells: boolEnable stop sell orders.
tob_offset_ticks: u64Offset from TOB in price ticks for limit orders.
limit_time_in_force: Option<TimeInForce>Override time in force for limit orders (None uses GTC/GTD logic).
stop_order_type: OrderTypeType of stop order (STOP_MARKET, STOP_LIMIT, MARKET_IF_TOUCHED, LIMIT_IF_TOUCHED).
stop_offset_ticks: u64Offset from market in price ticks for stop trigger.
stop_limit_offset_ticks: Option<u64>Offset from trigger price in ticks for stop limit price.
stop_trigger_type: TriggerTypeTrigger type for stop orders.
stop_time_in_force: Option<TimeInForce>Override time in force for stop orders (None uses GTC/GTD logic).
trailing_offset: Option<Decimal>Trailing offset for TRAILING_STOP_MARKET orders.
trailing_offset_type: TrailingOffsetTypeTrailing offset type (BasisPoints or Price).
enable_brackets: boolEnable bracket orders (entry with TP/SL).
batch_submit_limit_pair: boolSubmit limit buy and sell as an order list instead of individual orders.
bracket_entry_order_type: OrderTypeEntry order type for bracket orders.
bracket_offset_ticks: u64Offset in ticks for bracket TP/SL from entry price.
modify_orders_to_maintain_tob_offset: boolModify limit orders to maintain TOB offset.
modify_stop_orders_to_maintain_offset: boolModify stop orders to maintain offset.
cancel_replace_orders_to_maintain_tob_offset: boolCancel and replace limit orders to maintain TOB offset.
cancel_replace_stop_orders_to_maintain_offset: boolCancel and replace stop orders to maintain offset.
use_post_only: boolUse post-only for limit orders.
use_quote_quantity: boolUse quote quantity for orders.
emulation_trigger: Option<TriggerType>Emulation trigger type for orders.
cancel_orders_on_stop: boolCancel all orders on stop.
close_positions_on_stop: boolClose all positions on stop.
close_positions_time_in_force: Option<TimeInForce>Time in force for closing positions (None defaults to GTC).
reduce_only_on_stop: boolUse reduce_only when closing positions.
use_individual_cancels_on_stop: boolUse individual cancel commands instead of cancel_all.
use_batch_cancel_on_stop: boolUse batch cancel command when stopping.
dry_run: boolDry run mode (no order submission).
log_data: boolLog received data.
test_reject_post_only: boolTest post-only rejection by placing orders on wrong side of spread.
test_reject_reduce_only: boolTest reduce-only rejection by setting reduce_only on open position order.
can_unsubscribe: boolWhether unsubscribe is supported on stop.
Implementations§
Source§impl ExecTesterConfig
impl ExecTesterConfig
Sourcepub fn builder() -> ExecTesterConfigBuilder
pub fn builder() -> ExecTesterConfigBuilder
Create an instance of ExecTesterConfig using the builder syntax
Source§impl ExecTesterConfig
impl ExecTesterConfig
Sourcepub fn new(
strategy_id: StrategyId,
instrument_id: InstrumentId,
client_id: ClientId,
order_qty: Quantity,
) -> Self
pub fn new( strategy_id: StrategyId, instrument_id: InstrumentId, client_id: ClientId, order_qty: Quantity, ) -> Self
Creates a new ExecTesterConfig with minimal settings.
§Panics
Panics if NonZeroUsize::new(1000) fails (which should never happen).
Trait Implementations§
Source§impl Clone for ExecTesterConfig
impl Clone for ExecTesterConfig
Source§fn clone(&self) -> ExecTesterConfig
fn clone(&self) -> ExecTesterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecTesterConfig
impl Debug for ExecTesterConfig
Source§impl Default for ExecTesterConfig
impl Default for ExecTesterConfig
Source§impl<'de> Deserialize<'de> for ExecTesterConfigwhere
ExecTesterConfig: Default,
impl<'de> Deserialize<'de> for ExecTesterConfigwhere
ExecTesterConfig: 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 ExecTesterConfig
impl RefUnwindSafe for ExecTesterConfig
impl Send for ExecTesterConfig
impl Sync for ExecTesterConfig
impl Unpin for ExecTesterConfig
impl UnsafeUnpin for ExecTesterConfig
impl UnwindSafe for ExecTesterConfig
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