#[repr(C)]pub struct ClosePositionCommand {
pub position_id: PositionId,
pub client_id: Option<ClientId>,
pub tags: Option<Vec<Ustr>>,
pub time_in_force: Option<TimeInForce>,
pub reduce_only: Option<bool>,
pub quote_quantity: Option<bool>,
}Expand description
Close-position command. Mirrors the arguments to Strategy::close_position.
The host resolves position_id against the live cache to materialise the
&Position reference the trait method requires.
Fields§
§position_id: PositionIdThe identifier of the position to close.
client_id: Option<ClientId>Optional client routing identifier.
Optional tags to attach to the closing order.
time_in_force: Option<TimeInForce>Optional time-in-force override.
reduce_only: Option<bool>Optional reduce-only flag override.
quote_quantity: Option<bool>Optional quote-quantity flag override.
Implementations§
Source§impl ClosePositionCommand
impl ClosePositionCommand
Sourcepub const fn new(
position_id: PositionId,
client_id: Option<ClientId>,
tags: Option<Vec<Ustr>>,
time_in_force: Option<TimeInForce>,
reduce_only: Option<bool>,
quote_quantity: Option<bool>,
) -> Self
pub const fn new( position_id: PositionId, client_id: Option<ClientId>, tags: Option<Vec<Ustr>>, time_in_force: Option<TimeInForce>, reduce_only: Option<bool>, quote_quantity: Option<bool>, ) -> Self
Creates a new ClosePositionCommand instance.
Trait Implementations§
Source§impl Clone for ClosePositionCommand
impl Clone for ClosePositionCommand
Source§fn clone(&self) -> ClosePositionCommand
fn clone(&self) -> ClosePositionCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClosePositionCommand
impl Debug for ClosePositionCommand
impl Eq for ClosePositionCommand
Source§impl PartialEq for ClosePositionCommand
impl PartialEq for ClosePositionCommand
Source§fn eq(&self, other: &ClosePositionCommand) -> bool
fn eq(&self, other: &ClosePositionCommand) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClosePositionCommand
Auto Trait Implementations§
impl Freeze for ClosePositionCommand
impl RefUnwindSafe for ClosePositionCommand
impl Send for ClosePositionCommand
impl Sync for ClosePositionCommand
impl Unpin for ClosePositionCommand
impl UnsafeUnpin for ClosePositionCommand
impl UnwindSafe for ClosePositionCommand
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.