pub struct SpreadBuilder { /* private fields */ }Expand description
Spread/Combo builder
Implementations§
Source§impl SpreadBuilder
impl SpreadBuilder
Source§impl SpreadBuilder
impl SpreadBuilder
Sourcepub fn add_leg(self, contract_id: i32, action: LegAction) -> LegBuilder
pub fn add_leg(self, contract_id: i32, action: LegAction) -> LegBuilder
Begin configuring a new leg for the spread.
Sourcepub fn iron_condor(
self,
long_put_id: i32,
short_put_id: i32,
short_call_id: i32,
long_call_id: i32,
) -> Self
pub fn iron_condor( self, long_put_id: i32, short_put_id: i32, short_call_id: i32, long_call_id: i32, ) -> Self
Iron condor spread convenience method
Sourcepub fn in_currency(self, currency: impl Into<Currency>) -> Self
pub fn in_currency(self, currency: impl Into<Currency>) -> Self
Override the spread currency, useful for non-USD underlyings.
Sourcepub fn on_exchange(self, exchange: impl Into<Exchange>) -> Self
pub fn on_exchange(self, exchange: impl Into<Exchange>) -> Self
Route the spread order to a specific exchange.
Trait Implementations§
Source§impl Clone for SpreadBuilder
impl Clone for SpreadBuilder
Source§fn clone(&self) -> SpreadBuilder
fn clone(&self) -> SpreadBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 SpreadBuilder
impl Debug for SpreadBuilder
Auto Trait Implementations§
impl Freeze for SpreadBuilder
impl RefUnwindSafe for SpreadBuilder
impl Send for SpreadBuilder
impl Sync for SpreadBuilder
impl Unpin for SpreadBuilder
impl UnwindSafe for SpreadBuilder
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