Trait PrivateClient

Source
pub trait PrivateClient: Send + Sync {
    type Error;

    // Required methods
    fn account(&self) -> &Account;
    fn exchange(&self) -> &'static Exchange;
    fn account_info<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<AccountInfo, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn open_orders<'life0, 'async_trait>(
        &'life0 self,
        pair: CurrencyPair,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MarketOrder>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_order<'life0, 'life1, 'async_trait>(
        &'life0 self,
        order: &'life1 ExchangeOrder,
    ) -> Pin<Box<dyn Future<Output = Result<OrderExecution, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn user_data_stream<'life0, 'async_trait>(
        &'life0 self,
        key: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Exchange API private client struct.

Required Associated Types§

Required Methods§

Source

fn account(&self) -> &Account

Source

fn exchange(&self) -> &'static Exchange

Returns static exchange identifier.

Source

fn account_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<AccountInfo, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Requests account information.

Source

fn open_orders<'life0, 'async_trait>( &'life0 self, pair: CurrencyPair, ) -> Pin<Box<dyn Future<Output = Result<Vec<MarketOrder>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Requests all open orders.

Source

fn create_order<'life0, 'life1, 'async_trait>( &'life0 self, order: &'life1 ExchangeOrder, ) -> Pin<Box<dyn Future<Output = Result<OrderExecution, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates an order.

Source

fn user_data_stream<'life0, 'async_trait>( &'life0 self, key: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Renews key for user event data stream.

Implementors§