pub struct MarketOrderBuilder { /* private fields */ }Expand description
Builder for market orders with size or notional
Implementations§
Source§impl MarketOrderBuilder
impl MarketOrderBuilder
Sourcepub fn slippage(self, slippage: f64) -> Self
pub fn slippage(self, slippage: f64) -> Self
Set per-call slippage override (default uses constructor-level slippage)
Range: 0.001 (0.1%) to 0.1 (10%)
Sourcepub fn reduce_only(self) -> Self
pub fn reduce_only(self) -> Self
Set reduce-only flag (only reduce existing position, never increase)
Sourcepub async fn execute(self) -> Result<PlacedOrder>
pub async fn execute(self) -> Result<PlacedOrder>
Execute the market order
Uses the human-readable format (asset, side, size, tif: "market")
and delegates price computation to the worker.
Trait Implementations§
Source§impl IntoFuture for MarketOrderBuilder
impl IntoFuture for MarketOrderBuilder
Source§type Output = Result<PlacedOrder, Error>
type Output = Result<PlacedOrder, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <MarketOrderBuilder as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <MarketOrderBuilder as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl Freeze for MarketOrderBuilder
impl !RefUnwindSafe for MarketOrderBuilder
impl Send for MarketOrderBuilder
impl Sync for MarketOrderBuilder
impl Unpin for MarketOrderBuilder
impl UnsafeUnpin for MarketOrderBuilder
impl !UnwindSafe for MarketOrderBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request