Trait OrderService

Source
pub trait OrderService: Send + Sync {
    // Required methods
    fn create_order<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session: &'life1 IgSession,
        order: &'life2 CreateOrderRequest,
    ) -> Pin<Box<dyn Future<Output = Result<CreateOrderResponse, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_order_confirmation<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session: &'life1 IgSession,
        deal_reference: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<OrderConfirmation, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn update_position<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        session: &'life1 IgSession,
        deal_id: &'life2 str,
        update: &'life3 UpdatePositionRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn close_position<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session: &'life1 IgSession,
        close_request: &'life2 ClosePositionRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ClosePositionResponse, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Interface for the order service

Required Methods§

Source

fn create_order<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 IgSession, order: &'life2 CreateOrderRequest, ) -> Pin<Box<dyn Future<Output = Result<CreateOrderResponse, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Creates a new order

Source

fn get_order_confirmation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 IgSession, deal_reference: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<OrderConfirmation, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Gets the confirmation of an order

Source

fn update_position<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session: &'life1 IgSession, deal_id: &'life2 str, update: &'life3 UpdatePositionRequest, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Updates an existing position

Source

fn close_position<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 IgSession, close_request: &'life2 ClosePositionRequest, ) -> Pin<Box<dyn Future<Output = Result<ClosePositionResponse, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Closes an existing position

Implementors§