Skip to content

Commit

Permalink
feat: Expose OrdersStreamServiceClient via orders_stream
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Feb 15, 2022
1 parent 87114df commit aeec536
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use tcs::{
market_data_service_client::MarketDataServiceClient,
market_data_stream_service_client::MarketDataStreamServiceClient,
operations_service_client::OperationsServiceClient,
orders_stream_service_client::OrdersStreamServiceClient,
sandbox_service_client::SandboxServiceClient,
stop_orders_service_client::StopOrdersServiceClient, users_service_client::UsersServiceClient,
};
Expand Down Expand Up @@ -152,6 +153,20 @@ impl TinkoffInvestService {
Ok(client)
}

pub async fn orders_stream(
&self,
channel: Channel,
) -> TIResult<OrdersStreamServiceClient<InterceptedService<Channel, DefaultInterceptor>>> {
let client = OrdersStreamServiceClient::with_interceptor(
channel,
DefaultInterceptor {
token: self.token.clone(),
},
);

Ok(client)
}

pub async fn stop_orders(
&self,
channel: Channel,
Expand Down

0 comments on commit aeec536

Please sign in to comment.