pub struct ExecTesterConfig {Show 55 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<usize>,
pub book_interval_ms: usize,
pub book_levels_to_print: usize,
pub open_position_on_start_qty: Option<Decimal>,
pub open_position_on_first_quote: bool,
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 limit_aggressive: 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 test_modify_rejected: bool,
pub can_unsubscribe: bool,
pub clamp_to_instrument_price_range: 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<usize>Order book depth for subscriptions.
book_interval_ms: usizeOrder 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_on_first_quote: boolDelay opening the start position until the first quote arrives.
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.
limit_aggressive: boolPlace limit orders at marketable prices (cross the spread). Combined
with limit_time_in_force = Ioc/Fok, exercises aggressive-fill
(TC-E13, TC-E15) and passive-no-fill (TC-E14, TC-E16) scenarios when
inverted with the standard passive offset.
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.
test_modify_rejected: boolProgrammatically attempt one strategy-wide modify against the next
accepted limit order (whichever side acks first) to exercise the
adapter’s modify-rejection path (TC-E36). Independent of
modify_orders_to_maintain_tob_offset, which only fires on price drift.
Not honored when batch_submit_limit_pair is true; combine with
individual buy/sell maintenance instead.
can_unsubscribe: boolWhether unsubscribe is supported on stop.
clamp_to_instrument_price_range: boolClamp computed prices to the instrument’s [min_price, max_price] before submit.
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 validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validates the execution 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(
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.
Trait Implementations§
Source§impl Clone for ExecTesterConfig
impl Clone for ExecTesterConfig
Source§fn clone(&self) -> ExecTesterConfig
fn clone(&self) -> ExecTesterConfig
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 ExecTesterConfig
impl Debug for ExecTesterConfig
Source§impl Default for ExecTesterConfig
impl Default for ExecTesterConfig
impl DerefToPyAny 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>,
Source§impl<'a, 'py> FromPyObject<'a, 'py> for ExecTesterConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for ExecTesterConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for ExecTesterConfig
impl<'py> IntoPyObject<'py> for ExecTesterConfig
Source§type Target = ExecTesterConfig
type Target = ExecTesterConfig
Source§type Output = Bound<'py, <ExecTesterConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <ExecTesterConfig 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 ExecTesterConfig
impl PyClass for ExecTesterConfig
Source§impl PyClassImpl for ExecTesterConfig
impl PyClassImpl for ExecTesterConfig
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 execution tester strategy.
const RAW_DOC: &'static CStr = /// Configuration for the execution tester strategy.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<ExecTesterConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<ExecTesterConfig>
type Layout = <<ExecTesterConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<ExecTesterConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForExecTesterConfig
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 ExecTesterConfig
impl PyClassNewTextSignature for ExecTesterConfig
const TEXT_SIGNATURE: &'static str = "(strategy_id=None, order_id_tag=None, use_hyphens_in_client_order_ids=None, external_order_claims=None, instrument_id=None, client_id=None, order_qty=None, subscribe_book=None, subscribe_quotes=None, subscribe_trades=None, open_position_on_start_qty=None, open_position_on_first_quote=None, open_position_time_in_force=None, enable_limit_buys=None, enable_limit_sells=None, enable_stop_buys=None, enable_stop_sells=None, tob_offset_ticks=None, limit_time_in_force=None, use_post_only=None, limit_aggressive=None, cancel_orders_on_stop=None, close_positions_on_stop=None, close_positions_time_in_force=None, reduce_only_on_stop=None, dry_run=None, log_data=None, can_unsubscribe=None, clamp_to_instrument_price_range=None, log_events=None, log_commands=None)"
Source§impl PyStubType for ExecTesterConfig
impl PyStubType for ExecTesterConfig
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for ExecTesterConfig
impl PyTypeInfo for ExecTesterConfig
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 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§
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