pub trait Exchange: Send + Sync {
// Required methods
fn send_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel_order<'life0, 'async_trait>(
&'life0 self,
order_id: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_order_status<'life0, 'async_trait>(
&'life0 self,
order_id: String,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for exchange implementations
Required Methods§
Sourcefn send_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send an order to the exchange