pub trait TradingService {
    // Required methods
    fn place_with_opts(
        &mut self,
        place: &Place,
        opts: &PlaceOrderOptions
    ) -> BoxFuture<'_, Result<Placed>>;
    fn cancel(
        &mut self,
        inst: &str,
        id: &OrderId
    ) -> BoxFuture<'_, Result<Canceled>>;

    // Provided method
    fn place(
        &mut self,
        inst: &str,
        place: &Place,
        client_id: Option<&str>
    ) -> BoxFuture<'_, Result<Placed>> { ... }
}
Expand description

Trading service.

Required Methods§

source

fn place_with_opts( &mut self, place: &Place, opts: &PlaceOrderOptions ) -> BoxFuture<'_, Result<Placed>>

Place an order with options.

source

fn cancel( &mut self, inst: &str, id: &OrderId ) -> BoxFuture<'_, Result<Canceled>>

Cancel an order.

Provided Methods§

source

fn place( &mut self, inst: &str, place: &Place, client_id: Option<&str> ) -> BoxFuture<'_, Result<Placed>>

Place an order.

Implementors§