import { CallOptions } from 'nice-grpc'; import { DeepPartial, GetCandlesRequest_CandleSource, MarketDataRequest, MarketDataResponse, OrderBookType, SubscriptionInterval, TradeSourceType } from './generated/marketdata'; type MaybeClosableAsyncIterable = AsyncIterable & { return?: (value?: unknown) => Promise; }; type MarketDataStreamClient = { marketDataStream(request: AsyncIterable>, options?: CallOptions): MaybeClosableAsyncIterable; }; export type CreateMarketDataStreamControllerOptions = { callOptions?: CallOptions; closeGraceMs?: number; }; export type MarketDataStreamController = { response: MaybeClosableAsyncIterable; send: (request: DeepPartial) => void; subscribeLastPrice: (instrumentId: string | string[]) => void; unsubscribeLastPrice: (instrumentId: string | string[]) => void; subscribeInfo: (instrumentId: string | string[]) => void; unsubscribeInfo: (instrumentId: string | string[]) => void; subscribeCandles: (instrumentId: string | string[], options?: { interval?: SubscriptionInterval; waitingClose?: boolean; candleSourceType?: GetCandlesRequest_CandleSource; }) => void; unsubscribeCandles: (instrumentId: string | string[], options?: { interval?: SubscriptionInterval; waitingClose?: boolean; candleSourceType?: GetCandlesRequest_CandleSource; }) => void; subscribeOrderBook: (instrumentId: string | string[], options?: { depth?: number; orderBookType?: OrderBookType; }) => void; unsubscribeOrderBook: (instrumentId: string | string[], options?: { depth?: number; orderBookType?: OrderBookType; }) => void; subscribeTrades: (instrumentId: string | string[], options?: { tradeSource?: TradeSourceType; withOpenInterest?: boolean; }) => void; unsubscribeTrades: (instrumentId: string | string[], options?: { tradeSource?: TradeSourceType; withOpenInterest?: boolean; }) => void; close: () => Promise; }; export declare const createMarketDataStreamController: (client: MarketDataStreamClient, options?: CreateMarketDataStreamControllerOptions) => MarketDataStreamController; export {};