pub struct KIAddOrder { /* private fields */ }
Expand description
Request builder for the Add Standard Order endpoint
Implementations§
Source§impl KIAddOrder
impl KIAddOrder
Sourcepub fn build(
pair: KAssetPair,
tradetype: TradeType,
ordertype: OrderType,
volume: f64,
) -> Self
pub fn build( pair: KAssetPair, tradetype: TradeType, ordertype: OrderType, volume: f64, ) -> Self
Sourcepub fn with_pair(self, pair: KAssetPair) -> Self
pub fn with_pair(self, pair: KAssetPair) -> Self
Update the asset pair for this order. Useful for templating
Sourcepub fn with_transaction_type(self, tradetype: TradeType) -> Self
pub fn with_transaction_type(self, tradetype: TradeType) -> Self
Update the transaction/trade type for this order. Useful for templating
Sourcepub fn with_order_type(self, ordertype: OrderType) -> Self
pub fn with_order_type(self, ordertype: OrderType) -> Self
Update the order type for this order. Useful for templating. Note that OrderType encodes the desired price (limit price, stop loss trigger price etc.)
Sourcepub fn with_volume(self, volume: f64) -> Self
pub fn with_volume(self, volume: f64) -> Self
Update the order volume in lots
Sourcepub fn with_leverage(self, leverage: Leverage) -> Self
pub fn with_leverage(self, leverage: Leverage) -> Self
Amount of leverage for this order. Subject to margin trading restrictions
Sourcepub fn with_order_flags<T>(self, flags: T) -> Selfwhere
T: IntoIterator<Item = OrderFlags>,
pub fn with_order_flags<T>(self, flags: T) -> Selfwhere
T: IntoIterator<Item = OrderFlags>,
Order flags to set. Accepts any iterable collection of OrderFlags
Sourcepub fn start_in(self, secs: u32) -> Self
pub fn start_in(self, secs: u32) -> Self
Scedule the order start time for secs
seconds from now
Sourcepub fn start_at(self, timestamp: u64) -> Self
pub fn start_at(self, timestamp: u64) -> Self
Scedule the order start time for the Unix timestamp
in seconds
Sourcepub fn expire_at(self, timestamp: u64) -> Self
pub fn expire_at(self, timestamp: u64) -> Self
Order to expire at the Unix timestamp
in seconds
Sourcepub fn with_userref(self, userref: u32) -> Self
pub fn with_userref(self, userref: u32) -> Self
User supplied unsigned 32 bit integer which Kraken will use to demarcate this order for future reference
Sourcepub fn validate(self, validate: bool) -> Self
pub fn validate(self, validate: bool) -> Self
Validate inputs on Kraken’s servers. Don’t submit order
Sourcepub fn with_closing_order(self, ordertype: OrderType) -> Self
pub fn with_closing_order(self, ordertype: OrderType) -> Self
Closing order to add to the system when this order gets filled