UNPKG

@reactivemarkets/switchboard-sdk

Version:
46 lines (45 loc) 1.66 kB
import { INewOrderSingle, IOrderCancelRequest, IOrderReplaceRequest } from "."; export interface IOrdersClient { /** * 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; /** * The New Order Single message is sent by the taker to create a new order * for execution. * * The maker is expected to respond immediately with a Execution Report * message under normal conditions. * @param nos The order */ newOrderSingle(nos: INewOrderSingle): void; /** * The Order Cancel Request message is sent by the taker to cancel the * remaining quantity on a resting order. * * The Order Cancel Request message only applies to resting orders. * @param orderCancelRequest */ orderCancelRequest(ocr: IOrderCancelRequest): void; /** * The Order Replace Request message is sent by the taker to revise the * quantity or price of a resting order. * @param orderReplaceRequest */ orderReplaceRequest(orr: IOrderReplaceRequest): 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 * maker. * * The opposite application responds to the Test Request message with a * Heartbeat message containing the request id. */ testRequest(): void; }