[−][src]Struct alpaca_finance::OrderBuilder
Builds up a new order and has the logic to submit the order
This structure is not create directly - but is returned from Order.buy or Order.sell
Implementations
impl OrderBuilder
[src]
pub fn extended_hours(self, extended_hours: bool) -> OrderBuilder
[src]
Sets the extended hours flag
pub fn limit_price(self, limit_price: f64) -> OrderBuilder
[src]
Sets the price limit
pub fn stop_price(self, stop_price: f64) -> OrderBuilder
[src]
Sets the stop price
pub async fn place<'_, '_>(&'_ self, alpaca: &'_ Alpaca) -> Result<Order>
[src]
Attempts to place the order. Will fail if certain preconditions aren't met, including:
- Limit order with no limit price
- Stop order with no stop price
- Extended hours requested for non limit orders where time_in_force is not Day
Trait Implementations
impl Debug for OrderBuilder
[src]
impl Default for OrderBuilder
[src]
impl Serialize for OrderBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for OrderBuilder
impl Send for OrderBuilder
impl Sync for OrderBuilder
impl Unpin for OrderBuilder
impl UnwindSafe for OrderBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,