UNPKG

@reactivemarkets/switchboard-sdk

Version:
33 lines (32 loc) 1.12 kB
import { IMarketDataSubscription } from "./iMarketDataSubscription"; export interface IMarketDataClient { /** * Indicates if the connection is open and ready to communicate. */ readonly isOpen: boolean; /** * The Heartbeat message is used to ensure that sessions remain active and to * test the session status. The receiving side is not expected to respond to * a Heartbeat message. */ heartbeat(): void; /** * Subscribe to market data with the given options. * @param options subscription options */ subscribe(options: IMarketDataSubscription): void; /** * The Test Request message forces a Heartbeat message from the opposing * application. The Test Request message may be sent by either the taker or * smaker. * * The opposite application responds to the Test Request message with a * Heartbeat message containing the request id. */ testRequest(): void; /** * Unsubscribe from market data. * @param options subscription options */ unsubscribe(options: IMarketDataSubscription): void; }