Struct kraapi::api::private::add_order::KIAddOrder[][src]

pub struct KIAddOrder { /* fields omitted */ }

Request builder for the Add Standard Order endpoint

Implementations

impl KIAddOrder[src]

pub fn build(
    pair: KAssetPair,
    tradetype: TradeType,
    ordertype: OrderType,
    volume: f64
) -> Self
[src]

Constructor returning a KrakenInput builder for the add standard order endpoint

  • pair - asset pair for order
  • tradetype - TradeType
  • ordertype - OrderType
  • volume - order volume in lots

pub fn with_pair(self, pair: KAssetPair) -> Self[src]

Update the asset pair for this order. Useful for templating

pub fn with_transaction_type(self, tradetype: TradeType) -> Self[src]

Update the transaction/trade type for this order. Useful for templating

pub fn with_order_type(self, ordertype: OrderType) -> Self[src]

Update the order type for this order. Useful for templating. Note that OrderType encodes the desired price (limit price, stop loss trigger price etc.)

pub fn with_volume(self, volume: f64) -> Self[src]

Update the order volume in lots

pub fn with_leverage(self, leverage: Leverage) -> Self[src]

Amount of leverage for this order. Subject to margin trading restrictions

pub fn with_order_flags<T>(self, flags: T) -> Self where
    T: IntoIterator<Item = OrderFlags>, 
[src]

Order flags to set. Accepts any iterable collection of OrderFlags

pub fn start_in(self, secs: u32) -> Self[src]

Scedule the order start time for secs seconds from now

pub fn start_at(self, timestamp: u64) -> Self[src]

Scedule the order start time for the Unix timestamp in seconds

pub fn expire_in(self, secs: u32) -> Self[src]

Order to expire in secs seconds

pub fn expire_at(self, timestamp: u64) -> Self[src]

Order to expire at the Unix timestamp in seconds

pub fn with_userref(self, userref: u32) -> Self[src]

User supplied unsigned 32 bit integer which Kraken will use to demarcate this order for future reference

pub fn validate(self, validate: bool) -> Self[src]

Validate inputs on Kraken’s servers. Don’t submit order

pub fn with_closing_order(self, ordertype: OrderType) -> Self[src]

Closing order to add to the system when this order gets filled

Trait Implementations

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.