FutuOpenD

Trait FutuOpenD 

Source
pub trait FutuOpenD:
    Send
    + Sync
    + 'static {
    type SubscribePushStream: Stream<Item = Result<PushEvent, Status>> + Send + 'static;

    // Required methods
    fn request<'life0, 'async_trait>(
        &'life0 self,
        request: Request<FutuRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<FutuResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn subscribe_push<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SubscribePushRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribePushStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with FutuOpenDServer.

Required Associated Types§

Source

type SubscribePushStream: Stream<Item = Result<PushEvent, Status>> + Send + 'static

Server streaming response type for the SubscribePush method.

Required Methods§

Source

fn request<'life0, 'async_trait>( &'life0 self, request: Request<FutuRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FutuResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

通用请求-响应(覆盖所有行情/交易/系统接口)

Source

fn subscribe_push<'life0, 'async_trait>( &'life0 self, request: Request<SubscribePushRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribePushStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

流式推送(行情更新、订单更新等)

Implementors§