nautilus_model::orders::builder

Struct OrderTestBuilder

Source
pub struct OrderTestBuilder { /* private fields */ }

Implementations§

Source§

impl OrderTestBuilder

Source

pub fn new(kind: OrderType) -> Self

Creates a new OrderTestBuilder instance.

Source

pub fn kind(&mut self, kind: OrderType) -> &mut Self

Source

pub fn trader_id(&mut self, trader_id: TraderId) -> &mut Self

———– TraderId –––––

Source

pub fn strategy_id(&mut self, strategy_id: StrategyId) -> &mut Self

Source

pub fn instrument_id(&mut self, instrument_id: InstrumentId) -> &mut Self

Source

pub fn client_order_id(&mut self, client_order_id: ClientOrderId) -> &mut Self

Source

pub fn trade_id(&mut self, trade_id: TradeId) -> &mut Self

Source

pub fn currency(&mut self, currency: Currency) -> &mut Self

Source

pub fn side(&mut self, side: OrderSide) -> &mut Self

Source

pub fn quantity(&mut self, quantity: Quantity) -> &mut Self

Source

pub fn price(&mut self, price: Price) -> &mut Self

Source

pub fn trigger_price(&mut self, trigger_price: Price) -> &mut Self

Source

pub fn trigger_type(&mut self, trigger_type: TriggerType) -> &mut Self

Source

pub fn limit_offset(&mut self, limit_offset: Price) -> &mut Self

Source

pub fn trailing_offset(&mut self, trailing_offset: Price) -> &mut Self

Source

pub fn trailing_offset_type( &mut self, trailing_offset_type: TrailingOffsetType, ) -> &mut Self

Source

pub fn time_in_force(&mut self, time_in_force: TimeInForce) -> &mut Self

Source

pub fn expire_time(&mut self, expire_time: UnixNanos) -> &mut Self

Source

pub fn display_qty(&mut self, display_qty: Quantity) -> &mut Self

Source

pub fn liquidity_side(&mut self, liquidity_side: LiquiditySide) -> &mut Self

Source

pub fn emulation_trigger(&mut self, emulation_trigger: TriggerType) -> &mut Self

Source

pub fn trigger_instrument_id( &mut self, trigger_instrument_id: InstrumentId, ) -> &mut Self

Source

pub fn order_list_id(&mut self, order_list_id: OrderListId) -> &mut Self

Source

pub fn linked_order_ids( &mut self, linked_order_ids: Vec<ClientOrderId>, ) -> &mut Self

Source

pub fn parent_order_id(&mut self, parent_order_id: ClientOrderId) -> &mut Self

Source

pub fn exec_algorithm_id( &mut self, exec_algorithm_id: ExecAlgorithmId, ) -> &mut Self

Source

pub fn exec_algorithm_params( &mut self, exec_algorithm_params: HashMap<Ustr, Ustr>, ) -> &mut Self

Source

pub fn exec_spawn_id(&mut self, exec_spawn_id: ClientOrderId) -> &mut Self

Source

pub fn tags(&mut self, tags: Vec<Ustr>) -> &mut Self

Source

pub fn init_id(&mut self, init_id: UUID4) -> &mut Self

Source

pub fn ts_init(&mut self, ts_init: UnixNanos) -> &mut Self

Source

pub fn reduce_only(&mut self, reduce_only: bool) -> &mut Self

Source

pub fn post_only(&mut self, post_only: bool) -> &mut Self

Source

pub fn quote_quantity(&mut self, quote_quantity: bool) -> &mut Self

Source

pub fn reconciliation(&mut self, reconciliation: bool) -> &mut Self

Source

pub fn contingency_type( &mut self, contingency_type: ContingencyType, ) -> &mut Self

Source

pub fn build(&self) -> OrderAny

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Ungil for T
where T: Send,