Struct krakenrs::KrakenRestAPI [−][src]
pub struct KrakenRestAPI { /* fields omitted */ }
Expand description
A connection to the Kraken REST API This only supports blocking http requests for now
Implementations
(Public) Get the kraken system’s time
(Public) Get the kraken system’s status
(Public) Get the list of kraken’s supported assets, and info
(Public) Get the list of kraken’s asset pairs, and info
Arguments:
- pairs: A list of Kraken asset pair strings to get info about. If empty then all asset pairs
(Public) Get the ticker price for one or more asset pairs
Arguments:
- pairs: A list of Kraken asset pair strings to get ticker info about
(Private) Get the balance
(Private) Get a websockets authentication token
(Private) Get the list of open orders
Arguments:
- userref: An optional user-reference to filter the list of open orders by
(Private) Cancel order
Arguments:
- id: A TxId (OR a UserRefId) of order(s) to cancel
(Private) Cancel all orders (regardless of user ref or tx id)
(Private) Cancel all orders after
Arguments:
- timeout: Integer timeout specified in seconds. 0 to disable the timer.
pub fn add_market_order(
&self,
market_order: MarketOrder,
user_ref_id: Option<UserRefId>,
validate: bool
) -> Result<AddOrderResponse>
pub fn add_market_order(
&self,
market_order: MarketOrder,
user_ref_id: Option<UserRefId>,
validate: bool
) -> Result<AddOrderResponse>
(Private) Place a market order
Arguments:
- market_order: Market order object describing the parameters of the order
- user_ref_id: Optional user ref id to attach to the order
- validate: If true, the order is only validated and is not actually placed
pub fn add_limit_order(
&self,
limit_order: LimitOrder,
user_ref_id: Option<UserRefId>,
validate: bool
) -> Result<AddOrderResponse>
pub fn add_limit_order(
&self,
limit_order: LimitOrder,
user_ref_id: Option<UserRefId>,
validate: bool
) -> Result<AddOrderResponse>
(Private) Place a limit order
Arguments:
- limit_order: Limit order object describing the parameters of the order
- user_ref_id: Optional user ref id to attach to the order
- validate: If true, the order is only validated and is not actually placed
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for KrakenRestAPI
impl Send for KrakenRestAPI
impl Sync for KrakenRestAPI
impl Unpin for KrakenRestAPI
impl !UnwindSafe for KrakenRestAPI
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more