pub trait BrokerClient: Send + Sync {
// Required methods
fn get_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Account>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Position>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn place_order<'life0, 'async_trait>(
&'life0 self,
order: OrderRequest,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_orders<'life0, 'async_trait>(
&'life0 self,
filter: OrderFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Broker client trait
Required Methods§
Sourcefn get_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Account>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Account>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get account information
Sourcefn get_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Position>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current positions
Sourcefn place_order<'life0, 'async_trait>(
&'life0 self,
order: OrderRequest,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn place_order<'life0, 'async_trait>(
&'life0 self,
order: OrderRequest,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Place an order
Sourcefn cancel_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel an order
Sourcefn get_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get order status
Sourcefn list_orders<'life0, 'async_trait>(
&'life0 self,
filter: OrderFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_orders<'life0, 'async_trait>(
&'life0 self,
filter: OrderFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all orders with optional filter
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check