LSEG Data Library for TypeScript

onComplete

Attaches an event handler function to the stream, which will be called once all the requested instruments have received a Response event.

Syntax

stream.onComplete(callBack: RDPStreamCompleteCb)

Parameters

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

Returned value

The current RDPStream object.

Usage

The following example demonstrates how to display the messages received when all the data has been successfully retrieved:

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

await stream
    .onComplete((stream) => console.log('Complete', stream))
    .open();
62 words (0:20 mins)