Refinitiv Data Platform Library for TypeScript

onUpdate

Attaches an event handler function to the stream, which will be called when the stream update is received.

Syntax

stream.onUpdate(callback: Pricing.StreamUpdateCallback)

Parameters

Value Description Data type Optional Default value
callback Pricing.StreamUpdateCallback function (see Pricing.StreamEvent ) function No -

Returned value

Pricing.Stream object

Usage

The following example demonstrates how to display messages received when the stream is updated

const stream = Pricing.Definition(['EUR=']).getStream();

await stream
    .onUpdate((update, instrument) => console.log(instrument, update))
    .open();

None.