pub enum OrderConfiguration {
MarketIoc {
market_market_ioc: MarketIoc,
},
LimitGtc {
limit_limit_gtc: LimitGtc,
},
LimitGtd {
limit_limit_gtd: LimitGtd,
},
LimitFok {
limit_limit_fok: LimitFok,
},
StopLimitGtc {
stop_limit_stop_limit_gtc: StopLimitGtc,
},
StopLimitGtd {
stop_limit_stop_limit_gtd: StopLimitGtd,
},
}Expand description
Order configuration.
Variants§
MarketIoc
Market order (immediate-or-cancel).
LimitGtc
Limit order (good-til-cancelled).
LimitGtd
Limit order (good-til-date).
LimitFok
Limit order (fill-or-kill).
StopLimitGtc
Stop-limit order (good-til-cancelled).
Fields
§
stop_limit_stop_limit_gtc: StopLimitGtcStop-limit GTC configuration.
StopLimitGtd
Stop-limit order (good-til-date).
Fields
§
stop_limit_stop_limit_gtd: StopLimitGtdStop-limit GTD configuration.
Implementations§
Source§impl OrderConfiguration
impl OrderConfiguration
Sourcepub fn market_buy_quote(quote_size: impl Into<String>) -> Self
pub fn market_buy_quote(quote_size: impl Into<String>) -> Self
Create a market buy order by quote size (e.g., $100 of BTC).
Sourcepub fn market_buy_base(base_size: impl Into<String>) -> Self
pub fn market_buy_base(base_size: impl Into<String>) -> Self
Create a market buy order by base size (e.g., 0.001 BTC).
Sourcepub fn market_sell(base_size: impl Into<String>) -> Self
pub fn market_sell(base_size: impl Into<String>) -> Self
Create a market sell order by base size.
Sourcepub fn limit_gtc(
base_size: impl Into<String>,
limit_price: impl Into<String>,
post_only: bool,
) -> Self
pub fn limit_gtc( base_size: impl Into<String>, limit_price: impl Into<String>, post_only: bool, ) -> Self
Create a limit GTC order.
Sourcepub fn limit_gtd(
base_size: impl Into<String>,
limit_price: impl Into<String>,
end_time: impl Into<String>,
post_only: bool,
) -> Self
pub fn limit_gtd( base_size: impl Into<String>, limit_price: impl Into<String>, end_time: impl Into<String>, post_only: bool, ) -> Self
Create a limit GTD order.
Sourcepub fn limit_fok(
base_size: impl Into<String>,
limit_price: impl Into<String>,
) -> Self
pub fn limit_fok( base_size: impl Into<String>, limit_price: impl Into<String>, ) -> Self
Create a limit FOK order.
Sourcepub fn stop_limit_gtc(
base_size: impl Into<String>,
limit_price: impl Into<String>,
stop_price: impl Into<String>,
stop_direction: StopDirection,
) -> Self
pub fn stop_limit_gtc( base_size: impl Into<String>, limit_price: impl Into<String>, stop_price: impl Into<String>, stop_direction: StopDirection, ) -> Self
Create a stop-limit GTC order.
Trait Implementations§
Source§impl Clone for OrderConfiguration
impl Clone for OrderConfiguration
Source§fn clone(&self) -> OrderConfiguration
fn clone(&self) -> OrderConfiguration
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 OrderConfiguration
impl Debug for OrderConfiguration
Auto Trait Implementations§
impl Freeze for OrderConfiguration
impl RefUnwindSafe for OrderConfiguration
impl Send for OrderConfiguration
impl Sync for OrderConfiguration
impl Unpin for OrderConfiguration
impl UnwindSafe for OrderConfiguration
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