QuoteHandler

Trait QuoteHandler 

Source
pub trait QuoteHandler:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn on_basic_qot_update<'life0, 'async_trait>(
        &'life0 self,
        _qot_list: Vec<BasicQot>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_kl_update<'life0, 'async_trait>(
        &'life0 self,
        _security: Security,
        _kl_list: Vec<KLine>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_order_book_update<'life0, 'async_trait>(
        &'life0 self,
        _data: OrderBookData,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_ticker_update<'life0, 'async_trait>(
        &'life0 self,
        _security: Security,
        _ticker_list: Vec<Ticker>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_rt_update<'life0, 'async_trait>(
        &'life0 self,
        _security: Security,
        _rt_list: Vec<TimeShare>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_broker_update<'life0, 'async_trait>(
        &'life0 self,
        _data: BrokerData,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_order_detail_update<'life0, 'async_trait>(
        &'life0 self,
        _data: OrderDetailData,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

行情推送回调 trait

实现此 trait 以接收实时行情推送。 使用 QuotePushDispatcher::dispatch 将原始推送消息分发到对应回调。

Provided Methods§

Source

fn on_basic_qot_update<'life0, 'async_trait>( &'life0 self, _qot_list: Vec<BasicQot>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

基本行情更新推送

Source

fn on_kl_update<'life0, 'async_trait>( &'life0 self, _security: Security, _kl_list: Vec<KLine>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

K 线更新推送

Source

fn on_order_book_update<'life0, 'async_trait>( &'life0 self, _data: OrderBookData, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

摆盘更新推送

Source

fn on_ticker_update<'life0, 'async_trait>( &'life0 self, _security: Security, _ticker_list: Vec<Ticker>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

逐笔更新推送

Source

fn on_rt_update<'life0, 'async_trait>( &'life0 self, _security: Security, _rt_list: Vec<TimeShare>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

分时更新推送

Source

fn on_broker_update<'life0, 'async_trait>( &'life0 self, _data: BrokerData, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

经纪队列更新推送

Source

fn on_order_detail_update<'life0, 'async_trait>( &'life0 self, _data: OrderDetailData, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

委托明细更新推送

Implementors§