pub struct CreateOrderParamsBuilder { /* private fields */ }
Expand description
Builder for CreateOrderParams
.
Implementations§
Source§impl CreateOrderParamsBuilder
impl CreateOrderParamsBuilder
Sourcepub fn portfolio<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn portfolio<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Portfolio identifier.
Sourcepub fn client_order_id<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn client_order_id<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Unique client-assigned order identifier.
Sourcepub fn side<VALUE: Into<CoinbaseIntxSide>>(&mut self, value: VALUE) -> &mut Self
pub fn side<VALUE: Into<CoinbaseIntxSide>>(&mut self, value: VALUE) -> &mut Self
Side of the transaction (BUY/SELL).
Sourcepub fn size<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn size<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Amount in base asset units.
Sourcepub fn instrument<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn instrument<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Instrument identifier (name, ID, or UUID).
Sourcepub fn order_type<VALUE: Into<CoinbaseIntxOrderType>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn order_type<VALUE: Into<CoinbaseIntxOrderType>>( &mut self, value: VALUE, ) -> &mut Self
Type of order.
Sourcepub fn tif<VALUE: Into<CoinbaseIntxTimeInForce>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn tif<VALUE: Into<CoinbaseIntxTimeInForce>>( &mut self, value: VALUE, ) -> &mut Self
Time in force for the order.
Sourcepub fn price<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn price<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Price limit in quote asset units.
Sourcepub fn stop_price<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn stop_price<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Market price that activates a stop order.
Sourcepub fn stop_limit_price<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn stop_limit_price<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Limit price for TP/SL stop leg orders.
Sourcepub fn expire_time<VALUE: Into<DateTime<Utc>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn expire_time<VALUE: Into<DateTime<Utc>>>( &mut self, value: VALUE, ) -> &mut Self
Expiration time for GTT orders.
Sourcepub fn stp_mode<VALUE: Into<CoinbaseIntxSTPMode>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn stp_mode<VALUE: Into<CoinbaseIntxSTPMode>>( &mut self, value: VALUE, ) -> &mut Self
Self-trade prevention mode.
Sourcepub fn post_only<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn post_only<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether order must rest on the book.
Sourcepub fn close_only<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn close_only<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether order must close existing position.
Sourcepub fn algo_strategy<VALUE: Into<CoinbaseIntxAlgoStrategy>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn algo_strategy<VALUE: Into<CoinbaseIntxAlgoStrategy>>( &mut self, value: VALUE, ) -> &mut Self
Algorithmic trading strategy.
Sourcepub fn build(&self) -> Result<CreateOrderParams, CreateOrderParamsBuilderError>
pub fn build(&self) -> Result<CreateOrderParams, CreateOrderParamsBuilderError>
Trait Implementations§
Source§impl Clone for CreateOrderParamsBuilder
impl Clone for CreateOrderParamsBuilder
Source§fn clone(&self) -> CreateOrderParamsBuilder
fn clone(&self) -> CreateOrderParamsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CreateOrderParamsBuilder
impl RefUnwindSafe for CreateOrderParamsBuilder
impl Send for CreateOrderParamsBuilder
impl Sync for CreateOrderParamsBuilder
impl Unpin for CreateOrderParamsBuilder
impl UnwindSafe for CreateOrderParamsBuilder
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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