Skip to main content

OrderSubmitter

Trait OrderSubmitter 

Source
pub trait OrderSubmitter: Send + Sync {
    // Required methods
    fn place_order<'life0, 'life1, 'async_trait>(
        &'life0 self,
        params: &'life1 OrderParams,
    ) -> Pin<Box<dyn Future<Output = Result<OrderResult, ExecutorError>> + 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<(), ExecutorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for submitting and cancelling orders.

Implementations include the paper executor (simulated fills persisted to SQLite) and the dry-run executor (log-only, no state).

Required Methods§

Source

fn place_order<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 OrderParams, ) -> Pin<Box<dyn Future<Output = Result<OrderResult, ExecutorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn cancel_order<'life0, 'life1, 'async_trait>( &'life0 self, order_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§