LSEG Data Library for TypeScript

onStatus

Attaches an event handler function to the stream, which will be called when an alarm/notification message is received by the stream.

Syntax

stream.onStatus(callback: RDPStreamAlarmCb)

Parameters

Value Description Data type Optional Default value
callback RDPStreamAlarmCb function (see RDPStream.Event). function No -

Returned value

The current RDPStream object.

Usage

The following example demonstrates how to display messages received when the stream receives an alarm/notification message:

const stream = Delivery.RDPStream.Definition({
    universe: 'R.BP.L',
    parameters: { universeType: 'Symbol' },
}).getStream();

await stream
    .onStatus((data, stream) => console.log(data, stream))
    .open();

OmmStream.Event

58 words (0:18 mins)