pub struct OrderIntent {
pub side: Side,
pub amount: Amount,
pub price: Price,
pub reduce_only: bool,
pub cloid: Option<Cloid>,
pub take_profit: Option<Exit>,
pub stop_loss: Option<Exit>,
}Expand description
An order to place: a market or limit entry, with its take profit and stop loss when it has them.
Fields§
§side: SideBuy or sell.
amount: AmountHow much: a size, or a notional sized at the order’s price.
price: PriceAt market or at a limit.
reduce_only: boolWhether it may only reduce a position.
cloid: Option<Cloid>The client order id; None for none.
take_profit: Option<Exit>Placed with the entry, the other way, once it fills; None for none.
stop_loss: Option<Exit>Placed with the entry, the other way, once it fills; None for none.
Implementations§
Source§impl OrderIntent
impl OrderIntent
Sourcepub const fn with_cloid(self, cloid: Cloid) -> OrderIntent
pub const fn with_cloid(self, cloid: Cloid) -> OrderIntent
Sent with this client order id.
Sourcepub const fn take_profit(self, exit: Exit) -> OrderIntent
pub const fn take_profit(self, exit: Exit) -> OrderIntent
Placed with the entry, the other way, once it fills.
Sourcepub const fn stop_loss(self, exit: Exit) -> OrderIntent
pub const fn stop_loss(self, exit: Exit) -> OrderIntent
Placed with the entry, the other way, once it fills.
Source§impl OrderIntent
impl OrderIntent
Source§impl OrderIntent
impl OrderIntent
Trait Implementations§
Source§impl Clone for OrderIntent
impl Clone for OrderIntent
impl Copy for OrderIntent
Source§impl Debug for OrderIntent
impl Debug for OrderIntent
impl Eq for OrderIntent
Source§impl PartialEq for OrderIntent
impl PartialEq for OrderIntent
impl StructuralPartialEq for OrderIntent
Auto Trait Implementations§
impl Forget for OrderIntent
impl Freeze for OrderIntent
impl Move for OrderIntent
impl RefUnwindSafe for OrderIntent
impl Send for OrderIntent
impl Sync for OrderIntent
impl Unpin for OrderIntent
impl UnsafeUnpin for OrderIntent
impl UnwindSafe for OrderIntent
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.