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§
fn account(&self) -> &Account
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.