TradeHandler

Trait TradeHandler 

Source
pub trait TradeHandler:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn on_order_update<'life0, 'async_trait>(
        &'life0 self,
        _header: OrderUpdateInfo,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_order_fill_update<'life0, 'async_trait>(
        &'life0 self,
        _header: OrderFillUpdateInfo,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_trd_notify<'life0, 'async_trait>(
        &'life0 self,
        _info: TrdNotifyInfo,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

交易推送回调 trait

Provided Methods§

Source

fn on_order_update<'life0, 'async_trait>( &'life0 self, _header: OrderUpdateInfo, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

订单状态变更推送

Source

fn on_order_fill_update<'life0, 'async_trait>( &'life0 self, _header: OrderFillUpdateInfo, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

成交推送

Source

fn on_trd_notify<'life0, 'async_trait>( &'life0 self, _info: TrdNotifyInfo, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

交易通知推送

Implementors§