LSEG Data Library for TypeScript

onRefresh

Attaches an event handler function to the stream, which will be called when the full data of the requested universe items is received.

Syntax

stream.onRefresh(callback: RDPStreamResponseCb)

Parameters

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

Returned value

The current RDPStream object.

Usage

The following example demonstrates how to display messages received when the full data of the requested universe items is received:

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

await stream
    .onRefresh((data, stream) => console.log(data, stream))
    .open();
65 words (0:21 mins)