nautilus_model::orders::builder

Struct OrderTestBuilder

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

Implementations§

source§

impl OrderTestBuilder

source

pub fn new(kind: OrderType) -> Self

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,